Calling MFC DLLs from non-MFC programs 
Author Message
 Calling MFC DLLs from non-MFC programs

I'm having trouble calling an MFC DLL from a non-MFC program.  The DLL
is a regular DLL, not an extension DLL.  If I call it from an AppWizard
program, it works fine; but if I call it from a console-mode program, or
from a program compiled with Borland, I get an assertion failure from
somewhere deep in the MFC code.

Has anyone else had this trouble?  Anyone have a solution?

Also, has anyone successfully called an MFC DLL from a non-MFC program?

Thanks.

 -PD



Sat, 21 Aug 1999 03:00:00 GMT  
 Calling MFC DLLs from non-MFC programs

Should work fine, as long as you created the DLL properly.  From what
you described it sounds like you may have made an extension DLL, you
should check to make sure.

Are you creating a global CWinApp object?
Are you calling AFX_MANAGE_STATE at the beginning of every exported
fucntion?
Do you have a DllMain? (you shouldn't)

--
Talk is cheap & lies are expensive....
                My wallets fat & so is my head.



Sat, 21 Aug 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Calling mfc library from non-mfc program

2. MFC DLL needs to be called from Non-MFC VB.

3. Calling MFC DLLs from a non-MFC app

4. Non-MFC OLE client calling MFC-built server DLL

5. Non-MFC OLE client calling MFC-built server DLL

6. loading an MFC DLL that was originally an extension dll from a non MFC dLL

7. set_new_handler in non MFC library called from MFC application

8. non-mfc calling mfc example

9. Calling MFC (dialog) from non-MFC framework

10. Non MFC exe and MFC-dll

11. Using non-MFC DLL in MFC app

12. Non MFC exe and MFC-dll

 

 
Powered by phpBB® Forum Software