A trace message in the event stream from the event tracer. For a list of all members of this type, see EventTraceMessage Members. System.Object [Visual Basic] Public Class EventTraceMessage Inherits MarshalByRefObject Implements IDisposable [C#] public class EventTraceMessage : MarshalByRefObject, IDisposable [C++] public __gc class EventTraceMessage : public MarshalByRefObject, public IDisposable Example[C#] using System; using WmiSolutions.EventTracing; using WmiSolutions.EventTracing.Consumer; public class MyHandler { .. .. . ... . . public void MyTraceMessageHandler(Object sender, TraceMessageEventArgs e) { Console.WriteLine("Message Message Number -- {0}", e.TraceMessage.MessageNumber); if ((e.TraceMessage.MessageFlags & EventTraceMessageFlags.FlagSequence) > 0) Console.WriteLine("Message Sequence Number -- {0}", e.TraceMessage.SequenceNumber); if ((e.TraceMessage.MessageFlags & EventTraceMessageFlags.FlagComponentID) > 0) Console.WriteLine("Message Component ID -- {0}", e.TraceMessage.ComponentID); if ((e.TraceMessage.MessageFlags & EventTraceMessageFlags.FlagMessageGuid) > 0) Console.WriteLine("Message Guid -- {0}", e.TraceMessage.MessageGuid); if ((e.TraceMessage.MessageFlags & EventTraceMessageFlags.FlagTimeStamp) > 0) Console.WriteLine("Message TimeStamp -- {0}", e.TraceMessage.TimeStamp); if ((e.TraceMessage.MessageFlags & EventTraceMessageFlags.FlagSystemInfo) > 0) Console.WriteLine("Message Thread -- {0} : Process -- {1}", e.TraceMessage.ThreadID, e.TraceMessage.ProcessID); Stream mofdata = e.TraceMessage.MessageData; Console.WriteLine(" Length -- {0}", mofdata.Length); e.TraceMessage.Dispose(); } .. .. . ... . . } [Visual Basic] Imports System Imports WmiSolutions.EventTracing Imports WmiSolutions.EventTracing.Consumer Public Class MyHandler .. .. . ... . . Public Sub MyTraceMessageHandler(ByVal sender As Object, ByVal e As TraceMessageEventArgs) Console.WriteLine("Message Message Number -- {0}", e.TraceMessage.MessageNumber) If (e.TraceMessage.MessageFlags & EventTraceMessageFlags.FlagSequence) > 0 Then Console.WriteLine("Message Sequence Number -- {0}", e.TraceMessage.SequenceNumber) End If If (e.TraceMessage.MessageFlags & EventTraceMessageFlags.FlagComponentID) > 0 Then Console.WriteLine("Message Component ID -- {0}", e.TraceMessage.ComponentID) End If If (e.TraceMessage.MessageFlags & EventTraceMessageFlags.FlagMessageGuid) > 0 Then Console.WriteLine("Message Guid -- {0}", e.TraceMessage.MessageGuid) End If If (e.TraceMessage.MessageFlags & EventTraceMessageFlags.FlagTimeStamp) > 0 Then Console.WriteLine("Message TimeStamp -- {0}", e.TraceMessage.TimeStamp) End If If (e.TraceMessage.MessageFlags & EventTraceMessageFlags.FlagSystemInfo) > 0 Then Console.WriteLine("Message Thread -- {0} : Process -- {1}", e.TraceMessage.ThreadID, e.TraceMessage.ProcessID) End If Dim mofdata As Stream = e.TraceMessage.MessageData Console.WriteLine(" Length -- {0}", mofdata.Length) e.TraceMessage.Dispose() End Sub .. .. . ... . . End Class RequirementsNamespace: WmiSolutions.EventTracing.Consumer Platforms: Windows 2000, 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. |