I need to import unmanaged DLL fuunction to C#.
C++ function signature is:
char *fnname(const DWORD Id, char *buffer32, DWORD *UId, BYTE *Cid, BYTE *Mask, WORD *ID)
How should C# import look?
I crrently have:
extern static String fnname(Int32 Id,[MarshalAs(UnmanagedTyp
e.LPStr)] ref StringBuilder buffer32, Int32 UId, byte CId, byte Mask,ref Int16 ID);
This is runable (no exception) but not working. Problem is that buffer which should be preallocated to 32 bytes and should contain empty string. C++ code receives something wrong.
I have no source code, only LIB and H files.
Start Free Trial