Re: Problems porting application from VS6 to VS.NET
From: Carl Daniel [VC++ MVP] (cpdaniel_remove_this_and_nospam_at_mvps.org.nospam)
Date: 07/27/04
- Next message: Carl Daniel [VC++ MVP]: "Re: upper limit of increasing stack size."
- Previous message: Joe Greer: "Re: Alternative memory managers"
- In reply to: Qystein_Skotheim?=: "Problems porting application from VS6 to VS.NET"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 27 Jul 2004 08:29:08 -0700
Øystein Skotheim wrote:
> Hello. I am experiencing problems with my application when I try to
> compile it with Visual C++ .NET.
>
> It consists of a main program which loads an MFC extension DLL with
> its own dialog box and some ActiveX controls.
>
> The program runs without errors when compiled with VC++ 6.0.
>
> There appeared to be no problems in converting the project and
> compiling it on VC++ .NET. However, the application immideately
> terminates with the following message:
>
> Debug Assertion Failed!
> File: occmgr.cpp
> Line: 410
>
> I can see from the call stack that it is the following two lines of
> code inside the extension DLL that trigger the error:
>
> g_pActiveMilCamera = new CActiveMilCamera();
> g_pActiveMilCamera->Create(IDD_ACTIVEMIL);
>
> CActiveMilCamera is a CDialog based class with some ActiveX controls
> from Matrox Imaging Library (MIL Lite 7.5). It is the "Create" call
> (which is inherited from CDialog) which causes the error.
>
> The same error appears if either the extension DLL or the main
> program is compiled with VC++ .NET. However, it does not appear if
> both of the programs are compiled with VC++ 6.0.
>
> Does anyone have a clue what might cause the problem?
Questions:
Are you using VC7.1 (VS.NET 2003) or VC7 (VS.NET 2002)?
Are you mixing a VC6 DLL with a VC7.1 EXE? If so, don't - unless the DLL
was specifically designed for this scenario, you'll have problems (binary
incompatibilities in MFC between VC6 and VC7.1).
Are you building everything with /MD? If you're not, then do so, otherwise
you have multiple CRT implementations in memory at once. The same argument
goes for MFC - everything should use the DLL version of MFC if you're using
MFC in the DLL and the EXE.
Have you checked with Matrox to determine if MIL is compatible with VC7.1?
-cd
- Next message: Carl Daniel [VC++ MVP]: "Re: upper limit of increasing stack size."
- Previous message: Joe Greer: "Re: Alternative memory managers"
- In reply to: Qystein_Skotheim?=: "Problems porting application from VS6 to VS.NET"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|