OnError Event (Windows 8)

 

Occurs when a client receives part of the HTTP response data from the server.

C/C++ Syntax

HRESULT OnDataAvailable(  
        IXMLHTTPRequest2 *pXHR,  
        HRESULT hrError);  

Parameters

pXHR[in]
The initial HTTP request.

hrError[in]
A code representing the error that occurred on the HTTP request.

Return Values

S_OK
The value returned if successful.

Remarks

Custom streams receive a call to ISequentialStream::Write before OnDataAvailable is fired. The client can process data directly from the Write call instead of calling Read on the custom stream, and it can rely on the Write call to indicate that new data is available.

Unless the request completes successfully occurs, the call to OnError is the final callback. The client should perform any required cleanup including releasing references to the IXMLHTTPRequest2 object unless the client plans to reuse that object.

Versioning

Implemented in: MSXML 6.0

Applies to

IXMLHTTPRequest2 (Windows 8)

See Also

ISequentialStream::Read
ISequentialStream::Write