WSDXMLBuildAnyForSingleElement function (wsdutil.h)

Creates an XML element with a specified name and value. The created element can be used as the child of an XML any element.

Syntax

HRESULT WSDXMLBuildAnyForSingleElement(
  [in]  WSDXML_NAME    *pElementName,
  [in]  LPCWSTR        pszText,
  [out] WSDXML_ELEMENT **ppAny
);

Parameters

[in] pElementName

Reference to a WSDXML_NAME structure that contains the name of the created element.

[in] pszText

The text value of the created element.

[out] ppAny

Reference to a WSDXML_ELEMENT that contains the created element. ppAny must be freed with a call to WSDFreeLinkedMemory.

Return value

This function can return one of these values.

Return code Description
S_OK
Method completed successfully.
E_INVALIDARG
pElementName is NULL or the length in characters of pszText exceeds WSD_MAX_TEXT_LENGTH (8192).
E_POINTER
ppAny is NULL.
E_OUTOFMEMORY
Insufficient memory to complete the operation.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header wsdutil.h (include Wsdapi.h)
Library Wsdapi.lib
DLL Wsdapi.dll