The SmsSetFilter function applies the specified filter to a container.
SMS_STATUS SmsSetFilter(
HANDLE hContainer, // Handle to container.
HANDLE hFilter // Handle to filter.
);
The SmsSetFilter function returns a status code SMS_STATUS. If successful, the function returns a status of SMS_OK. Otherwise, it returns one of the following manifest constants:
The type of the filter must be supported by the container. If the filter type is not supported by the container, SmsSetFilter does not apply the filter and returns a status of SMS_INVALID_FILTER_TYPE.
SmsSetFilter allows only one filter of each type to be applied to a container. For example, two machine filters cannot be applied to the same container. If a filter of the same type has already been applied to the container, SmsSetFilter does not apply the second filter and returns a status of SMS_DUPLICATE_FILTER.
After SmsSetFilter has been used to set a filter on a container, the container keeps a copy of the filter for its own use. This means that any changes made to the filter will not be reflected in the filter that has been set on the container. In addition, a filter cannot be removed from a container after it has been set.
To get the list of filters applied to a container, use the SmsGetAllFilters function.
After your application applies a filter to a container, it can close the filter (to free memory used by the filter) by using the SmsCloseFilter function. Note that the container maintains its own copy of a filter after the filter has been applied.
SmsGetAllFilters, SmsCloseFilter