CInternetSession::GetContext

DWORD GetContext( ) const;

Return Value

The application-defined context Identifier.

Remarks

Call this member function to get the context value for a particular application session. OnStatusCallback uses the context ID returned by GetContext to report the status of a particular application. For example, when a user activates an Internet request that involves returning status information, the status callback uses the context ID to report status on that particular request. If the user activates two separate Internet requests that both involve returning status information, OnStatusCallback uses the context identifiers to return status about their corresponding requests. Consequently, the context identifier is used for all status callback operations, and it is associated with the session until the session is ended.

For more information about asynchronous operations, see the article Internet First Steps: WinInet in Visual C++ Programmer’s Guide.

CInternetSession OverviewClass MembersHierarchy Chart

See Also   CInternetConnection, CInternetSession::EnableStatusCallback, CInternetSession::OnStatusCallback