How do I include CInternetSession?  
Author Message
vicarious





PostPosted: Visual C++ General, How do I include CInternetSession? Top

CInternetSession requires the "afxwin.h" header file to be included. If i put #include "afxwin.h"
at the beginning of my program i get an error message saying that "afxwin.h" doesn't exist. If I do not type this it can't find any of the CInternetSession functions. What do I need to include/do in order to use CInternetSession


Visual C++7  
 
 
Viorel.





PostPosted: Visual C++ General, How do I include CInternetSession? Top

This class actually seems to be located in "afxinet.h" header file, and you should use "< >" syntax: #include <afxinet.h>.

The file belongs to MFC library, which probably is not delivered with any version of Visual Studio. You should be sure your Visual Studio contains files related to MFC (make a search for "afxinet.h" file). If you are sure the MFC library is included into your Visual Studio, then the problem can be caused by missing files or incorrect configuration of Visual Studio. There is an important "VC++ Directories" value in Options dialog.

If you do not have MFC, then I am afraid you have to deal with Windows functions instead, like WinHTTPOpen.


 
 
Simple Samples





PostPosted: Visual C++ General, How do I include CInternetSession? Top

As Viorel indicates, CInternetSession is an MFC class. You should create a project for your MFC application. In other words, begin your project by creating a starter application that uses MFC. Then you will have details such as an #include for afxwin.h done for you.

Unless you have the Express Edition. If you do, then you should ask in the forum for it. I think that MFC is not provided with the Express Edition.



 
 
Simple Samples





PostPosted: Visual C++ General, How do I include CInternetSession? Top

 
The file belongs to MFC library, which probably is not delivered with any version of Visual Studio.
You seem to be very unfamiliar with VC. MFC has been in every version of VC since about version 2; as best as I can remember MFC was in version 1 of VC. Microsoft has recently begun omitting MFC from some editions of VC, such as the Express Edition.

 
 
Damien Watkins - MSFT





PostPosted: Visual C++ General, How do I include CInternetSession? Top

Hello

Re: How do I include CInternetSession

The more appropriate place for your question is probably the MFC newsgroup: http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.vc.mfc&lang=en&cr=US

OTP

Thanks

Damien