WS_PULL_BYTES_CALLBACK callback function (webservices.h)

Used by the WsPullBytes function to request the data that should be written.

Syntax

WS_PULL_BYTES_CALLBACK WsPullBytesCallback;

HRESULT WsPullBytesCallback(
  [in]           void *callbackState,
                 void *bytes,
  [in]           ULONG maxSize,
  [out]          ULONG *actualSize,
  [in, optional] const WS_ASYNC_CONTEXT *asyncContext,
  [in, optional] WS_ERROR *error
)
{...}

Parameters

[in] callbackState

The user-defined state that was passed to WsPullBytes.

bytes

Where the data that is read should be placed.

[in] maxSize

The maximum number of bytes that may be read.

[out] actualSize

The actual number of bytes that were read. This may be less than maxSize. Returning 0 indicates that there is no more data.

[in, optional] asyncContext

Information on how to invoke the function asynchronously, or NULL if invoking synchronously.

[in, optional] error

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

Return value

Return code Description
WS_S_ASYNC
The asynchronous operation is still pending.

Remarks

Returning size of 0 indicates EOF.

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