Edit

Share via


Thread class

This class is the parent class for thread events.

The following syntax is simplified from MOF code.

Syntax

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

Members

The Thread class does not define any members.

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 type Description
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

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]

See also

MSNT_SystemTrace

Thread_TypeGroup1

Thread_V0

Thread_V1

Thread_V2