Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IComponent2::QueryDispatch method

The QueryDispatch method returns the snap-in IDispatch interface for a specified item. MMC will expose this interface through the MMC 2.0 Automation object model. Script, or other applications, can access the IDispatch interface for the item represented by the specified cookie through the View.SnapinScopeObject and View.SnapinSelectionObject methods.

Syntax


HRESULT QueryDispatch(
  [in]  MMC_COOKIE        cookie,
  [in]  DATA_OBJECT_TYPES type,
  [out] LPDISPATCH        *ppDispatch
);

Parameters

cookie [in]

A value that specifies the context item (or items) for which the IDispatch interface is requested. The cookie value is previously provided by the snap-in, and MMC uses it in this method call.

type [in]

A value that specifies the data object as one of the following constant values, which, are members of the DATA_OBJECT_TYPES enumeration.

CCT_SCOPE = 0x8000

Data object for the scope pane.

CCT_RESULT = 0x8001

Data object for the result pane.

ppDispatch [out]

A dispatch interface pointer. The snap-in sets *ppDispatch to the IDispatch interface that corresponds to the cookie value.

Return value

If successful, the return value is S_OK. Other return values indicate an error code.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Mmc.h

See also

View.SnapinScopeObject
View.SnapinSelectionObject

 

 

Show: