WsWriteArray function (webservices.h)

This operation sends a series of elements to an XML Writer.

Syntax

HRESULT WsWriteArray(
  [in]           WS_XML_WRITER       *writer,
  [in]           const WS_XML_STRING *localName,
  [in]           const WS_XML_STRING *ns,
  [in]           WS_VALUE_TYPE       valueType,
                 const void          *array,
  [in]           ULONG               arraySize,
  [in]           ULONG               itemOffset,
  [in]           ULONG               itemCount,
  [in, optional] WS_ERROR            *error
);

Parameters

[in] writer

A pointer to the Writer where the elements are written.

[in] localName

A pointer to the localName of the repeating element.

[in] ns

A pointer to the namespace of the repeating element.

[in] valueType

The value type for the elements

array

A void pointer to the values written to writer. The size of the items is determined by value type.

Note  See WS_VALUE_TYPE for more information.

 

[in] arraySize

The total byte length of the array.

[in] itemOffset

The item offset within the array to write.

[in] itemCount

The total number of items to write from the array.

[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

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This function is semantically equivalent to using WsWriteStartElement, WsWriteValue and WsWriteEndElement in a loop, but is more efficient.

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