Expand Minimize

WsFreeChannel function

Releases the memory resource associated with a Channel object. The Channel must be in the either the WS_CHANNEL_STATE_CREATED or WS_CHANNEL_STATE_CLOSED state to be released. If a Channel has been successfully opened it must be closed before it can be released.

Syntax


void WINAPI  WsFreeChannel(
  _In_  WS_CHANNEL* channel
);

Parameters

channel [in]

A pointer to the Channel object to release. The pointer must reference a valid WS_CHANNEL object returned by WsCreateChannel or WsCreateChannelForListener. The referenced value may not be NULL.

Return value

This function does not return a value.

Security

Freeing a channel that is not in the WS_CHANNEL_STATE_CREATED or WS_CHANNEL_STATE_CLOSED states will cause an access violation. There may still be IO pending for the channel if the channel is not in one of these states.

Remarks

A channel that is in the process of being accepted/opened cannot be released until the accept/open completes. Use WsAbortChannel to cancel the accept/open process.

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

ADD
Show:
© 2014 Microsoft