- WMI Library -
WMI Libraly > Win32_Thread Class

Win32_Thread Class

The Win32_Thread class represents a thread of execution.While a process must have one thread of execution, the process can create other threads to execute tasks in parallel. Threads share the process environment, thus multiple threads under the same process use less memory than the same number of processes.
Namespace value is root/CIMV2.
WMI Provider value is CIMWin32.


Properties

  • Caption
  • The Caption property is a short textual description (one-line string) of the object.

  • CreationClassName
  • CreationClassName indicates the name of the class or the subclass used in the creation of an instance. When used with the other key properties of this class, this property allow all instances of this class and its subclasses to be uniquely identified.

  • CSCreationClassName
  • The scoping computer system's creation class name.

  • CSName
  • The scoping computer system's name.

  • Description
  • The Description property provides a textual description of the object.

  • ElapsedTime
  • The ElapsedTime property indicates the total execution time given to this thread since its creation.

  • ExecutionState
  • Indicates the current operating condition of the thread. Values include ready (2), running (3), and blocked (4), among others.

  • Handle
  • The Handle property represents a handle to a thread. The handle has full access rights by default. With the correct security access, the handle can be used in any function that accepts a thread handle. Depending on the inheritance flag specified when it is created, this handle can be inherited by child processes.

  • InstallDate
  • The InstallDate property is datetime value indicating when the object was installed. A lack of a value does not indicate that the object is not installed.

  • KernelModeTime
  • The KernelModeTime property indicates the raw counter data from the performance counter type
    PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT
    The counter data is in 100 nanosecond units.

  • Name
  • The Name property defines the label by which the object is known. When subclassed, the Name property can be overridden to be a Key property.

  • OSCreationClassName
  • The scoping operating system's creation class name.

  • OSName
  • The scoping operating system's name.

  • Priority
  • The Priority property indicates the dynamic priority of the thread. Each thread has a dynamic priority that the scheduler uses to determine which thread to execute. Initially, a thread's dynamic priority is the same as its base priority. The system can raise and lower the dynamic priority, to ensure that it is responsive (guaranteeing that no threads are starved for processor time). The system does not boost the priority of threads with a base priority level between 16 and 31. Only threads with a base priority between 0 and 15 receive dynamic priority boosts. Higher numbers indicate higher priorities.

  • PriorityBase
  • The PriorityBase property indicates the current base priority of a thread. The operating system may raise the thread's dynamic priority above the base priority if the thread is handling user input, or lower it toward the base priority if the thread becomes compute-bound. The PriorityBase propertycan have a value between 0 and 31

  • ProcessCreationClassName
  • The scoping process' CreationClassName.

  • ProcessHandle
  • The ProcessHandle property indicates the process that created the thread. The contents of this property can be used by Win32 API elements.

  • StartAddress
  • The StartAddress property indicates the starting address of the thread. Because any application with appropriate access to the thread can change the thread's context, this value may only be an approximation of the thread's starting address.

  • Status
  • The Status property is a string indicating the current status of the object. Various operational and non-operational statuses can be defined. Operational statuses are "OK", "Degraded" and "Pred Fail". "Pred Fail" indicates that an element may be functioning properly but predicting a failure in the near future. An example is a SMART-enabled hard drive. Non-operational statuses can also be specified. These are "Error", "Starting", "Stopping" and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is on-line, yet the managed element is neither "OK" nor in one of the other states.

  • ThreadState
  • The ThreadState property indicates the current execution state for the thread. A thread can have one of eight values: Initialized (recognized by the microkernel), Ready (prepared to run on next available processor), Running (executing), Standby (about to run, only one thread may be in this state at a time), Terminated (finished executing), Waiting (not ready for the processor, when ready, it will be rescheduled), Transition (thread is waiting for resources other than the processor), and Unknown (the thread state is unknown).

  • ThreadWaitReason
  • The ThreadWaitReason property indicates why the thread is waiting. The value is only valid if the ThreadState member is set to Waiting. Values of 0 or 7 denote that the thread is waiting for the Executive, 1 or 8 for a Free Page, 2 or 9 for a Page In, 3 or 10 for a Pool Allocation, 4 or 11 for an Execution Delay, 5 or 12 for a Suspended condition, 6 or 13 for a User Request, 14 for an Event Pair High, 15 for an Event Pair Low, 16 for an Local Procedure Call (LPC) Receive, 17 for an LPC Reply, 18 for Virtual Memory, 19 for a Page Out. 20 and higher are not assigned. Event Pairs allow communication with protected subsystems (see Context Switches).

  • UserModeTime
  • The UserModeTime property indicates the raw counter data from the performance counter type
    PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_DELTA_COUNTER | PERF_DISPLAY_PERCENT
    The counter data is in 100 nanosecond units.


    Methods

    Method not found.

    Example WQL

    SELECT * FROM Win32_Thread
    About this site information

    This contents is created by WMI having class information.
    WMI Environment is Windows Server 2008 R2 Enterprise Edition.

    This link is Microsoft documents for "Managing Windows with WMI".
    That is VB(Visual Basic) scripting sample.
    This link is Microsoft documents for "Advanced Programming Topics in WMI .NET".
    That is VB.net(Visual Basic .net) scripting sample.

    - WMI Library -
    http://library.wmifun.net/

    WMI useful by VB,VB.Net,VC,VC.Net,VC#.Net,VBS(WSH),PowerShell for PC asset management, system monitoring and collecting hardware and software inventory.

    This website is created by Toh.
    Copyright(C) 1997-2016 WMI Fun !!. All rights reserved.
    ^ Go to the top...