3.1.4.1.2 Creating a New Search Folder Container

The client creates a search folder container in the Finder folder ([MS-OXOSFLD] section 2.2.1) of the message store. The new search folder container MUST have the PidTagContainerClass (section 2.2.2.1.1) and PidTagExtendedFolderFlags (section 2.2.2.1.2) properties.

To create a search folder container, the client creates a folder as specified in [MS-OXCFOLD] section 3.1.4.2, with the FolderType field of the RopCreateFolder remote operation (ROP) ([MS-OXCROPS] section 2.2.4.2) set to 0x02. The DisplayName field of the RopCreateFolder ROP is set to the name of the search folder. After the search folder container is created, the client sets the search criteria by using the RopSetSearchCriteria ROP ([MS-OXCROPS] section 2.2.4.4), as specified in [MS-OXCFOLD] section 3.1.4.4.

The GUIDs of the search folder container and the search folder definition message MUST match, and the 4-byte tags of the search folder container and the search folder definition message MUST match. For details, see section 2.2.4.