Skip to content

Latest commit

 

History

History
152 lines (115 loc) · 5.26 KB

nf-webservices-wscreatechannel.md

File metadata and controls

152 lines (115 loc) · 5.26 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:webservices.WsCreateChannel
WsCreateChannel function (webservices.h)
Creates a channel for message exchange with an endpoint.
WsCreateChannel
WsCreateChannel function [Web Services for Windows]
webservices/WsCreateChannel
wsw.wscreatechannel
wsw\wscreatechannel.htm
wsw
4bef6f97-06f1-442a-8b84-869776f0541d
12/05/2018
WsCreateChannel, WsCreateChannel function [Web Services for Windows], webservices/WsCreateChannel, wsw.wscreatechannel
webservices.h
Windows
Windows 7 [desktop apps \| UWP apps]
Windows Server 2008 R2 [desktop apps \| UWP apps]
WebServices.lib
WebServices.dll
Windows
19H1
WsCreateChannel
webservices/WsCreateChannel
c++
APIRef
kbSyntax
DllExport
WebServices.dll
WsCreateChannel

WsCreateChannel function

-description

Creates a channel for message exchange with an endpoint.

-parameters

-param channelType [in]

The type of the channel. For channel types, see the WS_CHANNEL_TYPE enumeration. This represents the message exchange pattern for the channel being created.

-param channelBinding [in]

The channel binding, indicating the protocol stack to use for the new channel. For available channel bindings, see the WS_CHANNEL_BINDING enumeration.

-param properties [in]

An array of WS_CHANNEL_PROPERTY structures containing optional values for channel initialization. The value of this parameter may be NULL, in which case, the propertyCount parameter must be 0 (zero).

For information on which channel properties can be specified when you create a channel, see the WS_CHANNEL_PROPERTY_ID enumeration.

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

-param propertyCount [in]

The number of properties in the properties array.

-param securityDescription [in, optional]

Pointer to a WS_SECURITY_DESCRIPTION structure specifying the security for the channel.

If you are creating a custom channel (using the WS_CUSTOM_CHANNEL_BINDING value of the WS_CHANNEL_BINDING enumeration), the security description must be NULL. See the Remarks section.

-param channel

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

-param error [in, optional]

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

-returns

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

Return code Description
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

Use the WsOpenChannel function to initiate communication on the channel and to specify the endpoint.

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
(See the WS_CHANNEL_PROPERTY_ID enumeration) If initial properties are required to create the custom channel, specify them by using the WS_CHANNEL_PROPERTY_CUSTOM_CHANNEL_PARAMETERS property.

To pass security information to a custom channel implementation, use the WS_CHANNEL_PROPERTY_CUSTOM_CHANNEL_PARAMETERS value of the WS_CHANNEL_PROPERTY_ID enumeration.