WS_GET_CHANNEL_PROPERTY_CALLBACK callback function (webservices.h)

Handles the WsGetChannelProperty call for a WS_CUSTOM_CHANNEL_BINDING.

Syntax

WS_GET_CHANNEL_PROPERTY_CALLBACK WsGetChannelPropertyCallback;

HRESULT WsGetChannelPropertyCallback(
  [in]           void *channelInstance,
  [in]           WS_CHANNEL_PROPERTY_ID id,
                 void *value,
  [in]           ULONG valueSize,
  [in, optional] WS_ERROR *error
)
{...}

Parameters

[in] channelInstance

The pointer to the state specific to this channel instance, as created by the WS_CREATE_CHANNEL_CALLBACK.

[in] id

The id of the property to retrieve.

value

The location to store the retrieved property. The pointer must have an alignment compatible with the type of the property.

[in] valueSize

The number of bytes allocated by the caller to store the retrieved property.

[in, optional] error

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

Return value

Return code Description
E_INVALIDARG
The property id was not supported for this object or the specified buffer was not large enough for the value.
E_OUTOFMEMORY
Ran out of memory.
Other Errors
This function may return other errors not listed above.

Remarks

See WsGetChannelProperty for information about the contract of this API.

Every custom channel implementation must support returning a value for at least the following properties:

Service Model layer provides its own logic of call timeouts as such it requires disabling timeouts in the underlying channel. In order for a custom channel to be used from Service Model layer, it should support disabling all of its timeouts and implement this callback for WS_CHANNEL_PROPERTY_ENABLE_TIMEOUTS. A custom channel cannot be used through Service Model unless query for WS_CHANNEL_PROPERTY_ENABLE_TIMEOUTS returns FALSE.

It is up to the custom channel implementation to determine any additional properties it wishes to support.

If a property is not supported, the E_INVALIDARG should be returned. (See Windows Web Services Return Values.)

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