Ok, I have found the way to do it. I have posted the code just in case anybody else is stuck.
Delegate Declaration:
Assigning the handler to the SDK:
Obviously you need to use System.Runtime.InteropServices
Delegate Declaration:
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int dBBEventHandler(int hWnd, int Msg, int wParam, int lParam); public dBBEventHandler BBEventHandler;
Assigning the handler to the SDK:
BBEventHandler = new dBBEventHandler(Engine_BBEventHandler); bb.SetBlitz3DEventCallback(Marshal.GetFunctionPointerForDelegate(BBEventHandler).ToInt32());
Obviously you need to use System.Runtime.InteropServices