The number of event categories returned will vary depending on the sophistication of the server, but is expected to be less than 30 for most servers, making this interface more appropriate than a custom enumerator. It is expected that the results of the Query will be fairly 'stable' in most situations. However, the Server is in fact allowed to change the available selection at any time. Therefore, a Client should do (or at least allow as an option) a fresh Query every time a selection is to be presented to the end user.
Visual Basic (Declaration) | |
---|---|
Public Function QueryEventCategories( _ ByVal eventType As Integer, _ ByRef count As Integer, _ ByRef eventCategories As Integer(), _ ByRef eventCategoryDescs As String() _ ) As Integer |
C# | |
---|---|
public int QueryEventCategories( int eventType, out int count, out int[] eventCategories, out string[] eventCategoryDescs ) |
Parameters
- eventType
- A bit mask with EventType enumeration values specifying which event types are of interest These types can be OR’ed together to select multiple event types. A value of 0 is an error and causes E_INVALIDARG to be returned.
- count
- The number of event categories (size of the EventCategoryID, and EventCategoryDesc arrays) returned by the function.
- eventCategories
- Array of codes for the vendor-specific event categories implemented by the server. These IDs can be used in the event subscription interface for specifying filters. Category IDs must be unique across the server (e.g. if Category ID x is used for both simple events and condition events, then the ID must reference the exact same category.)
- eventCategoryDescs
- Array of strings for the text names or descriptions for each of the event category IDs. This array corresponds to the EventCategories array.
Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family