Re: Migrating an application from ( VC6.0 to ) vs 2003 in MFC/C++ to
VS2008
On Jun 10, 5:55 am, Scot T Brennecke <Sc...@Spamhater.MVPs.org> wrote:
Ana wrote:
On Jun 6, 3:47 am, Scot T Brennecke <Sc...@Spamhater.MVPs.org> wrote:
You told us what file the assertion failure was in, but not what the
code assertion was that failed. Ignoring assertions is not somethin=
g
you can tolerate, of course. What is the code that failed the asser=
tion?
Ana wrote:
Hi,
Its urgent!
I am migrating an application written in MFC /C++, ATL and using
Webbrowser.
The application does not compile and pops up with many errors which i
have managed to resolve by including a list of libs etc as
afxisapi.h,
afxisapi.inl
afxisapi.rc
eafxis.lib
eafxis.pdb
eafxisd.lib
eafxisd.pdb
nafxis.lib
nafxis.pdb
nafxisd.lib
nafxisd.pdb
as suggested in
http://blogs.msdn.com/jpsanders/archive/2007/12/10/chttpserver-not-in.=
...
This builds well without any error but in debug mode as it compiles i=
t
gives an debug assertion failed at afxwin1.inl.
It breaks at afxgetresourcehandle.
Please let me know what am I missing on.
Also on ignoring the assertion message i can half way run my
application.
All and any help / advice will be appreciable.
Thanks in advance,
Ana- Hide quoted text -
- Show quoted text -
Hi Scott ,
Thanks for the response.
Yes.
The code where it breaks is when I try to load an image on to picture
control and call
HINSTANCE hInst = AfxGetResourceHandle();
Also, It some how looks for ..\Vc7libs\... location for the files it
asserts on.
Thanks.
Best Regards,
Ana
Ana,
You still never answered my question: what is the code th=
at is failing
the assertion? You only told me the code that makes the function call.
When an assertion failure occurs, you typically get a dialog box,
giving you the opportunity to break into the debugger on the line where
the assertion failed -- usually a line beginning with the word ASSERT.
What is that line of code?
Also, to you and Ajay and others: vc7libs is a directory used by the
Microsoft (typically Windows) builds that use the VC++ libraries. It i=
s
probably NOT because of using multiple versions of MFC, as they
suspected. Using Dependency Walker can usually clear up that question,
though.- Hide quoted text -
- Show quoted text -
Yes the code breaks at ....
the debugger reaches the constructor of
CAboutDialog abtdlg;
and the construct for it is defined as below:
CAboutDialog ::CAboutDialog (CWnd* pParent /*=NULL*/)
: CDialog(CAboutDialog ::IDD, pParent)
{
m_Image1.Load(IDR_IMAGE1); // the code breaks here
giving an assertion
dis_in = 0;
..
..
..
}
Load(UINT ires) is a function which calls AfxGetResourceHandle(),
before it can find more resources on the dialog.
ie
CImage::Load(UINT ires)
{
HINTANCE hinst = AfxGetResourceHandle(); // :( .....
// after this code for finding res etc follows
}
Also as mentioned earlier, I have the CAboutDialog instance declared
global.
Please let me know what I need to do to resolve it.
Thanks,
Ana