All events of a particular event category have the potential of supporting the same attribute information. For event categories, where different instances of that category in the same server have different attributes, the server should return the union of all attributes and the client must allow for some attributes in event notifications to be null. It is expected that the list of Attributes available for a particular Category on the Server will be fairly 'stable' and that in general, they will not change 'online'. However it should be noted that the behavior of this and the related methods; SelectReturnedAttributes and the ONEVENTSTRUCT of OnEvent do allow for some level of dynamic attribute sets. Specifically, the server can allow online additions to and deletions from the list of attributes which are available for a Category, however it may NOT allow online changes to the Description or data type associated with a particular ID. It is therefore required that Clients be at least prepared to deal with null (Nothing) in the attribute list of ONEVENTSTRUCT. Also, in order to allow for the possibility of a configuration change in the server, a Client should do (or at least allow as an option) a fresh Query every time a list of available attributes is to be presented to the end user for a Category.
Visual Basic (Declaration) | |
---|---|
Public Function QueryEventAttributes( _ ByVal eventCategory As Integer, _ ByRef count As Integer, _ ByRef attrIDs As Integer(), _ ByRef attrDescs As String(), _ ByRef attrTypes As Type() _ ) As Integer |
C# | |
---|---|
public int QueryEventAttributes( int eventCategory, out int count, out int[] attrIDs, out string[] attrDescs, out Type[] attrTypes ) |
Parameters
- eventCategory
- One of the Event Category codes returned from the QueryEventCategories function.
- count
- The number of event attributes (size of the AttrID, and AttrDescs, and AttrTypes arrays) returned by the function.
- attrIDs
- Array of codes for vendor-specific event attributes associated with the event category and available from the server. These attribute IDs can be used in the event subscription interface to specify the information to be returned with an event notification.
- attrDescs
- Array of strings for the text names or descriptions for each of the event attribute IDs. This array corresponds to the AttrIDs array.
- attrTypes
- Array of Types identifying the data type of each of the event attributes. This array corresponds to the AttrIDs array.
Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family