Skip to content

Latest commit

 

History

History
103 lines (77 loc) · 3.87 KB

nf-mmc-iresultdatacompare-compare.md

File metadata and controls

103 lines (77 loc) · 3.87 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:mmc.IResultDataCompare.Compare
IResultDataCompare::Compare (mmc.h)
Provides a way for a primary snap-in to compare cookies for the purpose of sorting the result items that it inserts in the result pane.
Compare
Compare method [MMC]
Compare method [MMC]
IResultDataCompare interface
IResultDataCompare interface [MMC]
Compare method
IResultDataCompare.Compare
IResultDataCompare::Compare
_slate_iresultdatacompare_compare
mmc.iresultdatacompare_compare
mmc/IResultDataCompare::Compare
mmc\iresultdatacompare_compare.htm
mmc
00d18ba5-589f-4a70-b331-ba9c7d5164c5
12/05/2018
Compare, Compare method [MMC], Compare method [MMC],IResultDataCompare interface, IResultDataCompare interface [MMC],Compare method, IResultDataCompare.Compare, IResultDataCompare::Compare, _slate_iresultdatacompare_compare, mmc.iresultdatacompare_compare, mmc/IResultDataCompare::Compare
mmc.h
Windows
Windows Vista
Windows Server 2008
Windows
19H1
IResultDataCompare::Compare
mmc/IResultDataCompare::Compare
c++
APIRef
kbSyntax
COM
Mmc.h
IResultDataCompare.Compare

IResultDataCompare::Compare

-description

The IResultDataCompare::Compare method provides a way for a primary snap-in to compare cookies for the purpose of sorting the result items that it inserts in the result pane.

The IResultDataCompare::Compare method cannot be used for scope items. However, this functionality is provided by the IResultDataCompareEx::Compare method.

-parameters

-param lUserParam [in]

A value that specifies user-provided information that is passed into IResultData::Sort. MMC does not interpret this parameter.

-param cookieA [in]

The unique identifier of the first result item object to be compared as part of the sorting operation.

-param cookieB [in]

The unique identifier of the second result item object to be compared as part of the sorting operation.

-param pnResult [in, out]

As an in parameter, the argument contains the column that is sorted. As an out parameter, the value of the argument should be:

  • -1 if item 1 < item 2
  • zero (0) if item 1 == item 2
  • 1 if item 1 > item 2

-returns

This method can return one of these values.

-remarks

Compare provides a mechanism for determining the sort order of result item objects appearing in the result pane. The built-in sort provided by MMC only uses the C run-time library string-compare function to compare the data. If this interface is implemented, it is used for all comparisons.

The comparison should be based on an ascending sort order. If the user toggles the standard result view header, the console complements the compare results, which results in a descending sort order.

This IResultDataCompare interface is not called for virtual list sorting. Because the snap-in maintains all the item data storage for a virtual list, the snap-in must sort the items itself. A snap-in must implement the IResultOwnerData interface to provide sorting for virtual lists.

-see-also

IResultData::Sort

IResultOwnerData::SortItems