WS_CREATE_CHANNEL_CALLBACK callback function (webservices.h)

Handles the WsCreateChannel call for a WS_CUSTOM_CHANNEL_BINDING.

Syntax

WS_CREATE_CHANNEL_CALLBACK WsCreateChannelCallback;

HRESULT WsCreateChannelCallback(
  [in]           WS_CHANNEL_TYPE channelType,
                 const void *channelParameters,
  [in]           ULONG channelParametersSize,
                 void **channelInstance,
  [in, optional] WS_ERROR *error
)
{...}

Parameters

[in] channelType

The message exchange pattern of the channel.

If the type of channel is not supported by the custom channel implementation, E_INVALIDARG should be returned.

channelParameters

The pointer to the value that was specified by the WS_CHANNEL_PROPERTY_CUSTOM_CHANNEL_PARAMETERS property when the custom channel is created using WsCreateChannel.

If the WS_CHANNEL_PROPERTY_CUSTOM_CHANNEL_PARAMETERS property was not specified, the value will be NULL.

[in] channelParametersSize

The size in bytes of the value pointed to by channelParameters.

If the WS_CHANNEL_PROPERTY_CUSTOM_CHANNEL_PARAMETERS property was not specified, the size will be 0.

channelInstance

A pointer to a structure allocated by the callback that contains the data specific to this channel instance. This pointer will be passed to all the other channel callbacks for this particular channel instance.

If this callback is successful, then the WS_FREE_CHANNEL_CALLBACK will be used to free the channel instance returned in this parameter.

[in, optional] error

Specifies where additional error information should be stored if the function fails.

Return value

Return code Description
E_INVALIDARG
One or more arguments are invalid.
E_OUTOFMEMORY
Ran out of memory.
Other Errors
This function may return other errors not listed above.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header webservices.h