You're right, I'm probably using one of those, whatever is the default for
"string". Since this is within a structure within an array I can't use a
simple array of bytes (like what the conversion to UTF-8 returns), I have to
use "String".
Frankly, I have no idea what default conversion is used for "string", but it
is received in C as char*.
I don't care if Win32 has support for UTF-8, I have already done the
conversion in .Net and the dll I'm calling has native support for UTF-8.
That's not the issue.
My point is that when reading about p/invoke in MSDN, there is no
information about that there is a character conversion. The only thing about
character set is the DllImportAttribute.CharSet, but that is more about what
entrypoint to use.
I still think that the documentation should be updated to clearly state that
there is a character set conversion during automatic p/invoke from Unicode
to whatever the Windows station is using.
Regards,
John Allberg
>> Hi!
>>
[quoted text clipped - 32 lines]
> bye
> Rob
"Peter Huang" - 22 Oct 2004 03:33 GMT
Hi John,
You may try to take a look at the link to see if that is what you want.
Default Marshaling for Strings
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpcondefaultmarshalingforstrings.asp
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" - 26 Oct 2004 09:33 GMT
Hi,
If you have any more concerns on it, please feel free to post here.
Thanks for your understanding!
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.