Your provider's IABLogon::CompareEntryIDs implementation compares the entry identifiers for two of your provider's objects. MAPI calls this method after determining that the two entry identifiers contain your provider's registered MAPIUID. Therefore, your CompareEntryIDs method need not check that the entry identifiers passed in for the lpEntryID1 and lpEntryID2 parameters belong to your provider.
Calling IABLogon::CompareEntryIDs is equivalent to retrieving the PR_RECORD_KEY property for each of the two objects and comparing them directly.
To implement CompareEntryIds
Check the type of the entry identifiers passed in if your provider stores that information. For example, one entry identifier might belong to a messaging user while the other might belong to a distribution list. If the types do not match, set the contents of the lpulResult parameter to FALSE and return.
Compare the sizes of the two entry identifiers. If they are not the same, set the contents of the lpulResult parameter to FALSE and return.
Check that the size of the entry identifiers is the correct size for their type. If not, set the contents of the lpulResult parameter to FALSE and return the error value MAPI_E_UNKNOWN_ENTRYID.
Check if the entry identifiers are the same. If they compare equally, set the contents of the lpulResult parameter to TRUE and return. Otherwise, set it to FALSE before returning.
If your provider is comparing a short-term entry identifier with a long-term identifier, they should compare equally.