Windows Dev Center

Expand Minimize

WsReadXmlBufferFromBytes function

Uses a reader to convert a set of encoded bytes to a WS_XML_BUFFER.

Syntax


HRESULT WINAPI  WsReadXmlBufferFromBytes(
  _In_     WS_XML_READER*                reader,
  _In_opt_ const WS_XML_READER_ENCODING* encoding,
           const WS_XML_READER_PROPERTY* properties,
  _In_     ULONG                         propertyCount,
           const void*                   bytes,
  _In_     ULONG                         byteCount,
  _In_     WS_HEAP*                      heap,
           WS_XML_BUFFER**               xmlBuffer,
  _In_opt_ WS_ERROR*                     error
);

Parameters

reader [in]

The reader to use to parse the encoded bytes.

encoding [in, optional]

The encoding to use when parsing the bytes. If NULL, a WS_XML_READER_TEXT_ENCODING with a charset of WS_CHARSET_AUTO will be used.

properties

An array of optional properties of the reader. See WS_XML_READER_PROPERTY.

propertyCount [in]

The number of properties.

bytes

The bytes to parse.

byteCount [in]

The number of bytes to parse.

heap [in]

The heap from which to allocate the XML buffer.

xmlBuffer

The XML buffer into which the bytes were read is returned here.

error [in, optional]

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

Return value

This function can return one of these values.

Return codeDescription
E_INVALIDARG

One or more arguments are invalid.

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.

 

Remarks

The function will parse the entire contents according to the specified encoding and store it into a WS_XML_BUFFER.

The reader will be left in an undefined state after calling this function. However, WsReadXmlBufferFromBytes may be used again with such a reader. Otherwise, WsSetInput or WsSetInputToBuffer should be used to bring the reader back to a known state, or the reader should be freed using WsFreeReader.

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

WebServices.h

Library

WebServices.lib

DLL

WebServices.dll

 

 

Community Additions

ADD
Show:
© 2015 Microsoft