From: Frank H. <fr...@ph...> - 2008-11-21 18:10:14
|
Jef Driesen wrote: > The problem is caused by the difference in calling convention between > the C DLL (cdecl) and the C# callback function (stdcall). You have to > change the calling convention of the callback function to cdecl (.NET > 2.x or higher only): > > [UnmanagedFunctionPointer (CallingConvention.Cdecl)] > delegate double Func (double x, ref Parameters p); > > Or change the C DLL to expect a stdcall callback function of course. Thanks a lot for the hint. It works now. -- Frank Hrebabetzky Tel. (48) 3239 2258 Photonita Ltda. http://www.photonita.com.br Brazil |