-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Marshalling char16_t* or wchar_t* #1538
Comments
We've had a pending PR that should help with this: #983 It just needs a bit of a push to get it over the line. |
@tritao I already took care of this issue as far as I know. CppSharp/tests/CSharp/CSharp.cpp Line 1846 in 9b69f14
The problem is that none of my contributions will be available for most people until we release a new nuget package to nuget.org. |
@josetr |
Marshalling char16_t* and wchar_t* produces the wrong marshalling type.
Windows, MSVC++ to C#.
C++ signature:
void Log(const char16_t* str)
will produce:
void _LogDelegateHook(global::System.IntPtr __instance, [MarshalAs(UnmanagedType.LPUTF8Str)] string str)
Here,
LPUTF8Str
is wrong. char16_t is UTF16-LE. Tests confirm usingLPWStr
would fix it.The text was updated successfully, but these errors were encountered: