M
Markus Forrer
On Windows CE 5.0 and CF2.0 a try to send a string from a unmanaged DLL to
managed app:
extern "C" __declspec(dllexport) void GetError(char *pErrorMessage)
{
strcpy(pErrorMessage, "Hello C# World!");
}
[DllImport("TestDll.dll")]
internal static extern void GetError([MarshalAs(UnmanagedType.LPStr)]
StringBuilder errorMessage);
StringBuilder message = new StringBuilder(500);
GetError(message );
I allways get an error 'NotSupportedException'.
Thanks for help!
Markus
managed app:
extern "C" __declspec(dllexport) void GetError(char *pErrorMessage)
{
strcpy(pErrorMessage, "Hello C# World!");
}
[DllImport("TestDll.dll")]
internal static extern void GetError([MarshalAs(UnmanagedType.LPStr)]
StringBuilder errorMessage);
StringBuilder message = new StringBuilder(500);
GetError(message );
I allways get an error 'NotSupportedException'.
Thanks for help!
Markus