WsFillReader function (webservices.h)

Ensures that the reader has buffered the minimum byte count of XML data for use by subsequent reader functions. It will invoke the callback specified by WS_XML_READER_STREAM_INPUT as many times as necessary to obtain the number of bytes specified by the value of the minSize parameter. On completion the buffered data is available to other reader functions. If a subsequent reader function requires more data than what has been obtained the function will return a WS_E_QUOTA_EXCEEDED exception. (See Windows Web Services Return Values.)

Syntax

HRESULT WsFillReader(
  [in]           WS_XML_READER          *reader,
  [in]           ULONG                  minSize,
  [in, optional] const WS_ASYNC_CONTEXT *asyncContext,
  [in, optional] WS_ERROR               *error
);

Parameters

[in] reader

A pointer to a WS_XML_READER structure used for obtaining the data.

[in] minSize

Specifies the minimum number of bytes that the reader should have obtained. If the current byte count buffered is equal to or greater than the value of minSize the function will do nothing and will return immediately.

[in, optional] asyncContext

A pointer to a WS_ASYNC_CONTEXT data structure with information about invoking the function asynchronously. A NULL value indicates a request for synchronous operation.

[in, optional] error

A pointer to a WS_ERROR object where additional information about the error should be stored if the function fails.

Return value

This function can return one of these values.

Return code Description
WS_S_ASYNC
The asynchronous operation is still pending.

Remarks

The number of bytes required to read a particular segment of XML data depends upon the encoding and its formatting.

This function is a "no-op" when used with a reader using WS_XML_READER_BUFFER_INPUT.

By specifying a WS_ASYNC_CONTEXT the data is read asynchronously.

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