IXMLHTTPRequest2Callback::OnError method (msxml6.h)

Occurs when an error is encountered or the request has been aborted.

Syntax

HRESULT OnError(
  [in, optional] IXMLHTTPRequest2 *pXHR,
                 HRESULT          hrError
);

Parameters

[in, optional] pXHR

The initial HTTP request.

hrError

A code representing the error that occurred on the HTTP request.

Return value

Returns S_OK on success.

Note  This callback function must not throw exceptions.
 

Remarks

Unless the request completes successfully, indicated by OnResponseReceived, the call to OnError is the final callback. The client should perform any required cleanup including releasing references to the IXMLHTTPRequest2 object.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps],MSXML 6.0 and later
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header msxml6.h

See also

ISequentialStream Interface

IXMLHTTPRequest2Callback