WsAbortListener function (webservices.h)

Cancels any pending I/O for the specified listener.

Syntax

HRESULT WsAbortListener(
  [in]           WS_LISTENER *listener,
  [in, optional] WS_ERROR    *error
);

Parameters

[in] listener

Pointer to a WS_LISTENER structure representing the listener for which to cancel I/O.

[in, optional] error

Pointer to a WS_ERROR structure that receives additional error information if the function fails.

Return value

If the function succeeds, it returns NO_ERROR; otherwise, it returns an HRESULT error code.

Remarks

WsAbortListener can be called when the listener is in any state. (See the WS_LISTENER_STATE enumeration for possible states.) If the listener is in the WS_LISTENER_STATE_OPEN state, this function will force the listener to fault (reset to the WS_LISTENER_STATE_FAULTED state). When a listener is faulted, all attempts to accept a message from it fail immediately with the WS_E_OBJECT_FAULTED error code.

This function does not wait for pending I/O to complete.

If called with valid parameters, this function will not fail for reasons such as a lack of system resources.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header webservices.h
Library WebServices.lib
DLL WebServices.dll