ISettingsItem::RemoveSettingByPath method (wcmconfig.h)

Removes a setting object specified by its path. Unlike GetSettingByPath, the use of ISettingsItem::RemoveSettingByPath is not advocated for attributes.

Syntax

HRESULT RemoveSettingByPath(
  [in] const WCHAR *Path
);

Parameters

[in] Path

The path of the item to remove. The path is relative to the current item.

Return value

This method can return one of these values.

Return code Description
S_OK
Indicates success.
WCM_E_STATENODENOTFOUND
Indicates an attempt to remove an item that does not exist.
HRESULT_FROM_WIN32 (ERROR_INVALID_OPERATION)
Indicates an attempt to remove an element that is not a list element.
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_WRONGESCAPESTRING
Indicates that the path contains an unrecognized XML escape sequence.
WCM_E_INVALIDPATH
Indicates that the path is incorrectly formatted.
WCM_E_INVALIDKEY
Indicates that the path is incorrectly specified and references the wrong key for the 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

ISettingsItem