GetFunctionPointerForDelegate returns a pointer that is only ready for __stdcall calling convention. Then, if it is used in a callback scenario, the callback must use __stdcall calling convention, as all of the Windows callbacks does. If you use a 3rd party library that uses non __stdcall callbacks you will get strange malfunctions.
For example, if you need a callback that has the signature "bool Notification(char a,int b);", that function MUST use __stdcall convention and when using in a C++/CLI scenario, the casting must be explicitly done:
IntPtr p=Marshal::GetFunctionPointerForDelegate(theDelegate);
bool (__stdcall *pfnc)(char,int)=(bool (__stdcall*)(char,int))p;
InstallCallback(pfnc); //InstallCallback receives a native callback whit "bool fnc(char,char)" signature.