SetFilter
This method is used to set up a display filter. Then, the TcEventViewer will display events of the requested type only - e.g. only alarms or events of a specified source.
HRESULT SetFilter([in]TCEVENTVIEW_FILTER Filter, [in]VARIANT Value);
Parameters
Filter
[in] Kind of filter to select. This value is defined through the TCEVENTVIEW_FILTER enum
Value
[in] Value to filter for. The following table shows which vartype is required for which filter
Filter | Vartype |
---|---|
TCEVENTVIEW_FILTER_NONE | Ignored |
TCEVENTVIEW_FILTER_CLASS | Value convertable to Long (VT_I4) |
TCEVENTVIEW_FILTER_SOURCENAME | String (VT_BSTR) |
Return Values
S_OK
Function was successfully called
E_INVALIDARG
Either the selected filter type is invalid or the supplied Vartype is not convertable to the required type.