This topic has not yet been rated - Rate this topic

HttpWaitForDisconnect function

Applies to: desktop apps only

The HttpWaitForDisconnect function notifies the application when the connection to an HTTP client is broken for any reason.

Syntax

ULONG HttpWaitForDisconnect(
  __in  HANDLE ReqQueueHandle,
  __in  HTTP_CONNECTION_ID ConnectionId,
  __in  LPOVERLAPPED pOverlapped
);

Parameters

ReqQueueHandle [in]

A handle to the request queue that handles requests from the specified connection. A request queue is created and its handle returned by a call to the HttpCreateRequestQueue function.

Windows Server 2003 with SP1 and Windows XP with SP2:  The handle to the request queue is created by the HttpCreateHttpHandle function.
ConnectionId [in]

Identifier for the connection to the client computer. This value is returned in the ConnectionID member of the HTTP_REQUEST structure by a call to the HttpReceiveHttpRequest function.

pOverlapped [in]

For asynchronous calls, set pOverlapped to point to an OVERLAPPED structure; for synchronous calls, set it to NULL.

A synchronous call blocks until the connection is broken, whereas an asynchronous call immediately returns ERROR_IO_PENDING and the calling application then uses GetOverlappedResult or I/O completion ports to determine when the operation is completed. For information about using OVERLAPPED structures for synchronization, see Synchronization and Overlapped Input and Output.

Return value

If the function succeeds, the return value is NO_ERROR.

If the function is used asynchronously, a return value of ERROR_IO_PENDING indicates that the next request is not yet ready and is retrieved later through normal overlapped I/O completion mechanisms.

If the function fails, the return value is one of the following error codes.

ValueMeaning
ERROR_INVALID_PARAMETER

One or more of the supplied parameters is in an unusable form.

Other

A system error code defined in WinError.h.

 

Requirements

Minimum supported client

Windows Vista, Windows XP with SP2

Minimum supported server

Windows Server 2003

Header

Http.h

Library

Httpapi.lib

DLL

Httpapi.dll

See also

HTTP Server API Version 1.0 Functions
HTTP_REQUEST

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ