Re: Linking to an existing MFC DLL

Tech-Archive recommends: Fix windows errors by optimizing your registry



You need to provide full MFC support to your project.
It is required by MFC extension DLLs. I suggest you
write a wrapper DLL around that extension DLL (with
proper MFC hosting capabilities) instead, and expose
only C functions from this DLL. You can then use your
C-interface DLL from your executable.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

"DR Bellavance" <DRBellavance@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D011C5F5-5FCE-4F43-BAB3-5367248E3D6C@xxxxxxxxxxxxxxxx
>I have a VC++ 6.0 project where I need to link an ATL exe server to an MFC
> Extension DLL that performs some image capture functions. My server gets
> the
> compile error...
>
> C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE\afxv_w32.h(14) :
> fatal error C1189: #error : WINDOWS.H already included. MFC apps must
> not
> #include <windows.h>
>
> If I remove the #include "windows.h" from the StdAfx.h file in my ATL
> server, I get other compile errors too numerous to list here. Can anyone
> provide a suggestion or refer me to the documentation that will help me
> perform this critical task.
> --
> DR Bellavance


.



Relevant Pages

  • Re: CreateDialog in MFC Extension DLL
    ... So oo provide the user with an indication of each processes state I want to create a dialog (used to feedback progress) using a template. ... This, or a variation of it, would then produce two identical dialogs on the screen, each of which would show a differing state of progress. ... This being an MFC newsgroup, and your DLL being an MFC extension DLL, have you considered using MFC? ...
    (microsoft.public.vc.mfc)
  • Re: calls to unmanaged dll to create a socket result in debug assertio
    ... You have selected an extension DLL and then used AFX_MANAGE_STATE, ... An MFC Extension DLL can *only* be used with an MFC application, not a C# application, ... Use a regular DLL. ... One of the functions in the unmanaged dll creates a new CAsyncSocket, ...
    (microsoft.public.vc.mfc)
  • Re: Determine if Regular DLL or Extension DLL
    ... depends) is not a reliable method for determining if it's an extension DLL ... Regular DLLs can have MFC dependencies. ... functions thus leaving inspection of exports an unreliable means of ...
    (microsoft.public.vc.mfc)
  • Re: Problems porting application from VS6 to VS.NET
    ... > code inside the extension DLL that trigger the error: ... > CActiveMilCamera is a CDialog based class with some ActiveX controls ... > (which is inherited from CDialog) which causes the error. ... incompatibilities in MFC between VC6 and VC7.1). ...
    (microsoft.public.vc.language)
  • Re: Problems porting application from VS6 to VS.NET
    ... > code inside the extension DLL that trigger the error: ... > CActiveMilCamera is a CDialog based class with some ActiveX controls ... > (which is inherited from CDialog) which causes the error. ... incompatibilities in MFC between VC6 and VC7.1). ...
    (microsoft.public.vc.mfc)