HttpShutdownRequestQueue function (http.h)
The HttpShutdownRequestQueue function stops queuing requests for the specified request queue process. Outstanding calls to HttpReceiveHttpRequest are canceled.
HTTPAPI_LINKAGE ULONG HttpShutdownRequestQueue( [in] HANDLE RequestQueueHandle );
The handle to the request queue that is shut down. A request queue is created and its handle returned by a call to the HttpCreateRequestQueue function.
If the function succeeds, it returns NO_ERROR
If the function fails, it returns one of the following error codes.
The ReqQueueHandle parameter does not contain a valid request queue.
The application does not have permission to shut down the request queue.
HttpShutdownRequestQueue cancels outstanding requests and stops all processing on the request queue process. The following steps are performed when this function is called:
- The request queue process is marked for cleanup and no new requests are routed to the request queue process.
- If the calling process is a controller, outstanding HttpWaitForDemandStart calls are canceled.
- Pending HttpReceiveHttpRequest calls from the calling process are canceled.
- Requests that are already bound to the calling process are canceled.
- The unreceived pending requests that are queued to the request queue process rerouted to another request queue process. If no other request queue process is available, the pending requests are saved until the request queue is closed, or another non-controller request queue process launches.
- Pending HttpWaitForDisconnect calls initiated by the calling process are canceled.
- Outstanding responses indicated by the calling process are not affected, they are properly completed.
Be aware that if the request queue handle is shared by multiple processes, HttpShutdownRequestQueue limits cleanup to the calling process. Other processes currently working on the request queue are not affected.
HttpShutdownRequestQueue can be used by applications to recycle request queue processes. For this purpose, HttpShutdownRequestQueue is called prior to terminating a process that shares the request queue with other processes. After HttpShutdownRequestQueue returns, the process can be safely terminated or recycled.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|