IMoniker::IsEqual method

Determines whether this moniker is identical to the specified moniker.

Syntax


HRESULT IsEqual(
  [in]  IMoniker *pmkOtherMoniker
);

Parameters

pmkOtherMoniker [in]

A pointer to the IMoniker interface on the moniker to be used for comparison with this one (the one from which this method is called).

Return value

This method returns S_OK to indicate that the two monikers are identical, and S_FALSE otherwise.

Remarks

Previous implementations of the running object table (ROT) called this method. The current implementation of the ROT uses the IROTData interface instead.

Notes to Callers

Call this method to determine whether two monikers are identical. The reduced form of a moniker is considered different from the unreduced form. You should call the IMoniker::Reduce method before calling IsEqual, because a reduced moniker is in its most specific form. IsEqual may return S_FALSE on two monikers before they are reduced, and S_OK after they are reduced.

Notes to Implementers

Your implementation should not reduce the current moniker before performing the comparison. It is the caller's responsibility to call IMoniker::Reduce to compare reduced monikers.

Two monikers that compare as equal must hash to the same value using IMoniker::Hash.

Implementation-specific Notes

ImplementationNotes
Anti-monikerThis method returns S_OK if both are anti-monikers; otherwise, it returns S_FALSE.
Class monikerThis method returns S_OK if pmkOther is a class moniker constructed with the same CLSID information as itself. Otherwise, the method returns S_FALSE. May return E_INVALIDARG if pmkOther is an invalid pointer.
File monikerThis method returns S_OK if *pmkOther is a file moniker and the paths for both monikers are identical (using a case-insensitive comparison). Otherwise, the method returns S_FALSE.
Generic composite monikerThis method returns S_OK if the components of both monikers are equal when compared in the left-to-right order.
Item monikerThis method returns S_OK if both monikers are item monikers and their display names are identical (using a case-insensitive comparison); otherwise, the method returns S_FALSE.
OBJREF monikerThis method returns S_OK if *pmkOther is an OBJREF moniker and the paths for both monikers are identical (using a case-insensitive comparison). Otherwise, the method returns S_FALSE.
Pointer monikerThis method returns S_OK only if both are pointer monikers and the interface pointers that they wrap are identical.
URL monikerReturns S_FALSE if the other moniker (pmkOtherMoniker) is not an URL moniker, which it checks using IPersist::GetClassID to see whether the CLSID is CLSID_URLMoniker. If the other moniker is an URL moniker, it compares the display names of the monikers for equality, returning S_OK if they are identical or S_FALSE otherwise.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

ObjIdl.h

IDL

ObjIdl.idl

IID

IID_IMoniker is defined as 0000000f-0000-0000-C000-000000000046

See also

IMoniker
IROTData

 

 

Community Additions

ADD
Show:
© 2014 Microsoft