Special Cookie Values

In certain situations, the MMC_COOKIE value that MMC passes in a call to the snap-in's IComponent::QueryDataObject method is a special type of cookie.

To determine if the cookie value is that of a special cookie, the snap-in can use the IS_SPECIAL_COOKIE macro. A return value of TRUE indicates that the cookie value is that of a special cookie type. The snap-in can then handle the data object appropriately based on the specific value of the cookie.

The special cookie can take two values: MMC_MULTI_SELECT_COOKIE and MMC_WINDOW_COOKIE. These values are reserved by MMC and should never be used by snap-ins to identify any scope or result items that they insert. These values are defined in the mmc.idl file.

The MMC_MULTI_SELECT_COOKIE value is used during multiselection. MMC passes this value to the snap-in to request a pointer to a multiselection data object. For more information about multiselection data objects, see Multiselection.

The MMC_WINDOW_COOKIE value is used for windows created programmatically in calls to the IConsole2::NewWindow method and with the lOptions parameter set to MMC_NW_OPTION_CUSTOMTITLE. MMC passes the value to request a pointer to the data object that supplies the string that represents the snap-in's static node in the title bar.