Win32_Thread

Struct Win32_Thread 

Source
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

Source§

fn clone(&self) -> Win32_Thread

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Win32_Thread

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Win32_Thread

Source§

fn default() -> Win32_Thread

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Win32_Thread

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Win32_Thread

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,