IConsole3::RenameScopeItem method (mmc.h)

The RenameScopeItem method programmatically puts the specified scope item in rename mode. Subsequently, the user can manually enter the new name.

Use this method only when an item is created and immediately must be put in rename mode. Use of this method for other scenarios, such as being called after an item has been selected, is not supported and may have unexpected results.

Syntax

HRESULT RenameScopeItem(
  [in] HSCOPEITEM hScopeItem
);

Parameters

[in] hScopeItem

The scope item put in rename mode.

Return value

If successful, the return value is S_OK. If unsuccessful, the method returns E_FAIL.

Remarks

For this method to succeed, the item put in rename mode must have the Rename verb enabled, and the scope pane must be not be invisible.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header mmc.h
Library Mmc.lib
DLL Mmcndmgr.dll

See also

IConsole3

IResultData2::RenameResultItem