pub struct Win32_Thread {Show 22 fields
pub Caption: Option<String>,
pub CreationClassName: Option<String>,
pub CSCreationClassName: Option<String>,
pub CSName: Option<String>,
pub Description: Option<String>,
pub ElapsedTime: Option<u64>,
pub ExecutionState: Option<u16>,
pub Handle: Option<String>,
pub InstallDate: Option<WMIDateTime>,
pub KernelModeTime: Option<u64>,
pub Name: Option<String>,
pub OSCreationClassName: Option<String>,
pub OSName: Option<String>,
pub Priority: Option<u32>,
pub PriorityBase: Option<u32>,
pub ProcessCreationClassName: Option<String>,
pub ProcessHandle: Option<String>,
pub StartAddress: Option<u32>,
pub Status: Option<String>,
pub ThreadState: Option<u32>,
pub ThreadWaitReason: Option<u32>,
pub UserModeTime: Option<u64>,
}Expand description
The Win32_Thread WMI 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.
https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-thread
Fields§
§Caption: Option<String>Short description of the object.
CreationClassName: Option<String>Name of the first concrete class to appear in the inheritance chain used in the creation of an instance. When used with the other key properties of the class, this property allows all instances of this class and its subclasses to be uniquely identified.
CSCreationClassName: Option<String>Creation class name of the scoping computer system.
CSName: Option<String>Name of the scoping computer system.
Description: Option<String>Description of the object.
ElapsedTime: Option<u64>Total execution time, in milliseconds, given to this thread since its creation.
ExecutionState: Option<u16>Current operating condition of the thread.
- Unknown (0)
- Other (1)
- Ready (2)
- Running (3)
- Blocked (4)
- Suspended Blocked (5)
- Suspended Ready (6)
Handle: Option<String>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: Option<WMIDateTime>Object was installed. This property does not need a value to indicate that the object is installed.
KernelModeTime: Option<u64>Time in kernel mode, in 100 nanosecond units. If this information is not available, a value of 0 (zero) should be used.
Name: Option<String>Label by which the object is known. When subclassed, the property can be overridden to be a key property.
OSCreationClassName: Option<String>Creation class name of the scoping operating system.
OSName: Option<String>Name of the scoping operating system.
Priority: Option<u32>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: Option<u32>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 property can have a value between 0 and 31.
ProcessCreationClassName: Option<String>Value of the scoping process CreationClassName property.
ProcessHandle: Option<String>Process that created the thread. The contents of this property can be used by Windows application programming interface (API) elements.
StartAddress: Option<u32>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: Option<String>Current status of the object. Various operational and nonoperational statuses can be defined. Operational statuses include: “OK”, “Degraded”, and “Pred Fail” (an element, such as a SMART-enabled hard disk drive, may be functioning properly but predicting a failure in the near future). Nonoperational statuses include: “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 online, yet the managed element is neither “OK” nor in one of the other states.
The values are:
- OK (“OK”)
- Error (“Error”)
- Degraded (“Degraded”)
- Unknown (“Unknown”)
- Pred Fail (“Pred Fail”)
- Starting (“Starting”)
- Stopping (“Stopping”)
- Service (“Service”)
- Stressed (“Stressed”)
- NonRecover (“NonRecover”)
- No Contact (“No Contact”)
- Lost Comm (“Lost Comm”)
ThreadState: Option<u32>Current execution state for the thread.
- Initialized (0) — It is recognized by the microkernel.
- Ready (1) — It is prepared to run on the next available processor.
- Running (2) — It is executing.
- Standby (3) — It is about to run, only one thread may be in this state at a time.
- Terminated (4) — It is finished executing.
- Waiting (5) — It is not ready for the processor, when ready, it will be rescheduled.
- Transition (6) — The thread is waiting for resources other than the processor,
- Unknown (7) — The thread state is unknown.
ThreadWaitReason: Option<u32>Reason why the thread is waiting. This value is only valid if the ThreadState member is set
to Transition (6). Event pairs allow communication with protected subsystems.
- Executive (0)
- FreePage (1)
- PageIn (2)
- PoolAllocation (3)
- ExecutionDelay (4)
- FreePage (5)
- PageIn (6)
- Executive (7)
- FreePage (8)
- PageIn (9)
- PoolAllocation (10)
- ExecutionDelay (11)
- FreePage (12)
- PageIn (13)
- EventPairHigh (14)
- EventPairLow (15)
- LPCReceive (16)
- LPCReply (17)
- VirtualMemory (18)
- PageOut (19)
- Unknown (20)
UserModeTime: Option<u64>Time in user mode, in 100 nanoseconds units. If this information is not available, a value of 0 (zero) should be used.
Trait Implementations§
Source§impl Clone for Win32_Thread
impl Clone for Win32_Thread
Source§fn clone(&self) -> Win32_Thread
fn clone(&self) -> Win32_Thread
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more