Trait winsafe::prelude::kernel_Hthread

source ·
pub trait kernel_Hthread: Handle {
Show 13 methods // Provided methods fn CreateThread( thread_attrs: Option<&mut SECURITY_ATTRIBUTES<'_>>, stack_size: usize, start_addr: *mut c_void, parameter: *mut c_void, flags: THREAD_CREATE ) -> SysResult<(CloseHandleGuard<HTHREAD>, u32)> { ... } fn GetCurrentThread() -> HTHREAD { ... } fn GetExitCodeThread(&self) -> SysResult<u32> { ... } fn GetProcessIdOfThread(&self) -> SysResult<u32> { ... } fn GetThreadId(&self) -> SysResult<u32> { ... } fn GetThreadTimes( &self, creation: &mut FILETIME, exit: &mut FILETIME, kernel: &mut FILETIME, user: &mut FILETIME ) -> SysResult<()> { ... } fn OpenThreadToken( &self, desired_access: TOKEN, open_as_self: bool ) -> SysResult<CloseHandleGuard<HACCESSTOKEN>> { ... } fn ResumeThread(&self) -> SysResult<u32> { ... } fn SetThreadIdealProcessor(&self, ideal_processor: u32) -> SysResult<u32> { ... } fn SetThreadIdealProcessorEx( &self, ideal_processor: PROCESSOR_NUMBER ) -> SysResult<PROCESSOR_NUMBER> { ... } fn SetThreadPriorityBoost( &self, disable_priority_boost: bool ) -> SysResult<()> { ... } fn SuspendThread(&self) -> SysResult<u32> { ... } fn TerminateThread(&self, exit_code: u32) -> SysResult<()> { ... }
}
Available on crate feature kernel only.
Expand description

This trait is enabled with the kernel feature, and provides methods for HTHREAD.

Prefer importing this trait through the prelude:

use winsafe::prelude::*;

Provided Methods§

source

fn CreateThread( thread_attrs: Option<&mut SECURITY_ATTRIBUTES<'_>>, stack_size: usize, start_addr: *mut c_void, parameter: *mut c_void, flags: THREAD_CREATE ) -> SysResult<(CloseHandleGuard<HTHREAD>, u32)>

CreateThread function.

Returns the thread handle and its ID.

source

fn GetCurrentThread() -> HTHREAD

GetCurrentThread function.

source

fn GetExitCodeThread(&self) -> SysResult<u32>

source

fn GetProcessIdOfThread(&self) -> SysResult<u32>

source

fn GetThreadId(&self) -> SysResult<u32>

GetThreadId function.

source

fn GetThreadTimes( &self, creation: &mut FILETIME, exit: &mut FILETIME, kernel: &mut FILETIME, user: &mut FILETIME ) -> SysResult<()>

GetThreadTimes function.

source

fn OpenThreadToken( &self, desired_access: TOKEN, open_as_self: bool ) -> SysResult<CloseHandleGuard<HACCESSTOKEN>>

OpenThreadToken function.

source

fn ResumeThread(&self) -> SysResult<u32>

ResumeThread function.

source

fn SetThreadIdealProcessor(&self, ideal_processor: u32) -> SysResult<u32>

SetThreadIdealProcessor function.

Returns the previous ideal processor.

source

fn SetThreadIdealProcessorEx( &self, ideal_processor: PROCESSOR_NUMBER ) -> SysResult<PROCESSOR_NUMBER>

SetThreadIdealProcessorEx function.

Returns the previous ideal processor.

source

fn SetThreadPriorityBoost(&self, disable_priority_boost: bool) -> SysResult<()>

source

fn SuspendThread(&self) -> SysResult<u32>

SuspendThread function.

source

fn TerminateThread(&self, exit_code: u32) -> SysResult<()>

TerminateThread function.

Object Safety§

This trait is not object safe.

Implementors§