By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,381 Members | 1,640 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,381 IT Pros & Developers. It's quick & easy.

Assertion Failure

P: n/a
Hi,

I am getting an assertion failure when declaring a CInternetSession
object:

CInternetSession mySession; // a session object

I am still able to run the program, but I receive that annoying
assertion failure dialog box and I have to click "ignore" each time.

How do I remedy the situation?

Any help is much appreciated.

~Etay

Oct 27 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Etayki wrote:
Hi,

I am getting an assertion failure when declaring a CInternetSession
object:

CInternetSession mySession; // a session object

I am still able to run the program, but I receive that annoying
assertion failure dialog box and I have to click "ignore" each time.

How do I remedy the situation?

Any help is much appreciated.

~Etay


1. You have an error on line 42. In other words, you did not provide
enough context for us to even look at your problem.
2. MFC classes are OT in comp.lang.c++
Oct 27 '05 #2

P: n/a
red floyd,

1.
thanks for the response. Here is my program:

#include <AfxInet.h> // provides CHttpFile class, CInternetSession
class

int main()
{

CInternetSession mySession; // declares a CInternetSession object

return 0;

}

This program compiles fine but ouputs the following output error:
"Debug Assertion Failed!
Program: C:\WebSearcher\Debug\play_around1.exe
File: afxwin1.inl
Line: 27

When I take a look at afxwin1.inl, the problem originates from the
following lines:

// Inlines for AFXWIN.H (part 1)
#ifdef _AFXWIN_INLINE
// Global helper functions
_AFXWIN_INLINE LPCTSTR AFXAPI AfxGetAppName()
{ ASSERT(afxCurrentAppName != NULL); return afxCurrentAppName; }

So two question: What is an assertion error really, and why am I
getting this error?

2. Please clarify the meaning of "OT"

Oct 27 '05 #3

P: n/a
Etayki wrote:
2. Please clarify the meaning of "OT"


Off-topic. Please refer to one of the MFC programming newsgroups.

Oct 27 '05 #4

P: n/a
"Etayki" <et*****@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi,

I am getting an assertion failure when declaring a CInternetSession
object:

CInternetSession mySession; // a session object

I am still able to run the program, but I receive that annoying
assertion failure dialog box and I have to click "ignore" each time.

How do I remedy the situation?

Any help is much appreciated.


The folks that can help you with MFC (a Microsoft
technology, not part of standard C++), can be found
at newsgroup:

microsoft.public.vc.mfc

If your news server doesn't have this group, you can
connect to Microsoft's news server, msnews.microsoft.com

When you do post there, you'll need to provide more
context (e.g. a small complete program that demonstrates
the problem).

Purpose of comp.lang.c++:
http://www.slack.net/~shiva/welcome.txt

-Mike
Oct 27 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.