WsCall function (webservices.h)

Used internally by the service proxy to format the specified arguments according to the specified metadata and send them in a message. The application should never call this function directly.

Syntax

HRESULT WsCall(
  [in]           WS_SERVICE_PROXY               *serviceProxy,
  [in]           const WS_OPERATION_DESCRIPTION *operation,
  [in, optional] const void                     **arguments,
  [in]           WS_HEAP                        *heap,
                 const WS_CALL_PROPERTY         *callProperties,
  [in]           const ULONG                    callPropertyCount,
  [in, optional] const WS_ASYNC_CONTEXT         *asyncContext,
  [in, optional] WS_ERROR                       *error
);

Parameters

[in] serviceProxy

Pointer to a WS_SERVICE_PROXY structure representing the service proxy.

[in] operation

Pointer to a WS_OPERATION_DESCRIPTION structure containing the metadata for the call.

[in, optional] arguments

An array of pointers to the individual arguments for the service operation being represented by the operation parameter.

The number of elements must correspond to the number of parameters specified as part of WS_OPERATION_DESCRIPTION in the operation parameter.

[in] heap

Pointer to a WS_HEAP structure representing the heap from which memory is allocated for the call.

callProperties

An array of WS_CALL_PROPERTY structures containing the call properties.

[in] callPropertyCount

The number of properties in the call properties array.

[in, optional] asyncContext

Pointer to information for invoking the function asynchronously. Pass NULL to invoke the function synchronously.

[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
WS_E_INVALID_OPERATION
The operation is not allowed due to the current state of the object.
WS_E_QUOTA_EXCEEDED
A quota was exceeded.
WS_E_OPERATION_ABANDONED
The operation was abandoned.
WS_E_OPERATION_TIMED_OUT
The operation did not complete within the time allotted.
E_OUTOFMEMORY
Insufficient memory to complete the operation.
E_INVALIDARG
One or more arguments are invalid.
WS_S_ASYNC
The asynchronous operation is still pending.
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