Represents collections of bitmask values of a specific field of an event within an event trace. The objects in this collection are of the TraceEventFieldBitmask type. For a list of all members of this type, see TraceEventFieldBitmaskCollection Members. System.Object [Visual Basic] Public Class TraceEventFieldBitmaskCollection Inherits Object Implements ICollection Implements IEnumerable [C#] public class TraceEventFieldBitmaskCollection : Object, ICollection, IEnumerable [C++] public __gc class TraceEventFieldBitmaskCollection : public Object, public ICollection, public IEnumerable Example[C#] using System; using WmiSolutions.EventTracing; using WmiSolutions.EventTracing.Consumer; public class MyHandler { .. .. . ... . . public void MyTraceEventHandler(Object sender, TraceEventArgs e) { Console.WriteLine("Event -- {0}", e.TraceEvent.EventGuid); Console.WriteLine("Event Flags -- {0}", e.TraceEvent.EventFlags); Console.WriteLine("Event Class Name -- {0}", e.TraceEvent.EventClassName); Console.WriteLine("Event Class Desc -- {0}", e.TraceEvent.EventClassDescription); Console.WriteLine("Event Type Name -- {0}", e.TraceEvent.EventTypeName); Console.WriteLine("Event Type Desc -- {0}", e.TraceEvent.EventTypeDescription); Console.WriteLine("Event Severity -- {0}", e.TraceEvent.Severity); Stream mofdata = e.TraceEvent.EventData; Console.WriteLine(" Length -- {0}", mofdata.Length); foreach( TraceEventField Field in e.TraceEvent.EventFields ) { Console.WriteLine( "Field {0}, {1}, {2}", Field.FieldPos, Field.Name, Field.Value); Console.WriteLine( " {0}, {1}", Field.ValueType, Field.DisplayFormat); if (Field.DisplayFormat == EventFieldDisplayFormat.DisplayBitmask) { foreach(TraceEventFieldBitmask Bit in Field.EventBitmasks) { Console.WriteLine( "Bitmask {0}, {1} : {2}", Bit.Name, Bit.Description, Bit.BitSet); } } } e.TraceEvent.Dispose(); } .. .. . ... . . } [Visual Basic] Imports System Imports WmiSolutions.EventTracing Imports WmiSolutions.EventTracing.Controller Public Class MyHandler .. .. . ... . . Public Sub MyTraceEventHandler(ByVal sender As Object, ByVal e As TraceEventArgs) Console.WriteLine("Event -- {0}", e.TraceEvent.EventGuid) Console.WriteLine("Event Flags -- {0}", e.TraceEvent.EventFlags) Console.WriteLine("Event Class Name -- {0}", e.TraceEvent.EventClassName) Console.WriteLine("Event Class Desc -- {0}", e.TraceEvent.EventClassDescription) Console.WriteLine("Event Type Name -- {0}", e.TraceEvent.EventTypeName) Console.WriteLine("Event Type Desc -- {0}", e.TraceEvent.EventTypeDescription) Console.WriteLine("Event Severity -- {0}", e.TraceEvent.Severity) Dim mofdata As Stream = e.TraceEvent.EventData Console.WriteLine(" Length -- {0}", mofdata.Length) Dim Field As TraceEventField For Each Field In e.TraceEvent.EventFields Console.WriteLine("Field {0}, {1}, {2}", Field.FieldPos, Field.Name, Field.Value) Console.WriteLine(" {0}, {1}", Field.ValueType, Field.DisplayFormat) If if(Field.DisplayFormat = Then Dim Bit As TraceEventFieldBitmask For Each Bit In Field.EventBitmasks Console.WriteLine("Bitmask {0}, {1} : {2}", Bit.Name, Bit.Description, Bit.BitSet) Next End If Next e.TraceEvent.Dispose() End Sub .. .. . ... . . End Class RequirementsNamespace: WmiSolutions.EventTracing.Controller Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family Assembly: WmiSolutions.EventTracing.Consumer (in WmiSolutions.EventTracing.dll)
See AlsoTraceMessageEventArgs Members | TraceEventFieldBitmaskCollection Members | TraceEventFieldBitmask Members | TraceEventField Members | TraceEventArgs Members | EventTraceRealTimeLog Members | EventTraceProcessLogs Members | EventTraceOperationObserver Members | EventTraceMessage Members | EventTraceLogFile Members | EventTraceFieldCollection Members | EventTraceEvent Members | EndOfBufferEventArgs Members | CompletedEventArgs Members |
Contact Me | Developing WMI Solutions | Gwyn Cole's Developer Blog | Legal |
© 2003 Content by Gwyn Cole. All rights reserved. |