After your application gets the handle to a persistent filter, your application can retrieve the scalars for that filter. A persistent filter has four scalars:
Unlike the scalars for folders, the scalars for persistent filters can be retrieved in sequence only.
To retrieve scalars in sequence, use the SmsGetNextScalar function. SmsGetNextScalar retrieves the next scalar in the list of scalars within the persistent filter and writes the scalar's information into a SCALAR structure. To start at the beginning of the list again, use SmsRewind to reset a filter's internal scalar index so that the filter's scalars can be reiterated.
Example:
// Get the next scalar in the persistent filter
// and print it on the screen.
SCALAR scalar;
char szName[50]; //Buffer for scalar name.
char szValue[BUFF_SIZE]; //Buffer for string value.
scalar.pszName = szName;
scalar.pszValue = szValue;
scalar.dwLen = sizeof(szValue)-1;
// Retrieve the next scalar.
stat = SmsGetNextScalar(hFilter, // Handle to filter.
&scalar // Pointer to SCALAR struct to
// place data for the scalar.
);
// Print the scalar name and value.
printf("\t%20s: %s\n", scalar.pszName, scalar.pszValue);