WS_READ_CALLBACK callback function (webservices.h)

Used by the WS_XML_READER to read from some source into a buffer.

Syntax

WS_READ_CALLBACK WsReadCallback;

HRESULT WsReadCallback(
  [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

A void pointer to the user-defined state value that was passed to the function that accepted this callback.

bytes

A void pointer to the location where the data should be placed.

[in] maxSize

The maximum number of bytes that may be read.

[out] actualSize

A pointer to a ULONG value that indicates the number of bytes actually read. This may be less than maxSize. Returning 0 indicates that there is no more data.

[in, optional] asyncContext

A pointer to a WS_ASYNC_CONTEXT structure containing information on how to invoke the function asynchronously. Assigned NULL if invoking synchronously.

[in, optional] error

A pointer to WS_ERROR data structure where additional error information should be stored if the function fails.

Return value

This callback function does not return a value.

Remarks

Returning size of 0 in the actualSize output parameter indicates the end of the file.

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