WsAbortServiceHost function

Aborts all current operations on the specified service host.

Syntax


HRESULT WINAPI  WsAbortServiceHost(
  _In_     WS_SERVICE_HOST* serviceHost,
  _In_opt_ WS_ERROR*        error
);

Parameters

serviceHost [in]

Pointer to a WS_SERVICE_HOST structure representing the service host on which to abort operations.

error [in, optional]

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.

Return codeDescription
E_INVALIDARG

One or more arguments are invalid.

 

Remarks

WsAbortServiceHost aborts all listeners on the service host, and as a result, no new channels are accepted from the client. All channels currently being used by the service host to service messages are aborted as well.

If a call is pending and it has a cancel callback registered through the WsRegisterOperationForCancel function, the callback is called. However, the runtime still waits for the call to complete.

For more information on registering for cancellation notification, see WsRegisterOperationForCancel.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

WebServices.h

Library

WebServices.lib

DLL

WebServices.dll

 

 

Community Additions

ADD
Show: