Re: recompile a DLL with _stdcall for VB
`CALLBACK' is defined as `__stdcall' in WinDef.h header.
Alex- Hide quoted text -
- Show quoted text -
thnk you for the replay.
well, this is the error I get when I try to compile the dll:
error C2059: syntax error : '__stdcall'
the functions are so written:
BOOL STDDLLEXPORT myfunctionSTD(int nvalue, void (CALLBACK*
amIReadyCallback)(int, LPVOID), LPVOID lpvParameter)
{ //function wrapper for VB
BOOL value;
value= myfunctionCDECL( nvalue,(CALLBACK* amIReadyCallback)(int,
LPVOID), lpvParameter); <---here I get the error
return value;
}
BOOL DLLEXPORT myfunctionCDECL(int nvalue, void (CALLBACK*
amIReadyCallback)(int, LPVOID), LPVOID lpvParameters)
{
// a lot of things here
}
and the callback function:
void CALLBACK TimerProc(HWND hWnd, UINT nMsg, UINT nIDEvent, DWORD
dwTime)
{
//a lot of things here which refer to amIReadyCallback
}
so my questions are:
do I need to write a wrapper for the myFunctionCDECL ?
if yes, how do I call the callback function inside the wrapper?
thanks.