Re: Debug assertion failed (in afxwin1.inl) line 21



Well, there's an error in your program. Of course, it would help a LOT in figuring this
out, if you had managed to think of actually posting some code, such as the code that
caused the error. Otherwise, the ethereal vibration method of intuiting what might have
gone wrong is required, and it isn't working well tonight; for some reason I can't see
what the code is you wrote.

Which version of VS are you using? VS6, VS2002, VS2003, VS2005? It matters a lot!

In this case, it looks like AfxGetInstanceHandle is failing. So of course, knowing where
it was called from would be a massively large help in understanding what is going on. Look
at the call stack.
joe


On 17 Feb 2007 10:26:13 -0800, "abhichamp" <abhigup1986@xxxxxxxxx> wrote:

Hi,

I have an application using MFC. The application code is compiling
fine
But when the application is executed
using debug mode following error is getting generated:

Debug Assertion Failed!


File: f:\..\..\afxwin.inl
Line: 21


Hope somebody could help me out by advising what may be wrong with my
code!!
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages


Loading