SmsGetFilterID

The SmsGetFilterID function retrieves the identifier of the persistent filter specified by the filter handle.

SMS_STATUS SmsGetFilterID(
  HANDLE hFilter,
               // Handle to filter.
  char *pszID  // Pointer to buffer to receive identifier string.
);
 

Parameters

hFilter
Specifies the handle to the filter whose identifier will be retrieved.
pszID
Specifies the string buffer to receive the identifier string. The filter identifier is an eight-character identifier that the SMS system assigns to a query. Note that the first three characters are the site code for the site where the query was created. Also note that the default queries provided with SMS have a six-character identifier, which begins with the characters SMS.

Your application must ensure that the string specified by pszID is large enough to contain the filter's identifier. For persistent machine filters, the filter identifier contains up to eight characters. Note that SMS_DATA_BUFF_SIZE specifies the largest buffer required for any string stored in the SMS site database.

Return Values

The SmsGetFilterID 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_PARAMETER_ERROR
Your application attempted to get the filter identifier for a transient filter.

Remarks

SmsGetFilterID applies only to persistent filters in a filter container; transient filters have no identifier. If your application attempts to get the filter identifier for a transient filter, SmsGetFilterID will return SMS_PARAMETER_ERROR.