IWinHttpRequestEvents interface

The IWinHttpRequestEvents interface provides events for Microsoft Windows HTTP Services (WinHTTP). It uses only event methods.


The IWinHttpRequestEvents interface inherits from the IUnknown interface. IWinHttpRequestEvents also has these types of members:


The IWinHttpRequestEvents interface has these methods.

Method Description
OnError Occurs when there is a run-time error in the application.
OnResponseDataAvailable Occurs when data is available from the response.
OnResponseFinished Occurs when the response data is complete.
OnResponseStart Occurs when the response data starts to be received.


The following procedure describes how to register for notifications.

  1. Get an IConnectionPointContainer interface by calling QueryInterface on an IWinHttpRequest object.
  2. Call FindConnectionPoint on the returned interface and pass IID_IWinHttpRequestEvents to riid.
  3. Call Advise on the returned connection point and pass a pointer to an IUnknown interface on an object that implements IWinHttpRequestEvents to pUnk.

Notifications can be terminated by calling Unadvise on the connection point returned in step 2.

To view some code that registers for COM notifications, see the Client section of the COM Connection Points article.


For Windows XP and Windows 2000, see the Run-Time Requirements section of the WinHTTP Start Page.


Requirement Value
Minimum supported client
Windows XP, Windows 2000 Professional with SP3 [desktop apps only]
Minimum supported server
Windows Server 2003, Windows 2000 Server with SP3 [desktop apps only]
WinHTTP 5.0 and Internet Explorer 5.01 or later on Windows XP and Windows 2000.

See also


WinHTTP Versions