IConsoleNameSpace2::InsertItem

IConsoleNameSpace::InsertItem method

The IConsoleNameSpace2::InsertItem method enables the snap-in to insert a single item into the scope view.

Syntax


HRESULT InsertItem(
  [in, out] LPSCOPEDATAITEM item
);

Parameters

item [in, out]

A pointer to a SCOPEDATAITEM structure that specifies the attributes of the new scope item. On return, the ID member of the structure contains the item identifier assigned by MMC for the newly inserted item. Be aware that this value is the HSCOPEITEM handle of the inserted item. The snap-in should store this value in order to later manipulate the inserted item by calling methods such as IConsoleNameSpace2::GetItem.

Return value

This method can return one of these values.

S_OK

The item was successfully inserted.

E_UNEXPECTED

An unexpected error occurred.

E_INVALIDARG

The item parameter may be NULL, or the mask member of the SCOPEDATAITEM structure does not contain SDI_STR and SDI_PARAM, or the structure's displayname member is not equal to MMC_CALLBACK.

E_OUTOFMEMORY

The operation cannot be completed due to lack of memory.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Mmc.h

DLL

Mmcndmgr.dll

See also

IConsoleNameSpace2

 

 

Show:
© 2016 Microsoft