[Mono-list] Can I call CoTaskMemAlloc on Linux?

Vincent Finn vincent.finn at riverdocs.com
Thu Mar 15 12:09:28 EDT 2007


Hi,

I am sure this is a stupid question but I wanted to check before going 
down the wrong route.

On windows I am passing IntPtrs from C# to C++ and them using 
SysAllocString on "UnmanagedType.LPWStr" and CoTaskMemAlloc on structs 
when I want to return memory.

In Visual Studio I need to include "oleauto.h" to get those functions, 
and I then need to include "windows.h" to get various #defines used in 
"oleauto.h".

"windows.h" won't be on a Linux machine so can someone confirm for me 
that CoTaskMemAlloc is portable and not MS?

If it isn't what is the alternative?

	Thanks, Vin


More information about the Mono-list mailing list