Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WsAbortChannel function

Cancels all pending I/O for a specified channel

Syntax


HRESULT WINAPI  WsAbortChannel(
  _In_     WS_CHANNEL* channel,
  _In_opt_ WS_ERROR*   error
);

Parameters

channel [in]

A pointer to a WS_CHANNEL structure representing the channel for which to cancel I/O.

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
WS_E_NOT_SUPPORTED

See the Remarks section for platform limitations.

E_INVALIDARG

One or more arguments are invalid.

 

Remarks

Windows Server 2003 and before:  On Windows platforms before Windows Vista, this function is not supported for WS_UDP_CHANNEL_BINDING or WS_HTTP_CHANNEL_BINDING if the channel is in the WS_CHANNEL_STATE_ACCEPTING state and the listener has not already been aborted. (For information on channel bindings and channel states, see the WS_CHANNEL_BINDING and WS_CHANNEL_STATE enumerations.)

This function is also not supported for WS_HTTP_CHANNEL_BINDING with WS_CHANNEL_TYPE_REPLY when aborting a channel in the WS_CHANNEL_STATE_OPEN or WS_CHANNEL_STATE_FAULTED state. (For information on channel types, see the WS_CHANNEL_TYPE enumeration.

WsAbortChannel can be called for a channel in any state, and does not wait for pending I/O to complete before aborting the channel.

If the channel is in the WS_CHANNEL_STATE_OPEN state, WsAbortChannel causes the channel to fault to the WS_CHANNEL_STATE_FAULTED state.

Note  See WsAbandonMessage for information on how to skip a particular message and keep the channel open.
 
If called with valid parameters, this function will not fail for reasons such as a lack of system resources. However, note the limitations on some operating systems versions at the beginning of Remarks.

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

WebServices.h

Library

WebServices.lib

DLL

WebServices.dll

 

 

Community Additions

Show:
© 2016 Microsoft