P
pawel
Hi!
I have a .dll library, with some exported function, which looks something
like this:
extern "C" {
int exported_f (int (__cdecl *callback) (int a, int b)) ;
}
now, I want to invoke this function wihtin the managed code and supply my
managed delegate function poiter as callback. I use DllImport, we know how
to do this
The problem is that: when the function pointer parameter in exported
function is __stdcall, everythig works just fine. But how can I use
delegates for __cdecl callback function pointers ?..
I found CallingConventions, but this is only valid for imported function
itself, not for its parameters (
Please, help me ! (sorry for my poor english
I have a .dll library, with some exported function, which looks something
like this:
extern "C" {
int exported_f (int (__cdecl *callback) (int a, int b)) ;
}
now, I want to invoke this function wihtin the managed code and supply my
managed delegate function poiter as callback. I use DllImport, we know how
to do this
The problem is that: when the function pointer parameter in exported
function is __stdcall, everythig works just fine. But how can I use
delegates for __cdecl callback function pointers ?..
I found CallingConventions, but this is only valid for imported function
itself, not for its parameters (
Please, help me ! (sorry for my poor english