IWSDXMLContext::SetNamespaces method (wsdxml.h)

Associates custom namespaces with the XML context object.

This method should only be called by generated code, and should not be called directly by a WSDAPI client. Instead, the code generator will provide wrappers that access this method properly.

Syntax

HRESULT SetNamespaces(
  [in] const PCWSDXML_NAMESPACE *pNamespaces,
  [in] WORD                     wNamespacesCount,
  [in] BYTE                     bLayerNumber
);

Parameters

[in] pNamespaces

An array of WSDXML_NAMESPACE structures.

[in] wNamespacesCount

The number of namespaces in the pNamespaces array.

[in] bLayerNumber

The layer number associated with the generated service code.

Return value

Possible return values include, but are not limited to, the following:

Return code Description
S_OK
Method completed successfully.
E_INVALIDARG
pNamespaces is NULL or bLayerNumber is greater than or equal to WSD_XMLCONTEXT_NUM_LAYERS (16).
E_OUTOFMEMORY
Insufficient memory to complete the operation.
E_FAIL
The method failed.

Requirements

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

See also

IWSDXMLContext