Compartilhar via


CInternetException Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CInternetException Class.

Represents an exception condition related to an Internet operation.

Syntax

class CInternetException : public CException  

Members

Public Constructors

Name Description
CInternetException::CInternetException Constructs a CInternetException object.

Public Data Members

Name Description
CInternetException::m_dwContext The context value associated with the operation that caused the exception.
CInternetException::m_dwError The error that caused the exception.

Remarks

The CInternetException class includes two public data members: one holds the error code associated with the exception, and the other holds the context identifier of the Internet application associated with the error.

For more information about context identifiers for Internet applications, see the article Internet Programming with WinInet.

Inheritance Hierarchy

CObject

CException

CInternetException

Requirements

Header: afxinet.h

CInternetException::CInternetException

This member function is called when a CInternetException object is created.

CInternetException(DWORD dwError);

Parameters

dwError
The error that caused the exception.

Remarks

To throw a CInternetException, call the MFC global function AfxThrowInternetException.

CInternetException::m_dwContext

The context value associated with the related Internet operation.

DWORD_PTR m_dwContext;  

Remarks

The context identifier is originally specified in CInternetSession and passed by MFC to CInternetConnection- and CInternetFile-derived classes. You can override this default and assign any dwContext parameter a value of your choosing. dwContext is associated with any operation of the given object. dwContext identifies the operation's status information returned by CInternetSession::OnStatusCallback.

CInternetException::m_dwError

The error that caused the exception.

DWORD m_dwError;  

Remarks

This error value may be a system error code, found in WINERROR.H, or an error value from WININET.H.

For a list of Win32 error codes, see Error Codes. For a list of Internet-specific error messages, see . Both topics are in the Windows SDK.

See Also

CException Class
Hierarchy Chart
CException Class