I'm trying to call a function in a C++ dll, from C# code.
The C++ function :
#ifdef NT2000
__declspec(dllexport)
#endif
void MyFunction
( long *Code,
long Number,
unsigned char *Reference,
unsigned char *Result ) ;
And my C# call is :
[DllImport("mydll.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void MyFunction(ref IntPtr Code,
int Number,
string Reference,
ref IntPtr Result);
This function is supposed to return "Code" and "Result"
The "Code" value that I get seems to be ok, but "Result" seems not ok, so I'm wondering if I'm getting the string value that I expect or the memory address ?
Thanks for your help.