SRestriction 

The SRestriction structure describes a filter for limiting the view of a table to particular rows.

Quick Info

Header file:

MAPIDEFS.H

 

typedef struct _SRestriction

     ULONG     rt; 

     union

    

          SComparePropsRestriction    resCompareProps;

          SAndRestriction             resAnd;

          SOrRestriction              resOr;

          SNotRestriction             resNot;

          SContentRestriction         resContent;

          SPropertyRestriction        resProperty;

          SBitMaskRestriction         resBitMask;

          SSizeRestriction            resSize;

          SExistRestriction           resExist;

          SSubRestriction             resSub;

          SCommentRestriction         resComment;

     } res;

} SRestriction;

 

Members

rt

Indicates the restriction type. Possible values are:

 

Value of rt member

Description

RES_AND

Applies a logical AND operation to a group of restrictions.

RES_BITMASK

Applies a bitmask to a property.

RES_COMMENT

Associates a comment with a restriction.

RES_COMPAREPROPS

Compares two property values.

RES_CONTENT

Searches a property to determine if it contains a particular value.

RES_EXIST

Determines if a property exists.

RES_NOT

Applies a logical NOT operation to a group of restrictions.

RES_OR

Applies a logical OR operation to a group of restrictions.

RES_PROPERTY

Determines if the value of a property matches a particular value.

RES_SIZE

Determines if the value of a property is a particular size.

RES_SUBRESTRICTION

Applies a restriction to a message s attachments or recipients.

 

res

Union of restriction structures describing the type of filters to be applied. The structure included in the res member depends on the value of the rt member. The following table relates restriction types with the corresponding type of restriction structure. 

 

Value of rt member

Structure type of res member

RES_AND

SAndRestriction

RES_BITMASK

SBitMaskRestriction

RES_COMMENT

SCommentRestriction

RES_COMPAREPROPS

SComparePropsRestriction

RES_CONTENT

SContentRestriction

RES_EXIST

SExistRestriction

RES_NOT

SNotRestriction

RES_OR

SOrRestriction

RES_PROPERTY

SPropertyRestriction

RES_SIZE

SSizeRestriction

RES_SUBRESTRICTION

SSubRestriction

 

Remarks

A client application uses SRestriction structures in calls to the IMAPITable::Restrict23_KZ0W and (for search-results folders) IMAPIContainer::SetSearchCriteriaEKSF1. methods. A client can also use SRestriction with the IMAPITable::FindRow2WU753 method to find table rows with certain attributes.

These three methods use SRestriction structures to filter out rows in the table.

See Also

SAndRestriction, SBitMaskRestriction, SCommentRestriction, SComparePropsRestriction, SContentRestriction, SExistRestriction, SNotRestriction, SOrRestriction, SPropertyRestriction, SSizeRestriction, SSubRestriction, IMAPIContainer::SetSearchCriteria, IMAPITable::FindRow, IMAPITable::Restrict