Filtering is enabled by setting the CRA_FILTERED attribute of container records that are to be excluded from the viewable subset.

The pfnFilter parameter points to an application-provided function that determines whether a record is to be included in the viewable subset. The pfnFilter parameter must be declared as:

BOOL PFN pfnFilter (
     PRECORDCORE p,
     PVOID pStorage);

where p points to a RECORDCORE structure that describes the container record to be tested. The pfnFilter parameter returns TRUE if the record is to be included in the viewable subset, or FALSE if it is to be excluded. The container sets the CRA_FILTERED attribute for the record based on the return from the pfnFilter parameter.

Note: If the CCS_MINIRECORDCORE style bit is specified when a container is created, then MINIRECORDCORE should be used instead of RECORDCORE and PMINIRECORDCORE should be used instead of PRECORDCORE in all applicable data structures and messages.