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.

WsCreateChannelForListener function

Creates a channel associated with a specified listener.

Syntax


HRESULT WINAPI  WsCreateChannelForListener(
  _In_     WS_LISTENER*               listener,
           const WS_CHANNEL_PROPERTY* properties,
  _In_     ULONG                      propertyCount,
           WS_CHANNEL**               channel,
  _In_opt_ WS_ERROR*                  error
);

Parameters

listener [in]

Pointer to a WS_LISTENER structure representing the listener for which to create a channel. The listener can be in any state. (For listener states, see the WS_LISTENER_STATE enumeration.)

properties

An array of WS_CHANNEL_PROPERTY structures containing optional values for channel initialization. This can be a NULL, in which case, the propertyCount parameter must be 0 (zero).

For information on creating a custom channel, see the Remarks section.

propertyCount [in]

The number of properties in the properties array.

channel

On success, a pointer that receives the address of the created channel. When the channel is no longer needed, you must free it by calling WsFreeChannel.

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.

E_OUTOFMEMORY

Insufficient memory to complete the operation.

Other Errors

This function may return other errors not listed above.

 

Remarks

To accept an incoming message exchange, call the WsAcceptChannel function.

The security characteristics of the channel are the same as those specified for the listener.

When you create a custom channel (using the WS_CUSTOM_CHANNEL_BINDING value of the WS_CHANNEL_BINDING enumeration), you can specify only the following channel properties:

  • WS_CHANNEL_PROPERTY_CUSTOM_CHANNEL_CALLBACKS
  • WS_CHANNEL_PROPERTY_CUSTOM_CHANNEL_PARAMETERS
If initial properties are required to create the custom channel, specify them by using the WS_CHANNEL_PROPERTY_CUSTOM_CHANNEL_PARAMETERS property.

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

Show:
© 2017 Microsoft