2019-06-10 11:56:55 -07:00

3.7 KiB
Raw Blame History

title, description, ms.assetid, ms.reviewer, manager, ms.author, ms.topic, ms.prod, ms.technology, author, ms.date
title description ms.assetid ms.reviewer manager ms.author ms.topic ms.prod ms.technology author ms.date
ICSPNode Add ICSPNode Add 5f03d350-c82b-4747-975f-385fd8b5b3a8 dansimp dansimp article w10 windows manikadhiman 06/26/2017

ICSPNode::Add

This method adds an immediate child node to a configuration service provider node and returns a pointer to the new node.

Syntax

HRESULT Add([in] IConfigManager2URI* pChildName,
            [in] CFG_DATATYPE DataType,
            [in] VARIANT varValue, 
            [in, out] ICSPNode** ppNewNode, 
            [in, out] DWORD* pgrfNodeOptions);

Parameters

pChildName
      Name of child node to add.

DataType
      Data type of the child node to add. Supported types include:

  • CFG_DATATYPE_NODE

  • CFG_DATATYPE_NULL

  • CFG_DATATYPE_BINARY

  • CFG_DATATYPE_INTEGER

  • CFG_DATATYPE_STRING

  • CFG_DATATYPE_MULTIPLE_STRING

varValue
      Value of the child node to add.

ppNewNode
      New child node to return.

pgrfNodeOptions
      Features supported on the new child node.

Feature name Bit value (in hex) Notes

CSPNODE_OPTION_NATIVESECURITY

0x01

The native security option signifies that the node handles its own security checking, and that ConfigManager2 does not have to manage security for this node.

CSPNODE_OPTION_INTERNALTRANSACTION

0x02

The internal transactioning option tells ConfigManager2 that the configuration service provider handles the transactioning (rollback and commitment) for the node. To handle internal transactioning, the node must implement the ICSPNodeTransactioning.

CSPNODE_OPTION_HANDLEALLPROPERTIES

0x04

Unused.

CSPNODE_OPTION_SECRETDATA

0x08

Unused.

Return Value

This method returns an ICSPNode and the feature options supported on that child node. If the method returns null, call GetLastError to get the error value.

A value of S_OK indicates that a node was successfully found. CMN_E_ALREADY_EXISTS indicates that a child node with the same name already exists. CFGMGR_E_COMMANDNOTALLOWED indicates that this node does not support the Add method.

Remarks

For externallytransactioned nodes, if this method is implemented, then ICSPNode::Clear and ICSPNode::DeleteChild must also be implemented or rollback will fail.

Requirements

Header: None

Create a custom configuration service provider