Last modified: July 23, 2011
Applies to: Outlook
Describes a compare property restriction, which tests two properties using a relational operator.
The comparison order is (property tag 1) (relational operator) (property tag 2). The properties to be compared must be of the same type. Attempting to compare properties of different types causes MAPI or the service provider to return the error value MAPI_E_TOO_COMPLEX from the IMAPITable method to which the structure is passed as a parameter.
The result of a compare property value restriction is undefined when one or both of the properties do not exist. When a client requires well-defined behavior for such a restriction and is not sure whether the property exists, (for example, it is not a required column of a table) it should create an AND restriction to join the compare property restriction with an exist restriction. Use an SExistRestriction structure to define the exist restriction and an SAndRestriction structure to define the AND restriction.
The properties specified in the ulPropTag1 and ulPropTag2 members can be multi-valued if the service provider supports it.
For more information about the SComparePropsRestriction structure and restrictions in general, see About Restrictions.