2.2.1.2.8 PidTagSearchFolderDefinition

Type: PtypBinary

The PidTagSearchFolderDefinition property ([MS-OXPROPS] section 2.989) contains data that specifies the search criteria and search options. The structure of this property is specified as follows. The presence and specific content of some fields are dependent upon the template that is used for the search. The template ID, specified in the PidTagSearchFolderTemplateId property (section 2.2.1.2.2), identifies the template to be used. For details about the templates and how they affect the fields of the PidTagSearchFolderDefinition property, see section 2.2.3.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Version

A

B

C

D

E

F

G

H

I

J

K

L

Reserved

NumericalSearch

TextSearchLength

TextSearchExtendedLength (optional)

TextSearch (variable)

...

SkipBlock1 (variable)

...

DeepSearch

FolderList1Length

FolderList1ExtendedLength (optional)

FolderList1 (variable)

...

FolderList2Length

FolderList2 (variable)

...

Addresses (variable)

...

SkipBlock2 (variable)

...

SearchRestriction (variable)

...

AdvancedSearch (variable)

...

SkipBlock3 (variable)

...

Version (4 bytes): A 4-byte value that specifies the version of the data. The value SHOULD be 0x04100000 (network byte order).

A (1 bit): Unused. This bit MUST be zero (0) when sent and MUST be ignored on receipt.

B (1 bit): A value that indicates whether the FolderList2 field is present. If this field is set to 1, the FolderList2 field MUST be present.

C (1 bit): A value that indicates whether the FolderList1 field is present. If this field is set to 1, the FolderList1 field MUST be present.

D (1 bit): A value that indicates whether the AdvancedSearch field is present. If this field is set to 1, the AdvancedSearch field MUST be present.

E (1 bit): A value that indicates whether the SearchRestriction field is present. If this field is set to 1, the SearchRestriction field MUST be present.

F (1 bit): A value that indicates whether the Addresses field is present. If this field is set to 1, the Addresses field MUST be present.

G (1 bit): A value that indicates whether the TextSearch field is present. If this field is set to 1, the TextSearch field MUST be present.

H (1 bit): A value that indicates whether the NumericalSearch field is used. If this field is set to 1, the NumericalSearch field MUST contain a valid value.

I (1 bit): Unused. This bit MUST be zero (0) when sent and MUST be ignored on receipt.

J (1 bit): A value that indicates whether the search folder container is refreshed daily. If this field is set to 1, the search folder container is refreshed daily. In this case, the PidTagSearchFolderExpiration property (section 2.2.1.2.5) is set to a value that is one day in the future.

K (1 bit): A value that indicates whether the search folder container is refreshed weekly. If this field is set to 1, the search folder container is refreshed weekly. In this case, the PidTagSearchFolderExpiration property is set to a value that is one week in the future.

L (1 bit): A value that indicates whether the search folder container is refreshed monthly. If this field is set to 1, the search folder container is refreshed monthly. In this case, the PidTagSearchFolderExpiration property (section 2.2.1.2.5) is set to a value that is one month in the future.

Reserved (20 bits): Unused. This field MUST be set to 0x00000 when sent and MUST be ignored on receipt.

NumericalSearch (4 bytes): An integer that specifies either the size or the age of the messages to be searched. If the H field is set to zero (0), this field MUST be set to 0x00000000 when sent and MUST be ignored on receipt.

The value of this field has the following format (in big-endian order) for specifying age:

  • The upper two bytes specify the units as follows:

    • 0x0000: Days

    • 0x0001: Weeks

    • 0x0002: Months

  • The lower two bytes specify the amount.

    For example, the value 0x0001002A specifies an age of 42 weeks.

TextSearchLength (1 byte): An integer that specifies the size, in characters, of the TextSearch field. If the TextSearch field is longer than 254 characters, this field MUST be set to 255. If the G field is set to zero (0), this field MUST be set to zero (0).

TextSearchExtendedLength (2 bytes): An integer that specifies the size of the TextSearch field when its size is greater than 254 characters. This field MUST NOT be present if the value of the TextSearchLength field is less than 255.

TextSearch (variable): A string that specifies search criteria. The particular criteria specified depend on the template used. The size of the string, in characters, is specified by the TextSearchLength field or the TextSearchExtendedLength field. The string MUST NOT be longer than 65,535 characters. If the G field is set to zero (0), this field MUST NOT be present.

SkipBlock1 (variable): A skip block that specifies the number of bytes to skip ahead. This is for future versions to insert new data. If there is no data to skip, the value of this field MUST be zero (0), and its size is 4 bytes. If there is data to skip, the size of this field MUST be 4 bytes plus the size of the data to be skipped.

DeepSearch (4 bytes): A Boolean value that specifies whether the search includes subfolders. If the search includes subfolders, this field is set to TRUE (0x00000001); otherwise, this field is set to FALSE (0x00000000).

FolderList1Length (1 byte): An integer that specifies the size, in characters, of the FolderList1 field. If the FolderList1 field is longer than 254 characters, this field MUST be set to 255. If the C field is set to zero (0), this field MUST be set to zero (0).

FolderList1ExtendedLength (2 bytes): An integer that specifies the size of the FolderList1 field when its size is greater than 254 characters. This field MUST NOT be present if the value of the FolderList1Length field is less than 255.

FolderList1 (variable): A string that contains the names of the folders to be searched. The size of the string, in characters, is specified by the FolderList1Length field or the FolderList1ExtendedLength field. The string MUST NOT be longer than 65,535 characters. If the C field is set to zero (0), this field MUST NOT be present.

FolderList2Length (4 bytes): An integer that specifies the size, in bytes, of the FolderList2 field. If the B field is set to zero (0), this field MUST be set to zero (0).

FolderList2 (variable): An EntryList structure, as specified in [MS-OXCDATA] section 2.3.1, that contains a list of the folders to be searched. If the B field is set to zero (0), this field MUST NOT be present.

Addresses (variable): An AddressList structure, as specified in section 2.2.1.2.8.1, that contains a list of addresses to be included in the search. If the F field is set to zero (0), this field MUST NOT be present.

SkipBlock2 (variable): A skip block that specifies the number of bytes to skip ahead. This is for future versions to insert new data. If there is no data to skip, the value of this field MUST be zero (0), and its size is 4 bytes. If there is data to skip, the size of this field MUST be 4 bytes plus the size of the data to be skipped.

SearchRestriction (variable): A Restriction structure, as specified in section 2.2.1.2.8.2, that explicitly defines the search criteria. If the E field is set to zero (0), this field MUST NOT be present.

AdvancedSearch (variable): A low-order 4-byte integer followed by a high-order 4-byte integer, forming a 64-bit value that specifies the number of data bytes contained in this field. The total length of this field is 8 plus the length of the data. The data is implementation-specific. If the D field is set to zero (0), this field MUST NOT be present.

SkipBlock3 (variable): A skip block that specifies the number of bytes to skip ahead. This is for future versions to insert new data. If there is no data to skip, the value of this field MUST be zero (0), and its size will be 4 bytes. If there is data to skip, the size of this field MUST be 4 bytes plus the size of the data to be skipped.