WsCreateServiceProxy function (webservices.h)

Creates a service proxy with the specified properties.

Syntax

HRESULT WsCreateServiceProxy(
  [in]           const WS_CHANNEL_TYPE         channelType,
  [in]           const WS_CHANNEL_BINDING      channelBinding,
  [in, optional] const WS_SECURITY_DESCRIPTION *securityDescription,
                 const WS_PROXY_PROPERTY       *properties,
  [in]           const ULONG                   propertyCount,
                 const WS_CHANNEL_PROPERTY     *channelProperties,
  [in]           const ULONG                   channelPropertyCount,
                 WS_SERVICE_PROXY              **serviceProxy,
  [in, optional] WS_ERROR                      *error
);

Parameters

[in] channelType

A WS_CHANNEL_TYPE enumeration value representing the channel type for the service proxy.

[in] channelBinding

A WS_CHANNEL_BINDING enumeration value representing the channel binding.

[in, optional] securityDescription

A WS_SECURITY_DESCRIPTION structure representing the security description.

properties

An array of WS_PROXY_PROPERTY structures containing optional properties for the service proxy.

The value of this parameter may be NULL, in which case, the propertyCount parameter must be 0 (zero).

[in] propertyCount

The number of properties in the properties array.

channelProperties

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

Note  Be very careful about modifying the default values for these properties.
 

[in] channelPropertyCount

The number of properties in the channelProperties array.

serviceProxy

On success, a pointer that receives the address of the WS_SERVICE_PROXY structure representing the new service proxy.

When you no longer need this structure, you must free it by calling WsFreeServiceProxy.

[in, optional] error

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 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.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header webservices.h
Library WebServices.lib
DLL WebServices.dll