WsReadBytes function (webservices.h)

Reads text from the Reader and decodes the characters as bytes according to the base64 specification.

Syntax

HRESULT WsReadBytes(
  [in]           WS_XML_READER *reader,
                 void          *bytes,
  [in]           ULONG         maxByteCount,
  [out]          ULONG         *actualByteCount,
  [in, optional] WS_ERROR      *error
);

Parameters

[in] reader

A pointer to the XML Reader from which the bytes should be read. The pointer must reference a valid WS_XML_READER object.

bytes

A pointer to a location to place the decoded bytes.

[in] maxByteCount

The maximum number of bytes that should be read.

[out] actualByteCount

A pointer to a ULONG value of the actual number of bytes that were read. This may be less than maxByteCount even when there are more bytes remaining.

[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_E_INVALID_FORMAT
The input data was not in the expected format or did not have the expected value.
WS_E_QUOTA_EXCEEDED
A quota was exceeded.

Remarks

Text is read up to either a start element or end element. Comments are skipped, and CDATA content is treated identically to element content.

This function can fail for any of the reasons listed in WsReadNode.

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