The Filter object enables the application to specify a condition to which the enumeration result set must match. It is the server's responsibility to screen or filter the entire listing, and return only those results that match the specified filter.
There are two types of filters in the ILS interface:
Filters are created by the IIlsMain::CreateFilter or IIlsMain::StringToFilter method.
The Filter Object exposes the following interface:
IIlsFilter Interface |
The IIlsFilter interface is obtained from the IIlsMain::CreateFilter or IIlsMain::StringToFilter method. The interface provides the methods described in this section.
AddSubFilter |
GetCount |
RemoveSubFilter |
SetAttributeValue |
SetExtendedAttributeName |
SetStandardAttributeName |
HRESULT IIlsFilter::AddSubFilter(
IIlsFilter *pFilter);
Adds a subfilter to the list of subfilters in a composite filter.
S_OK | Success. |
ILS_E_FILTER_TYPE | Filter type is not ILS_FILTERTYPE_COMPOSITE. |
ILS_E_POINTER | Subfilter is not valid. |
ILS_E_MEMORY | Unable to allocate enough memory for this request. |
This method applies to composite filter operations.
HRESULT IIlsFilter::GetCount(
ULONG *pcElements);
Counts the number of subfilters in a composite filter.
S_OK | Success. |
ILS_E_FILTER_TYPE | Filter type is not ILS_FILTERTYPE_COMPOSITE. |
ILS_E_POINTER | Address of the return buffer is NULL. |
This method applies to composite filter operations.
HRESULT IIlsFilter::RemoveSubFilter(
IIlsFilter *pFilter);
Removes a subfilter from the list of subfilters in a composite filter.
S_OK | Success. |
ILS_E_FILTER_TYPE | Filter type is not ILS_FILTERTYPE_COMPOSITE. |
ILS_E_POINTER | Subfilter is not valid. |
This method applies to composite filter operations.
HRESULT IIlsFilter::SetAttributeValue(
BSTR bstrAttrValue);
Sets the value of a simple filter.
S_OK | Success. |
ILS_E_FILTER_TYPE | Filter type is not ILS_FILTERTYPE_SIMPLE. |
ILS_E_POINTER | Attribute value string is NULL. |
ILS_E_MEMORY | Unable to allocate enough memory for this request. |
This method applies to simple filter operations.
HRESULT IIlsFilter:: SetExtendedAttributeName(
BSTR bstrAnyAttrName);
Sets the attribute of a simple filter to be a nonstandard ILS attribute.
S_OK | Success. |
ILS_E_FILTER_TYPE | Filter type is not ILS_FILTERTYPE_SIMPLE. |
ILS_E_POINTER | Attribute name is NULL. |
ILS_E_MEMORY | Unable to allocate enough memory for this request. |
This method applies to simple filter operations.
HRESULT IIlsFilter::SetStandardAttributeName(
ILS_STD_ATTR_NAME usrStdAttr);
Sets the attribute of a simple filter to be a standard ILS attribute.
S_OK | Success. |
ILS_E_FILTER_TYPE | Filter type is not ILS_FILTERTYPE_SIMPLE. |
ILS_E_PARAMETER | Attribute name is incorrect. |
This method applies to simple filter operations.
Last Updated: November 1, 1997
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.