SmsCreateFilter

The SmsCreateFilter function creates a filter of a specified type.

SMS_STATUS SmsCreateFilter(
  DWORD frType,        // Type of filter.
  HANDLE hConnection,  // Handle to database connection.
  HANDLE *phFilter     // Pointer to handle to receive the filter 
                       // handle.
);
 

Parameters

frType
Specifies the type of filter to create. See Filter Types for a list of all supported filter types.
hConnection
Specifies the handle to the database connection. To connect to a site database, use the SmsDataSourceConnect function.
phFilter
Receives the handle to the new filter.

Return Values

The SmsCreateFilter function returns a status code SMS_STATUS. If successful, the function returns a status of SMS_OK. Otherwise, it returns the following manifest constant:

SMS_INVALID_HANDLE
The specified connection handle is not a valid handle.

Remarks

After your application uses the SmsCreateFilter function to create a filter, the filter is empty, that is, it has no tokens set. Your application should use the filter functions to set the tokens for the new filter. To use the filter, your application must use the SmsSetFilter function to apply the filter to a container that supports the filter type. After applying the filter to a container, your application must use the SmsPopulate function to query the site database for folders that meet the criteria set by the filters applied to the container.

See Also

SmsAddToken, SmsDataSourceConnect, SmsGetToken, SmsGetTokenCount, SmsManipulateTokens, SmsSetFilter