Dela via


CHttpFile::EndRequest

Call this member function to end a request sent to an HTTP server with the SendRequestEx member function.

BOOL EndRequest(
   DWORD dwFlags = 0,
   LPINTERNET_BUFFERS lpBuffIn = NULL,
   DWORD_PTR dwContext = 1 
);

Parameters

  • dwFlags
    Flags describing the operation. For a list of the appropriate flags, see HttpEndRequest in the Windows SDK.

  • lpBuffIn
    Pointer to an initialized INTERNET_BUFFERS that describes the input buffer used for the operation.

  • dwContext
    The context identifier for the CHttpFile operation. See Remarks for more information about this parameter.

Return Value

Nonzero if successful; otherwise 0. If the call fails, determine the cause of the failure by examining the thrown CInternetException object.

Remarks

The default value for dwContext is sent by MFC to the CHttpFile object from the CInternetSession object that created the CHttpFile object. When you call CInternetSession::OpenURL or CHttpConnection to construct a CHttpFile object, you can override the default to set the context identifier to a value of your choosing. The context identifier is returned to CInternetSession::OnStatusCallback to provide status on the object with which it is identified. See article Internet First Steps: WinInet for more information about the context identifier.

Exceptions

This method can throw exceptions of type CInternetException*.

Requirements

Header: afxinet.h

See Also

Reference

CHttpFile Class

Hierarchy Chart

CInternetFile Class

Other Resources

CHttpFile Members