SContentRestriction 

The SContentRestriction structure contains a search restriction to limit a view of the messages in a table based on checking for a search string.

Quick Info

Header file:

MAPIDEFS.H

 

typedef struct _SContentRestriction

     ULONG        ulFuzzyLevel;

     ULONG        ulPropTag;

     LPSPropValue lpProp;

} SContentRestriction;

 

Members

ulFuzzyLevel

Option settings defining the level of preciseness that the restriction should enforce. The lower 16 bits must be set to exactly one of the following values:

FL_FULLSTRING

The lpProp search string must be completely contained in the property identified by ulPropTag.

FL_PREFIX

The lpProp search string must appear at the beginning of the property identified by ulPropTag. The two strings should be compared only up to the length of the search string indicated by lpProp.

FL_SUBSTRING

The lpProp search string must be contained anywhere within the property identified by ulPropTag.

The upper 16 bits can be set to the following values in any combination:

FL_IGNORECASE

The comparison should be made without considering case sensitivity.

FL_IGNORENONSPACE

The comparison should ignore Unicode-defined  nonspacing characters,  for example, diacritical marks.

FL_LOOSE

The comparison should result in a match whenever possible, ignoring case sensitivity and nonspacing characters.

ulPropTag

Property tag identifying the string property to be checked for occurrence of the search string.

lpProp

Pointer to a property value structure containing the string value to use as the search string.

 

Remarks

There are two property tags in an SContentRestriction structure: one in the ulPropTag member and the other in the ulPropTag member of the SPropValue structure pointed to by lpProp. In both tags, MAPI requires only the property type field and ignores the property identifier field. However, the two property types must match, or else the error value MAPI_E_TOO_COMPLEX is returned when the restriction is used in a call to IMAPITable::Restrict or IMAPITable::FindRow. 

The values FL_FULLSTRING, FL_PREFIX, and FL_SUBSTRING are mutually exclusive. Only one of them can be set, and one of them must be set. Their meanings are fixed, and the provider must implement them exactly as defined. The provider should return MAPI_E_TOO_COMPLEX if it is unable to implement a specified code.

The flags FL_IGNORECASE, FL_IGNORENONSPACE, and FL_LOOSE are independent. Anywhere from zero to all three of them can be set. Their definitions are provided as a guideline only, and the provider is free to implement its own specific meaning of each flag. The provider should not return any error indication if it has no implementation of a specified flag.

The result of a restriction imposed against a property is undefined when the property does 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 content restriction with an exist restriction. Use an SExistRestriction14TSTW8 structure to define the exist restriction and an SAndRestriction1P03.9L structure to define the AND restriction.

See Also

SPropValue81C9._8, SRestriction1TRSEKP