Hi There,
I have created a DLL in C++. A particular DLL function works fine when
called from a C++ program, however when trying to call the same DLL function
in VB an error is recieved 'Bad DLL Calling Convention'
The function is exported in the DLL as follows:
EXPORT void StartKeyboardHook(LRESULT (*)());
and imported in the VB application as follows:
Public Declare Sub StartKeyboardHook Lib "HooksLIB.dll" (ByVal CallBackFunc
As Long)
The function is then called in vb as follows:
Call StartKeyboardHook(AddressOf KeyPressed)
Any ideas?
Josh