The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

DSmith1974 (5) [Avatar] Offline
Hi All,

Grateful if anyone has any suggestions here? I have a VS2005 MFC app
which hosts several types of views in CFrameWnds - one of which
contains a managed control hosted in a CWinFormsView

Everything works well on my dev pc (and other peoples dev pcs), but
when I try and instantiate the managed view on a target-pc (no
compilers, etc) there's an exception thrown followed by program

Compiling the release build with debug info and optimizations turned
off, I can trace the source of the crash to this line using WndBg

CView *pNewView = pFrame->CreateView(pInfo->m_pszTitle, pInfo-


m_pViewClass is just RUNTIME_CLASS(CWFVMessageView) which is the
CWinFormsView class. When I step over this line there's a first
chance exception 0x80000003 thrown (bad params?) way down in nt.dll

Both PCs have .NET v.2.0.50727 installed and vcredist_x86.exe has been
applied to the target PC. The managed control resides in a dll in the
same folder as the app module (not registered in the GAC or anything).

Like I say, it works well on a dev-pc but not a clean one, so maybe
I've missed a step out in the installer or something???

Many thanks,

DSmith1974 (5) [Avatar] Offline
Re: AppCrash on deployment pc (release build) when using WinFormsView and /
Found the problem: If you derive a class from CWinFormsView then your app will require 'mfcmifc80.dll' at runtime, but this file does not get shipped with vcredist_x86.exe so the onus is on your installer.

It was difficult to spot, because no information is given and even WinDbg can't debug the managed module. In the end I hooked up a dev-laptop to a release machine for a remote debug session - and finally got a sensible error message.

It's a shame about WinDbg though because I won't always have a dev-pc handy in the release environment. Oh well.


Nish (16) [Avatar] Offline
Re: AppCrash on deployment pc (release build) when using WinFormsView and /
Hello Duncan,

You may also want to see this thread on MSDN forums :