F
Fred West
I am building a C# interface to a 3rd party win32 dll. The win32 function
has the following definition:
extern "C" int __declspec(dllimport) _stdcall w32func(unsigned char id, char
*pname);
Now in my C# class how do I declare the function. So far from the
documentation, I have come up with the following:
[DllImport("theapi.dll", EntryPoint="w32func")]
private static extern unsafe int W32Func(byte board id,
[MarshalAs(UnmanagedType.LPStr)] string name);
Any comments or suggestions are greatly appreciated,
Fred W.
has the following definition:
extern "C" int __declspec(dllimport) _stdcall w32func(unsigned char id, char
*pname);
Now in my C# class how do I declare the function. So far from the
documentation, I have come up with the following:
[DllImport("theapi.dll", EntryPoint="w32func")]
private static extern unsafe int W32Func(byte board id,
[MarshalAs(UnmanagedType.LPStr)] string name);
Any comments or suggestions are greatly appreciated,
Fred W.