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§
sourcefn 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 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.
sourcefn GetCurrentThread() -> HTHREAD
fn GetCurrentThread() -> HTHREAD
GetCurrentThread
function.
sourcefn GetExitCodeThread(&self) -> SysResult<u32>
fn GetExitCodeThread(&self) -> SysResult<u32>
GetExitCodeThread
function.
sourcefn GetProcessIdOfThread(&self) -> SysResult<u32>
fn GetProcessIdOfThread(&self) -> SysResult<u32>
GetProcessIdOfThread
function.
sourcefn GetThreadId(&self) -> SysResult<u32>
fn GetThreadId(&self) -> SysResult<u32>
GetThreadId
function.
sourcefn GetThreadTimes(
&self,
creation: &mut FILETIME,
exit: &mut FILETIME,
kernel: &mut FILETIME,
user: &mut FILETIME
) -> SysResult<()>
fn GetThreadTimes( &self, creation: &mut FILETIME, exit: &mut FILETIME, kernel: &mut FILETIME, user: &mut FILETIME ) -> SysResult<()>
GetThreadTimes
function.
sourcefn OpenThreadToken(
&self,
desired_access: TOKEN,
open_as_self: bool
) -> SysResult<CloseHandleGuard<HACCESSTOKEN>>
fn OpenThreadToken( &self, desired_access: TOKEN, open_as_self: bool ) -> SysResult<CloseHandleGuard<HACCESSTOKEN>>
OpenThreadToken
function.
sourcefn ResumeThread(&self) -> SysResult<u32>
fn ResumeThread(&self) -> SysResult<u32>
ResumeThread
function.
sourcefn SetThreadIdealProcessor(&self, ideal_processor: u32) -> SysResult<u32>
fn SetThreadIdealProcessor(&self, ideal_processor: u32) -> SysResult<u32>
SetThreadIdealProcessor
function.
Returns the previous ideal processor.
sourcefn SetThreadIdealProcessorEx(
&self,
ideal_processor: PROCESSOR_NUMBER
) -> SysResult<PROCESSOR_NUMBER>
fn SetThreadIdealProcessorEx( &self, ideal_processor: PROCESSOR_NUMBER ) -> SysResult<PROCESSOR_NUMBER>
SetThreadIdealProcessorEx
function.
Returns the previous ideal processor.
sourcefn SetThreadPriorityBoost(&self, disable_priority_boost: bool) -> SysResult<()>
fn SetThreadPriorityBoost(&self, disable_priority_boost: bool) -> SysResult<()>
SetThreadPriorityBoost
function.
sourcefn SuspendThread(&self) -> SysResult<u32>
fn SuspendThread(&self) -> SysResult<u32>
SuspendThread
function.
sourcefn TerminateThread(&self, exit_code: u32) -> SysResult<()>
fn TerminateThread(&self, exit_code: u32) -> SysResult<()>
TerminateThread
function.
Object Safety§
This trait is not object safe.