IComponent

[This is preliminary documentation and subject to change.]

The IComponent interface enables the Microsoft® Management Console to communicate with snap-in components. Similar to the IComponentData interface, IComponent is typically implemented at the view level and is closely associated with items being displayed in the result pane.

When to Implement

Implement the IComponent interface in your in-process (in-proc) server DLL to communicate with the console,.which displays the result pane and enumerates the items it contains.

When to Use

Your snap-in component must expose the IComponent interface if it enumerates items in the result pane because the snap-in cannot enumerate without it. Extension snap-ins that do not extend the namespace (but extend other features like context menus, toolbars, and so on) do not need to implement this interface or the IComponentData interface.

Methods in Vtable Order

IUnknown Methods Description
QueryInterface Returns pointers to supported interfaces.
AddRef Increments reference count.
Release Decrements reference count.

IComponent Methods Description
Initialize Provides an entry point to the console.
Notify Called by the console to notify the snap-in of actions taken by a user.
Destroy Releases all references to the console.
QueryDataObject Returns a data object that can be used to retrieve context information for the specified cookie.
GetResultViewType Determines what the result pane view should be.
GetDisplayInfo Retrieves display information about an item in the result pane.
CompareObjects Enables a snap-in to compare two data objects acquired through QueryDataObject. Note that data objects can be acquired from two different instances of IComponent.