FILTER_INFO

The FILTER_INFO structure contains information about a filter. This structure is used by the SmsEnumFilters function.

typedef struct _FILTER_INFO {
    char  szTag[NAME_SIZE];
    DWORD filterType;
    char szName[NAME_SIZE];
    char szValue[NAME_SIZE];
    char szOperator[NAME_SIZE];
    char szArchitecture[NAME_SIZE];
    char szGroupClass[NAME_SIZE];
    char szAttributeName[NAME_SIZE];
} FILTER_INFO;

The following members of this structure indicate whether the corresponding member in the TOKEN structure is required when adding an expression token to a filter of the type specified by the filterType member: szName, szValue, szOperator, szArchitecture, szGroupClass, szAttributeName. If the member contains a string, this indicates that the corresponding member in the TOKEN structure is required when your application adds an expression to a filter of that type. If the member is NULL, this indicates that the corresponding member in the TOKEN structure is not required for expression tokens in a filter of that type.

Members

szTag
Specifies the string form of the filter's tag. The string has the length specified by NAME_SIZE.
filterType
Specifies the type of the filter. See Filter Types.
szName
Specifies the string label for the name of the value to be evaluated by an expression.

Note that szName is used by all filter types except machine filters (MACHINE_FILTER) and attribute filters (ATTRIBUTE_FILTER). Machine and attribute filters use the szAttributeName to specify the name of the attribute to use for the expression. For these two filters, szName is NULL.

szValue
Specifies the string label for the value to be compared using the operator specified by szOperator.
szOperator
Specifies the string label for the name of the operator to be evaluated by an expression.
szArchitecture
Specifies the string label for the name of the architecture of the object to search for. This member is used only for machine filters and attribute filters.
szGroupClass
Specifies the string label for the name of the group class of the attribute specified by szAttributeName. This member is used only for machine filters and attribute filters.
szAttributeName
Specifies the string label for the name of the attribute to evaluate against the value specified by szValue. This member is used only for machine filters and attribute filters.

Note that szAttributeName is used only by machine filters (MACHINE_FILTER) and attribute filters (ATTRIBUTE_FILTER). For all other filters, szAttributeName is NULL.

Remarks

The following members indicate whether the corresponding member in the TOKEN structure is required: szName, szValue, szOperator, szArchitecture, szGroupClass, szAttributeName. The string labels provided by these members can be used as text labels for controls in your application. For example, a job filter has the following values for the FILTER_INFO structure:

Member Value
szTag Job filter
filterType JOB_FILTER
fPersistent FALSE
szName "Type"
szValue "Value"
szOperator "Operator"
szArchitecture NULL (unused)
szGroupClass NULL (unused)
szAttributeName NULL (unused)

The FILTER_INFO structure for a job filter indicates that the TOKEN structure for an expression token must contain values for the szName, szValue, and szOperator members.

For an example of how to use the FILTER_INFO structure, see the browser sample in the \MSSDK\SAMPLES\SYSMGMT\SMS\SMSAPI\BROWSER directory of the Microsoft® Platform SDK CD-ROM.

See Also

Filter Types