Assertion Failure

E

Etayki

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
 
R

red floyd

Etayki said:
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++
 
E

Etayki

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"
 
M

Mike Wahler

Etayki said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top