От: | Lepsik | figvam.ca | |
Дата: | 08.07.16 21:09 | ||
Оценка: |
wchar_t* NTAPI TestUnicode()
{
return L"<\xD1\xD1\xD1\xD0\xAE\xA9>\0\0"; //CCCP
}
[DllImport("unittest.dll", CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
public static extern IntPtr TestUnicode(); //
protected bool foo()
{
IntPtr ptrUserList = TestUnicode();
string userList = Marshal.PtrToStringUni(ptrUserList);
}