toggle_efficiency_mode_handle

Function toggle_efficiency_mode_handle 

Source
pub unsafe fn toggle_efficiency_mode_handle(
    hthread: HANDLE,
    enable: Option<bool>,
) -> Result<(), Error>
Expand description

Toggle efficiency mode of a thread, by a HANDLE.

The handle returned by GetCurrentThread have a THREAD_ALL_ACCESS.

You must enable THREAD_SET_INFORMATION access flag on the handle to apply EcoQoS throttle.

SAFETY: hthread must be a valid process handle. DO NOT pass null ptr, e.g.