COM DLL and CDialog 
Author Message
 COM DLL and CDialog

I have an addin for Outlook that includes MFC.  I have created a CDialog
derived class.  However, upon calling DoModal(), I get an assertion on line
26 of afxwin1.inl.
Tracing up one level in the call stack goes to CDialog::DoModal (line 496):

 HINSTANCE hInst = AfxGetResourceHandle();

The assertion itself is:

_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()
 { ASSERT(afxCurrentResourceHandle != NULL);
  return afxCurrentResourceHandle; }

I gather that it is not recognizing my resource file correctly here.  What
do I need to do to correct this?
--
Adam Clauss



Mon, 17 Oct 2005 07:27:41 GMT  
 COM DLL and CDialog

Quote:
>I have an addin for Outlook that includes MFC.  I have created a CDialog
>derived class....

Adam,

You probably need to make use of AFX_MANAGE_STATE in the exported
entry points to your DLL.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq



Mon, 17 Oct 2005 14:33:03 GMT  
 COM DLL and CDialog
That did it... thanks.  Most likely would have never found that on my own.
Searching for a combination of DLL resource dialog, etc didn't turn up
anything :/
Thanks again!

--
Adam Clauss


Quote:
> >I have an addin for Outlook that includes MFC.  I have created a CDialog
> >derived class....

> Adam,

> You probably need to make use of AFX_MANAGE_STATE in the exported
> entry points to your DLL.

> Dave
> --
> MVP VC++ FAQ: http://www.mvps.org/vcfaq



Tue, 18 Oct 2005 03:56:49 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. call a VB COM dll thru a C++ COM dll from a C program

2. call a VB COM dll thru a C++ COM dll from a C program

3. Problem calling VB COM dll from VC++ multithreaded COM EXE client

4. Lifetime of EXE COM server that uses DLL COM server

5. COM DLL TO COM EXE problem!

6. problems passing ADO Recordset from VB-COM client to VC-COM-Server dll

7. COM dll from ISAPI dll

8. normal dll -> com dll

9. diff b/w usual .dll and .dll developed in atl com

10. problem getting header file for the COM dll that uses msado15.dll

11. basic que abt pure C++ COM Dll and ATL dll

12. Converting Plain DLL to ATL COM based Dll

 

 
Powered by phpBB® Forum Software