The IConsole2::SelectScopeItem method selects the given scope item.
HRESULT SelectScopeItem( [in] HSCOPEITEM hScopeItem );
- hScopeItem [in]
A handle to the item in the scope pane to be selected.
This method can return one of these values.
The specified scope item was selected.
An unexpected error occurred.
hScopeItem is not a valid scope item belonging to the current snap-in.
Use this method to reselect the currently selected scope item or to select another scope item.
You can have a single scope item with several different views available, for example, several OLE custom control (OCX) views and the default list view. When the user selects a different view from a menu, the snap-in receives the command and should then call SelectScopeItem to reselect the item. IComponent::GetResultViewType can then return the new view type.
If SelectScopeItem is called by the snap-in in its MMCN_EXPAND notification handler, MMC will not select the specified scope item, even though SelectScopeItem may return S_OK.
Minimum supported client
Minimum supported server
Windows Server 2008