I am implementing a C++ dll into my C# application. My knowledge of C++ is very basic so I don't know how to translate some structs and events.
The biggest problem I have right now is how to hook up events. C++ needs the following struct as input on a method:
void (__stdcall *fFirstCaller) (void *pVoidExternal, int Parms);
void (__stdcall *fSecondCaller) (void *pVoidExternal);
typedef struct EXT_FUNCTIONS_TYPE
int (__stdcall *FirstEvent) (void* pVoidExternal);
void (__stdcall *Executing) (void* lpVoid1, int Parm1, int Parm2, unsigned char *szParm3);
I a using DLLImport to load the DLL into memory in C# and use "external static" to get a reference to the functions.
If I understand correct both above structs also need eventhandler. How must I translate and use the structs in C#?
Please supply examples.