Hi!
Actually I make program in VC++ and I need to load some function from dll file. I have only this dll file and nothing more. My dll file name is sche.dll and contain void showTr() method. I think I should try to load it dynamically and below is code I used:
//------------------------------------------------------------
//-----------------------------------------------------
Compiler does not show any erorrs or warnings. So please help me find a bug. And one more thing dll is made in VB.
Thanks for any help
Cheers
Bartec
//------------------------------------------------------------
Actually I make program in VC++ and I need to load some function from dll file. I have only this dll file and nothing more. My dll file name is sche.dll and contain void showTr() method. I think I should try to load it dynamically and below is code I used:
//------------------------------------------------------------
Code:
HINSTANCE appInstance;
appInstance = LoadLibrary("sche.dll");
if(appInstance != NULL)
{
MessageBox("Got it!");
}
typedef void (__stdcall *showTrFn)();
showTrFn pfnPokazOkno = (showTrFn) GetProcAddress((HINSTANCE) appInstance, _T("showTr"));
ASSERT(pfnPokazOkno);//<---this is line I have run time error
Compiler does not show any erorrs or warnings. So please help me find a bug. And one more thing dll is made in VB.
Thanks for any help
Cheers
Bartec
//------------------------------------------------------------