|
-
May 21st, 2010, 05:44 AM
#1
DoModal failed
Hello,
I created one MFC extension DLL (Say DllA) that uses another extension dll in which classes are exported. In DllA I have created a dialog. I made one exported function from the and that (DllA) function simply call DoModal() on the object of Dialog class.
ShowAsaeDlg()
{
ADialog ADlg;
ADlg.DoModal;
}
Also created one MFC application which uses above created dll and give call to the exported function. Code is as below.
GetModuleFileName(NULL, szModulePath, MAX_PATH);
GetShortPathName(szModulePath, szModulePath, MAX_PATH);
_tcscat(szModulePath, _T("ADll.dll"));
hAsaeDll = LoadLibrary (szModulePath);
pfnShowAsaeDlg = (PFN_SHOWASAEDLG)GetProcAddress(hAsaeDll, "ShowAsaeDlg");
pfnShowAsaeDlg();
This simple code does not works. DoModal returns -1.
Can anybody help me on this.
Regards,
Avirat
Last edited by avirat; May 21st, 2010 at 06:43 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|