Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WsReadArray function

Reads a series of elements from the reader and interprets their content according to the specified value type.

Syntax


HRESULT WINAPI  WsReadArray(
  _In_     WS_XML_READER*       reader,
  _In_     const WS_XML_STRING* localName,
  _In_     const WS_XML_STRING* ns,
  _In_     WS_VALUE_TYPE        valueType,
           void*                array,
  _In_     ULONG                arraySize,
  _In_     ULONG                itemOffset,
  _In_     ULONG                itemCount,
  _Out_    ULONG*               *actualItemCount,
  _In_opt_ WS_ERROR*            error
);

Parameters

reader [in]

The reader from which the array should be read.

localName [in]

The localName of the repeating element.

ns [in]

The namespace of the repeating element.

valueType [in]

The value type to use to parse the content of each element.

array

The array to populate with parsed values. The size of the array items is determined by the value type. See WS_VALUE_TYPE for more information.

arraySize [in]

The size in bytes (not items) of the array.

itemOffset [in]

The item (not byte) offset within the array at which to read.

itemCount [in]

The number of items (not bytes) to read into the array.

actualItemCount [out]

The actual number of items that were read. This may be less than itemCount even when there are more items remaining. There are no more elements when this returns zero.

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
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

This function is semantically equivalent to using WsReadStartElement, WsReadValue and WsReadEndElement in a loop, but is more efficient.

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

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

Show:
© 2016 Microsoft