WsReadArray function (webservices.h)
Reads a series of elements from the reader and interprets their content according to the specified value type.
Syntax
HRESULT 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, optional] WS_ERROR *error
);
Parameters
[in] reader
The reader from which the array should be read.
[in] localName
The localName of the repeating element.
[in] ns
The namespace of the repeating element.
[in] valueType
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.
[in] arraySize
The size in bytes (not items) of the array.
[in] itemOffset
The item (not byte) offset within the array at which to read.
[in] itemCount
The number of items (not bytes) to read into the array.
[out] actualItemCount
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.
[in, optional] error
Specifies where additional error information should be stored if the function fails.
Return value
This function can return one of these values.
Return code | Description |
---|---|
|
The input data was not in the expected format or did not have the expected value. |
|
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
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 |