WSDXMLBuildAnyForSingleElement function

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 STDAPI WSDXMLBuildAnyForSingleElement(
  _In_        WSDXML_NAME    *pElementName,
  _In_  const LPCWSTR        *pszText,
  _Out_       WSDXML_ELEMENT **ppAny
);

Parameters

pElementName [in]

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

pszText [in]

The text value of the created element.

ppAny [out]

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

WsdUtil.h (include Wsdapi.h)

Library

Wsdapi.lib

DLL

Wsdapi.dll

 

 

Community Additions

ADD
Show: