|
-
November 28th, 2009, 11:48 PM
#5
Re: Dll Dialog not showing
 Originally Posted by JohnCz
No, that is not your problem.
What you are trying to do is to call dialog in a dll. and that has nothing to do with your problem that can be described as follow:
I am nor able to start application and I am getting:
Unhandled exception at 0x557562f9 (mfc90d.dll) in TestDLL.exe: 0xC0000005: Access violation reading location 0xfefeff66.
As you can see, your problem is in TestDLL.exe, not in MyDLL.dll.
Did you write this application?
If you did, you must have followed ill advice to use CEXTDLLState before calling DoModal in CTestDLLDlg. This small class swithces resource handle from executable to a dll after loading it, therefore creation of a dialog for CTestDLLDlg object fails in FindResource looking for templare, since template does not exist in a dll.
That is only one problem you have stumble on. Once you remove line that instatiate CEXTDLLState before calling DoModal, main dialog will come up.
Dialog you reques from dll will not. That is a place to instantiate CEXTDLLState. You need to switch resource handle, since without switching FindResource in DoModal for CAnand dialog fails; there is no template for it in TestDLL.exe.
Another thing is inserting dialog after return. This code like that will never be executed.
Thanks Sir
Acutally i have not more idea about MFC. Just i am trying to do this
and i have taken help form this link http://www.********.net/Visual_C_MFC...ension-dll.htm can you please send me a sample application.
so that i can do this and can get my mistake.
thanks
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
|