ISettingsNamespace::CreateSettingByPath method (wcmconfig.h)

Creates a setting object specified by its path.

Syntax

HRESULT CreateSettingByPath(
  [in]  const WCHAR   *Path,
  [out] ISettingsItem **Setting
);

Parameters

[in] Path

The path of the setting object.

[out] Setting

A pointer to an ISettingsItem object that represents the created setting.

Return value

This method can return one of these values.

Return code Description
S_OK
Indicates success.
WCM_E_STATENODENOTFOUND
Indicates an attempt to create a new item that is not a list element.
WCM_E_INVALIDVALUE, WCM_E_INVALIDVALUEFORMAT, or WCM_E_INVALIDDATATYPE
Indicates an attempt to create a list item where the value provided for the key cannot be coerced to the appropriate type.
WCM_E_READONLYITEM
Indicates that the item cannot be written, either because it is a read-only item, or because the namespace was opened in ReadOnly mode.
WCM_E_INVALIDPATH
Indicates that the path is incorrectly formatted.
WCM_E_WRONGESCAPESTRING
Indicates that the path contains an unrecognized XML escape sequence.
WCM_E_INVALIDKEY
Indicates that the path is incorrectly specified and references the wrong key for a list item.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header wcmconfig.h
DLL SMIEngine.dll

See also

ISettingsNamespace