MFC DLL ok in Call DLL function?
Posted: Mon Aug 21, 2006 1:33 pm
Can I use an MFC dll (dynamically linked to MFC80.dll) in the Call DLL function of my script?
I am calling wbkey32.dll but always get FUNCTIONNOTFOUND returned. I have checked the exports of my .dll and the called function exists there. I have checked and re-checked the syntax and spelling within my IA script.
I also use this .dll within my deployed MFC app.
In pseudo-code:
Any help pointing me in the right direction would be appreciated.
I am calling wbkey32.dll but always get FUNCTIONNOTFOUND returned. I have checked the exports of my .dll and the called function exists there. I have checked and re-checked the syntax and spelling within my IA script.
I also use this .dll within my deployed MFC app.
In pseudo-code:
Code: Select all
CWbKey32App theApp;
// ... a bunch of MFC stuff, like MESSAGE_MAP, etc., left out here for brevity.
BOOL CWBKey32App::InstallKey2(
long lVal1, // input
long lVerMajor, // major version number
long lVerMinor) // minor version number
{
// do some stuff...
return TRUE;
}
extern "C" long WBInstallKey2(
long lVal1, // input
long lVerMajor, // major version number
long lVerMinor) // minor version number
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
BOOL bReturn = theApp.InstallKey2(lVal1, lVerMajor, lVerMinor);
return ((bReturn) ? 0L : 1L); // return 0 on success
}
In the .def file
; WBKey32.def : Declares the module parameters for the DLL.
LIBRARY "WBKey32"
EXPORTS
WBInstallKey2 @1
Any help pointing me in the right direction would be appreciated.