SComparePropsRestriction

Send Feedback

The SComparePropsRestriction structure describes a compare property restriction, which tests two properties using a relational operator.

Syntax

struct { 
  ULONG relop; 
  ULONG ulPropTag1; 
  ULONG ulPropTag2; 
} SComparePropsRestriction; 

Members

  • relop
    Relational operator to use to compare the two properties. Possible values are as follows:

    RELOP_GE

    The comparison is made based on a greater or equal first value.

    RELOP_GT

    The comparison is made based on a greater first value.

    RELOP_LE

    The comparison is made based on a lesser or equal first value.

    RELOP_LT

    The comparison is made based on a lesser first value.

    RELOP_NE

    The comparison is made based on unequal values.

    RELOP_RE

    The comparison is made based on LIKE (regular expression) values.

    RELOP_EQ

    The comparison is made based on equal values.

  • ulPropTag1
    Property tag of the first property to be compared.

  • ulPropTag2
    Property tag of the second property to be compared.

Remarks

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 existence restriction. Use an SExistRestriction structure to define the existence restriction and an SAndRestriction structure to define the AND restriction.

The properties specified in the ulPropTag1 and ulPropTag2 members can be multivalued if the service provider supports it.

Requirements

Pocket PC: Pocket PC 2002 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: mapidefs.h

See Also

MAPI Structures | Messaging | SBitMaskRestriction | SRestriction

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.