IComponentData::QueryDataObject method

The IComponentData::QueryDataObject method returns a data object that can be used to retrieve the context information for the specified cookie.

Syntax


HRESULT QueryDataObject(
  [in]  long              cookie,
  [in]  DATA_OBJECT_TYPES type,
  [out] LPDATAOBJECT      *ppDataObject
);

Parameters

cookie [in]

A value that specifies the unique identifier for which the data object is required.

type [in]

A value that specifies the data object as one of the following:

CCT_SCOPE = 0x8000

Data object for the scope pane.

CCT_RESULT = 0x8001

Data object for the result pane.

CCT_SNAPIN_MANAGER = 0x8002

Data object for the Snap-In Manager context.

CCT_UNINITIALIZED = 0xFFFF

Data object has an invalid type.

These constants are members of the DATA_OBJECT_TYPES enumeration.

ppDataObject [out]

A pointer to the address of the returned data object.

Return value

This method can return one of these values.

S_OK

The notification was successfully sent.

E_UNEXPECTED

An unexpected error occurred.

Remarks

You can pass these data objects to the same snap-in or to extension snap-ins that require them. Some of the MMC interfaces that can use this data object are IComponent, IComponentData, IContextMenuProvider, IExtendContextMenu, IExtendPropertySheet2, and IPropertySheetProvider.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Mmc.h

See also

IComponent
IComponentData
IConsole2
IDataObject

 

 

Show: