Share via


IConfigManager::ProcessXML (Compact 2013)

3/26/2014

This method starts processing XML to configure settings on the device.

Syntax

virtual HRESULT STDMETHODCALLTYPE ProcessXML( 
    BSTR *pbstrXML,
    DWORD dwFlags
) = 0;

Parameters

  • pbstrXML
    [in, out] The XML buffer that contains the settings to update.
  • dwFlags
    [in] One or more of the following action flags.

    Flag

    Value

    Description

    CFGFLAG_PROCESS

    0x0001

    The configuration management service and configuration service providers process the XML input data.

    CFGFLAG_METADATA

    0x0002

    The configuration management service gathers and returns metadata for any XML <parm> elements it finds.

Return Value

Returns an HRESULT that returns NOERROR if successful; otherwise, returns one of the following return values.

Error code

Description

E_INVALIDARG

The XML is invalid.

E_OUTOFMEMORY

Exceeded available memory.

CONFIG_E_TRANSACTIONINGFAILURE

The commit/rollback operation did not succeed.

Remarks

The XML markup in the buffer must conform to a particular configuration service provider. For more information, see Configuration Service Provider Reference.

Example Code

Description

The following example code shows how to use the ProcessXML method to process input XML for the Clock configuration service provider.

Important

For readability, the following code example does not contain security checking or error handling. Do not use the following code in a production environment.

Code

#include "cfgmgr.h"

TCHAR szClockQuery[] = TEXT("<wap-provisioningdoc><characteristic type=\"Clock\"><parm-query name=\"Time\"/></characteristic></wap-provisioningdoc>");

hr = CoCreateInstance(__uuidof(CConfigManager), NULL,
        CLSCTX_INPROC_SERVER, __uuidof(IConfigManager),
        (LPVOID*)&pConfigMgr);
CHR(hr);

hr = pConfigMgr->ProcessXML(&szClockQuery, CFGFLAG_PROCESS);
CHR(hr);

Requirements

Header

cfgmgr.h

sysgen

SYSGEN_CONFIGMGR

See Also

Reference

IConfigManager
IConfigManager::ProcessDocument