IMsgStore::CompareEntryIDs

The IMsgStore::CompareEntryIDs method compares two entry identifiers to determine if they refer to the same entry within a message store. MAPI only passes this call to a service provider if the unique identifiers (UIDs) in both entry identifiers to be compared are handled by that provider.

Quick Info

See IMsgStore : IMAPIProp.

HRESULT CompareEntryIDs(
  ULONG cbEntryID1,       
  LPENTRYID lpEntryID1,   
  ULONG cbEntryID2,       
  LPENTRYID lpEntryID2,   
  ULONG ulFlags,          
  ULONG FAR * lpulResult  
);
 

Parameters

cbEntryID1
[in] Count of bytes in the entry identifier pointed to by the lpEntryID1 parameter.
lpEntryID1
[in] Pointer to the first entry identifier to be compared.
cbEntryID2
[in] Count of bytes in the entry identifier pointed to by the lpEntryID2 parameter.
lpEntryID2
[in] Pointer to the second entry identifier to be compared.
ulFlags
Reserved; must be zero.
lpulResult
[out] Pointer to the result of the comparison, set toTRUE if the two entry identifiers refer to the same object and FALSE otherwise.

Return Values

S_OK
The comparison was successful.
MAPI_E_UNKNOWN_ENTRYID
One or both of the entry identifiers specified as parameters do not refer to objects, possibly because the corresponding objects are unopened and inaccessible at present.

Remarks

The IMsgStore::CompareEntryIDs method compares two entry identifiers belonging to the message store to determine whether they refer to the same object.

Notes to Callers

CompareEntryIDs is useful because an object can have more than one valid entry identifier; such a situation can occur, for example, after a new version of a message store provider is installed.

If CompareEntryIDs returns an error, do not take any action based on the result of the comparison. Instead, take the most conservative approach possible. CompareEntryIDs might fail if, for example, one or both of the entry identifiers contains an invalid MAPIUID.

See Also

MAPIUID