Thread Class

Syntax

[Guid("{3d6fa8d1-fe05-11d0-9dda-00c04fd7ba7c}"), EventVersion(3)]class Thread : MSNT_SystemTrace
{
};

Methods

The Thread class inherits from MSNT_SystemTrace but does not define additional methods or properties.

Remarks

To enable thread events in an NT Kernel logging session, specify the EVENT_TRACE_FLAG_THREAD flag in the EnableFlags member of an EVENT_TRACE_PROPERTIES structure when calling the StartTrace function.

Event trace consumers can implement special processing for thread events by calling the SetTraceCallback function and specifying ThreadGuid as the pGuid parameter. Use the following event types to identify the actual thread event when consuming events.

Event typeDescription
EVENT_TRACE_TYPE_END

(Event type value is 2)

End thread event. The Thread_TypeGroup1 MOF class defines the event data for this event.
EVENT_TRACE_TYPE_START

(Event type value is 1)

Start thread event. The Thread_TypeGroup1 MOF class defines the event data for this event.
Event type value, 3 Start data collection thread event. Enumerates threads that are currently running at the time the kernel session starts. The Thread_TypeGroup1 MOF class defines the event data for this event.
Event type value, 4 End data collection thread event. Enumerates threads that are currently running at the time the kernel session ends. The Thread_TypeGroup1 MOF class defines the event data for this event.

 

Process and thread start events may be logged in the context of the parent process or thread. As a result, the ProcessId and ThreadId members of EVENT_TRACE_HEADER may not correspond to the process and thread being created. This is why these events contain the process and thread identifiers in the event data (in addition to those in the event header).

Requirements

Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008

See Also

Thread_TypeGroup1
Thread_V0
Thread_V1
Thread_V2

Send comments about this topic to Microsoft

Build date: 10/15/2009

Tags :


Page view tracker