[Mono-devel-list] pinvoke is passing strings as ansi not unicode
cscholes at novell.com
Fri Apr 9 14:32:56 EDT 2004
I am trying to call an unmanaged function with an array of strings. I
was expecting the array of strings to be passed to my unmanaged function
as an array of unicode strings (every other byte is 0) but I am getting
ansi strings (every byte is an ansi character).
Here are my function definitions:
public static extern int nativeQuery(
and the unmanaged function:
extern "C" HRESULT nativeQuery(
where WS_FUNCTION_PTR is a long long, QF_INT32 is a 32 bit int, and
QF_UNICODECHAR is an unsigned short. I have tried assigning
QF_UNICODECHAR to wchar_t but that didn't change.
Is it actually passing the parameters as UTF-8 and not double-byte
I am using mono version .31.
More information about the Mono-devel-list