1 #![allow(non_snake_case, non_camel_case_types, non_upper_case_globals, clashing_extern_declarations, clippy::all)]
2 #[link(name = "windows")]
3 extern "system" {
CallNtPowerInformation(informationlevel: POWER_INFORMATION_LEVEL, inputbuffer: *const ::core::ffi::c_void, inputbufferlength: u32, outputbuffer: *mut ::core::ffi::c_void, outputbufferlength: u32) -> i324     pub fn CallNtPowerInformation(informationlevel: POWER_INFORMATION_LEVEL, inputbuffer: *const ::core::ffi::c_void, inputbufferlength: u32, outputbuffer: *mut ::core::ffi::c_void, outputbufferlength: u32) -> i32;
5     #[cfg(feature = "Win32_Foundation")]
CanUserWritePwrScheme() -> super::super::Foundation::BOOLEAN6     pub fn CanUserWritePwrScheme() -> super::super::Foundation::BOOLEAN;
7     #[cfg(feature = "Win32_Foundation")]
DeletePwrScheme(uiid: u32) -> super::super::Foundation::BOOLEAN8     pub fn DeletePwrScheme(uiid: u32) -> super::super::Foundation::BOOLEAN;
9     #[cfg(feature = "Win32_Foundation")]
DevicePowerClose() -> super::super::Foundation::BOOLEAN10     pub fn DevicePowerClose() -> super::super::Foundation::BOOLEAN;
11     #[cfg(feature = "Win32_Foundation")]
DevicePowerEnumDevices(queryindex: u32, queryinterpretationflags: u32, queryflags: u32, preturnbuffer: *mut u8, pbuffersize: *mut u32) -> super::super::Foundation::BOOLEAN12     pub fn DevicePowerEnumDevices(queryindex: u32, queryinterpretationflags: u32, queryflags: u32, preturnbuffer: *mut u8, pbuffersize: *mut u32) -> super::super::Foundation::BOOLEAN;
13     #[cfg(feature = "Win32_Foundation")]
DevicePowerOpen(debugmask: u32) -> super::super::Foundation::BOOLEAN14     pub fn DevicePowerOpen(debugmask: u32) -> super::super::Foundation::BOOLEAN;
15     #[cfg(feature = "Win32_Foundation")]
DevicePowerSetDeviceState(devicedescription: super::super::Foundation::PWSTR, setflags: u32, setdata: *const ::core::ffi::c_void) -> u3216     pub fn DevicePowerSetDeviceState(devicedescription: super::super::Foundation::PWSTR, setflags: u32, setdata: *const ::core::ffi::c_void) -> u32;
17     #[cfg(feature = "Win32_Foundation")]
EnumPwrSchemes(lpfn: ::core::option::Option<PWRSCHEMESENUMPROC>, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOLEAN18     pub fn EnumPwrSchemes(lpfn: ::core::option::Option<PWRSCHEMESENUMPROC>, lparam: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOLEAN;
19     #[cfg(feature = "Win32_Foundation")]
GetActivePwrScheme(puiid: *mut u32) -> super::super::Foundation::BOOLEAN20     pub fn GetActivePwrScheme(puiid: *mut u32) -> super::super::Foundation::BOOLEAN;
21     #[cfg(feature = "Win32_Foundation")]
GetCurrentPowerPolicies(pglobalpowerpolicy: *mut GLOBAL_POWER_POLICY, ppowerpolicy: *mut POWER_POLICY) -> super::super::Foundation::BOOLEAN22     pub fn GetCurrentPowerPolicies(pglobalpowerpolicy: *mut GLOBAL_POWER_POLICY, ppowerpolicy: *mut POWER_POLICY) -> super::super::Foundation::BOOLEAN;
23     #[cfg(feature = "Win32_Foundation")]
GetDevicePowerState(hdevice: super::super::Foundation::HANDLE, pfon: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL24     pub fn GetDevicePowerState(hdevice: super::super::Foundation::HANDLE, pfon: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL;
25     #[cfg(feature = "Win32_Foundation")]
GetPwrCapabilities(lpspc: *mut SYSTEM_POWER_CAPABILITIES) -> super::super::Foundation::BOOLEAN26     pub fn GetPwrCapabilities(lpspc: *mut SYSTEM_POWER_CAPABILITIES) -> super::super::Foundation::BOOLEAN;
27     #[cfg(feature = "Win32_Foundation")]
GetPwrDiskSpindownRange(puimax: *mut u32, puimin: *mut u32) -> super::super::Foundation::BOOLEAN28     pub fn GetPwrDiskSpindownRange(puimax: *mut u32, puimin: *mut u32) -> super::super::Foundation::BOOLEAN;
29     #[cfg(feature = "Win32_Foundation")]
GetSystemPowerStatus(lpsystempowerstatus: *mut SYSTEM_POWER_STATUS) -> super::super::Foundation::BOOL30     pub fn GetSystemPowerStatus(lpsystempowerstatus: *mut SYSTEM_POWER_STATUS) -> super::super::Foundation::BOOL;
31     #[cfg(feature = "Win32_Foundation")]
IsAdminOverrideActive(papp: *const ADMINISTRATOR_POWER_POLICY) -> super::super::Foundation::BOOLEAN32     pub fn IsAdminOverrideActive(papp: *const ADMINISTRATOR_POWER_POLICY) -> super::super::Foundation::BOOLEAN;
33     #[cfg(feature = "Win32_Foundation")]
IsPwrHibernateAllowed() -> super::super::Foundation::BOOLEAN34     pub fn IsPwrHibernateAllowed() -> super::super::Foundation::BOOLEAN;
35     #[cfg(feature = "Win32_Foundation")]
IsPwrShutdownAllowed() -> super::super::Foundation::BOOLEAN36     pub fn IsPwrShutdownAllowed() -> super::super::Foundation::BOOLEAN;
37     #[cfg(feature = "Win32_Foundation")]
IsPwrSuspendAllowed() -> super::super::Foundation::BOOLEAN38     pub fn IsPwrSuspendAllowed() -> super::super::Foundation::BOOLEAN;
39     #[cfg(feature = "Win32_Foundation")]
IsSystemResumeAutomatic() -> super::super::Foundation::BOOL40     pub fn IsSystemResumeAutomatic() -> super::super::Foundation::BOOL;
PowerCanRestoreIndividualDefaultPowerScheme(schemeguid: *const ::windows_sys::core::GUID) -> u3241     pub fn PowerCanRestoreIndividualDefaultPowerScheme(schemeguid: *const ::windows_sys::core::GUID) -> u32;
42     #[cfg(feature = "Win32_Foundation")]
PowerClearRequest(powerrequest: super::super::Foundation::HANDLE, requesttype: POWER_REQUEST_TYPE) -> super::super::Foundation::BOOL43     pub fn PowerClearRequest(powerrequest: super::super::Foundation::HANDLE, requesttype: POWER_REQUEST_TYPE) -> super::super::Foundation::BOOL;
44     #[cfg(feature = "Win32_System_Registry")]
PowerCreatePossibleSetting(rootsystempowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, possiblesettingindex: u32) -> u3245     pub fn PowerCreatePossibleSetting(rootsystempowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, possiblesettingindex: u32) -> u32;
46     #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Threading"))]
PowerCreateRequest(context: *const super::Threading::REASON_CONTEXT) -> super::super::Foundation::HANDLE47     pub fn PowerCreateRequest(context: *const super::Threading::REASON_CONTEXT) -> super::super::Foundation::HANDLE;
48     #[cfg(feature = "Win32_System_Registry")]
PowerCreateSetting(rootsystempowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID) -> u3249     pub fn PowerCreateSetting(rootsystempowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID) -> u32;
50     #[cfg(feature = "Win32_System_Registry")]
PowerDeleteScheme(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID) -> u3251     pub fn PowerDeleteScheme(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID) -> u32;
PowerDeterminePlatformRole() -> POWER_PLATFORM_ROLE52     pub fn PowerDeterminePlatformRole() -> POWER_PLATFORM_ROLE;
PowerDeterminePlatformRoleEx(version: POWER_PLATFORM_ROLE_VERSION) -> POWER_PLATFORM_ROLE53     pub fn PowerDeterminePlatformRoleEx(version: POWER_PLATFORM_ROLE_VERSION) -> POWER_PLATFORM_ROLE;
54     #[cfg(feature = "Win32_System_Registry")]
PowerDuplicateScheme(rootpowerkey: super::Registry::HKEY, sourceschemeguid: *const ::windows_sys::core::GUID, destinationschemeguid: *mut *mut ::windows_sys::core::GUID) -> u3255     pub fn PowerDuplicateScheme(rootpowerkey: super::Registry::HKEY, sourceschemeguid: *const ::windows_sys::core::GUID, destinationschemeguid: *mut *mut ::windows_sys::core::GUID) -> u32;
56     #[cfg(feature = "Win32_System_Registry")]
PowerEnumerate(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, accessflags: POWER_DATA_ACCESSOR, index: u32, buffer: *mut u8, buffersize: *mut u32) -> u3257     pub fn PowerEnumerate(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, accessflags: POWER_DATA_ACCESSOR, index: u32, buffer: *mut u8, buffersize: *mut u32) -> u32;
58     #[cfg(feature = "Win32_System_Registry")]
PowerGetActiveScheme(userrootpowerkey: super::Registry::HKEY, activepolicyguid: *mut *mut ::windows_sys::core::GUID) -> u3259     pub fn PowerGetActiveScheme(userrootpowerkey: super::Registry::HKEY, activepolicyguid: *mut *mut ::windows_sys::core::GUID) -> u32;
60     #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))]
PowerImportPowerScheme(rootpowerkey: super::Registry::HKEY, importfilenamepath: super::super::Foundation::PWSTR, destinationschemeguid: *mut *mut ::windows_sys::core::GUID) -> u3261     pub fn PowerImportPowerScheme(rootpowerkey: super::Registry::HKEY, importfilenamepath: super::super::Foundation::PWSTR, destinationschemeguid: *mut *mut ::windows_sys::core::GUID) -> u32;
62     #[cfg(feature = "Win32_Foundation")]
PowerIsSettingRangeDefined(subkeyguid: *const ::windows_sys::core::GUID, settingguid: *const ::windows_sys::core::GUID) -> super::super::Foundation::BOOLEAN63     pub fn PowerIsSettingRangeDefined(subkeyguid: *const ::windows_sys::core::GUID, settingguid: *const ::windows_sys::core::GUID) -> super::super::Foundation::BOOLEAN;
64     #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))]
PowerOpenSystemPowerKey(phsystempowerkey: *mut super::Registry::HKEY, access: u32, openexisting: super::super::Foundation::BOOL) -> u3265     pub fn PowerOpenSystemPowerKey(phsystempowerkey: *mut super::Registry::HKEY, access: u32, openexisting: super::super::Foundation::BOOL) -> u32;
66     #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))]
PowerOpenUserPowerKey(phuserpowerkey: *mut super::Registry::HKEY, access: u32, openexisting: super::super::Foundation::BOOL) -> u3267     pub fn PowerOpenUserPowerKey(phuserpowerkey: *mut super::Registry::HKEY, access: u32, openexisting: super::super::Foundation::BOOL) -> u32;
68     #[cfg(feature = "Win32_System_Registry")]
PowerReadACDefaultIndex(rootpowerkey: super::Registry::HKEY, schemepersonalityguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, acdefaultindex: *mut u32) -> u3269     pub fn PowerReadACDefaultIndex(rootpowerkey: super::Registry::HKEY, schemepersonalityguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, acdefaultindex: *mut u32) -> u32;
70     #[cfg(feature = "Win32_System_Registry")]
PowerReadACValue(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, r#type: *mut u32, buffer: *mut u8, buffersize: *mut u32) -> u3271     pub fn PowerReadACValue(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, r#type: *mut u32, buffer: *mut u8, buffersize: *mut u32) -> u32;
72     #[cfg(feature = "Win32_System_Registry")]
PowerReadACValueIndex(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, acvalueindex: *mut u32) -> u3273     pub fn PowerReadACValueIndex(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, acvalueindex: *mut u32) -> u32;
74     #[cfg(feature = "Win32_System_Registry")]
PowerReadDCDefaultIndex(rootpowerkey: super::Registry::HKEY, schemepersonalityguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, dcdefaultindex: *mut u32) -> u3275     pub fn PowerReadDCDefaultIndex(rootpowerkey: super::Registry::HKEY, schemepersonalityguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, dcdefaultindex: *mut u32) -> u32;
76     #[cfg(feature = "Win32_System_Registry")]
PowerReadDCValue(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, r#type: *mut u32, buffer: *mut u8, buffersize: *mut u32) -> u3277     pub fn PowerReadDCValue(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, r#type: *mut u32, buffer: *mut u8, buffersize: *mut u32) -> u32;
78     #[cfg(feature = "Win32_System_Registry")]
PowerReadDCValueIndex(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, dcvalueindex: *mut u32) -> u3279     pub fn PowerReadDCValueIndex(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, dcvalueindex: *mut u32) -> u32;
80     #[cfg(feature = "Win32_System_Registry")]
PowerReadDescription(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *mut u8, buffersize: *mut u32) -> u3281     pub fn PowerReadDescription(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *mut u8, buffersize: *mut u32) -> u32;
82     #[cfg(feature = "Win32_System_Registry")]
PowerReadFriendlyName(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *mut u8, buffersize: *mut u32) -> u3283     pub fn PowerReadFriendlyName(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *mut u8, buffersize: *mut u32) -> u32;
84     #[cfg(feature = "Win32_System_Registry")]
PowerReadIconResourceSpecifier(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *mut u8, buffersize: *mut u32) -> u3285     pub fn PowerReadIconResourceSpecifier(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *mut u8, buffersize: *mut u32) -> u32;
86     #[cfg(feature = "Win32_System_Registry")]
PowerReadPossibleDescription(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, possiblesettingindex: u32, buffer: *mut u8, buffersize: *mut u32) -> u3287     pub fn PowerReadPossibleDescription(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, possiblesettingindex: u32, buffer: *mut u8, buffersize: *mut u32) -> u32;
88     #[cfg(feature = "Win32_System_Registry")]
PowerReadPossibleFriendlyName(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, possiblesettingindex: u32, buffer: *mut u8, buffersize: *mut u32) -> u3289     pub fn PowerReadPossibleFriendlyName(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, possiblesettingindex: u32, buffer: *mut u8, buffersize: *mut u32) -> u32;
90     #[cfg(feature = "Win32_System_Registry")]
PowerReadPossibleValue(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, r#type: *mut u32, possiblesettingindex: u32, buffer: *mut u8, buffersize: *mut u32) -> u3291     pub fn PowerReadPossibleValue(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, r#type: *mut u32, possiblesettingindex: u32, buffer: *mut u8, buffersize: *mut u32) -> u32;
PowerReadSettingAttributes(subgroupguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID) -> u3292     pub fn PowerReadSettingAttributes(subgroupguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID) -> u32;
93     #[cfg(feature = "Win32_System_Registry")]
PowerReadValueIncrement(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valueincrement: *mut u32) -> u3294     pub fn PowerReadValueIncrement(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valueincrement: *mut u32) -> u32;
95     #[cfg(feature = "Win32_System_Registry")]
PowerReadValueMax(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valuemaximum: *mut u32) -> u3296     pub fn PowerReadValueMax(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valuemaximum: *mut u32) -> u32;
97     #[cfg(feature = "Win32_System_Registry")]
PowerReadValueMin(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valueminimum: *mut u32) -> u3298     pub fn PowerReadValueMin(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valueminimum: *mut u32) -> u32;
99     #[cfg(feature = "Win32_System_Registry")]
PowerReadValueUnitsSpecifier(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *mut u8, buffersize: *mut u32) -> u32100     pub fn PowerReadValueUnitsSpecifier(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *mut u8, buffersize: *mut u32) -> u32;
PowerRegisterForEffectivePowerModeNotifications(version: u32, callback: ::core::option::Option<EFFECTIVE_POWER_MODE_CALLBACK>, context: *const ::core::ffi::c_void, registrationhandle: *mut *mut ::core::ffi::c_void) -> ::windows_sys::core::HRESULT101     pub fn PowerRegisterForEffectivePowerModeNotifications(version: u32, callback: ::core::option::Option<EFFECTIVE_POWER_MODE_CALLBACK>, context: *const ::core::ffi::c_void, registrationhandle: *mut *mut ::core::ffi::c_void) -> ::windows_sys::core::HRESULT;
102     #[cfg(feature = "Win32_Foundation")]
PowerRegisterSuspendResumeNotification(flags: u32, recipient: super::super::Foundation::HANDLE, registrationhandle: *mut *mut ::core::ffi::c_void) -> u32103     pub fn PowerRegisterSuspendResumeNotification(flags: u32, recipient: super::super::Foundation::HANDLE, registrationhandle: *mut *mut ::core::ffi::c_void) -> u32;
PowerRemovePowerSetting(powersettingsubkeyguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID) -> u32104     pub fn PowerRemovePowerSetting(powersettingsubkeyguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID) -> u32;
PowerReplaceDefaultPowerSchemes() -> u32105     pub fn PowerReplaceDefaultPowerSchemes() -> u32;
106     #[cfg(feature = "Win32_Foundation")]
PowerReportThermalEvent(event: *const THERMAL_EVENT) -> u32107     pub fn PowerReportThermalEvent(event: *const THERMAL_EVENT) -> u32;
PowerRestoreDefaultPowerSchemes() -> u32108     pub fn PowerRestoreDefaultPowerSchemes() -> u32;
PowerRestoreIndividualDefaultPowerScheme(schemeguid: *const ::windows_sys::core::GUID) -> u32109     pub fn PowerRestoreIndividualDefaultPowerScheme(schemeguid: *const ::windows_sys::core::GUID) -> u32;
110     #[cfg(feature = "Win32_System_Registry")]
PowerSetActiveScheme(userrootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID) -> u32111     pub fn PowerSetActiveScheme(userrootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID) -> u32;
112     #[cfg(feature = "Win32_Foundation")]
PowerSetRequest(powerrequest: super::super::Foundation::HANDLE, requesttype: POWER_REQUEST_TYPE) -> super::super::Foundation::BOOL113     pub fn PowerSetRequest(powerrequest: super::super::Foundation::HANDLE, requesttype: POWER_REQUEST_TYPE) -> super::super::Foundation::BOOL;
PowerSettingAccessCheck(accessflags: POWER_DATA_ACCESSOR, powerguid: *const ::windows_sys::core::GUID) -> u32114     pub fn PowerSettingAccessCheck(accessflags: POWER_DATA_ACCESSOR, powerguid: *const ::windows_sys::core::GUID) -> u32;
115     #[cfg(feature = "Win32_System_Registry")]
PowerSettingAccessCheckEx(accessflags: POWER_DATA_ACCESSOR, powerguid: *const ::windows_sys::core::GUID, accesstype: super::Registry::REG_SAM_FLAGS) -> u32116     pub fn PowerSettingAccessCheckEx(accessflags: POWER_DATA_ACCESSOR, powerguid: *const ::windows_sys::core::GUID, accesstype: super::Registry::REG_SAM_FLAGS) -> u32;
117     #[cfg(feature = "Win32_Foundation")]
PowerSettingRegisterNotification(settingguid: *const ::windows_sys::core::GUID, flags: POWER_SETTING_REGISTER_NOTIFICATION_FLAGS, recipient: super::super::Foundation::HANDLE, registrationhandle: *mut *mut ::core::ffi::c_void) -> u32118     pub fn PowerSettingRegisterNotification(settingguid: *const ::windows_sys::core::GUID, flags: POWER_SETTING_REGISTER_NOTIFICATION_FLAGS, recipient: super::super::Foundation::HANDLE, registrationhandle: *mut *mut ::core::ffi::c_void) -> u32;
PowerSettingUnregisterNotification(registrationhandle: HPOWERNOTIFY) -> u32119     pub fn PowerSettingUnregisterNotification(registrationhandle: HPOWERNOTIFY) -> u32;
PowerUnregisterFromEffectivePowerModeNotifications(registrationhandle: *const ::core::ffi::c_void) -> ::windows_sys::core::HRESULT120     pub fn PowerUnregisterFromEffectivePowerModeNotifications(registrationhandle: *const ::core::ffi::c_void) -> ::windows_sys::core::HRESULT;
PowerUnregisterSuspendResumeNotification(registrationhandle: HPOWERNOTIFY) -> u32121     pub fn PowerUnregisterSuspendResumeNotification(registrationhandle: HPOWERNOTIFY) -> u32;
122     #[cfg(feature = "Win32_System_Registry")]
PowerWriteACDefaultIndex(rootsystempowerkey: super::Registry::HKEY, schemepersonalityguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, defaultacindex: u32) -> u32123     pub fn PowerWriteACDefaultIndex(rootsystempowerkey: super::Registry::HKEY, schemepersonalityguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, defaultacindex: u32) -> u32;
124     #[cfg(feature = "Win32_System_Registry")]
PowerWriteACValueIndex(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, acvalueindex: u32) -> u32125     pub fn PowerWriteACValueIndex(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, acvalueindex: u32) -> u32;
126     #[cfg(feature = "Win32_System_Registry")]
PowerWriteDCDefaultIndex(rootsystempowerkey: super::Registry::HKEY, schemepersonalityguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, defaultdcindex: u32) -> u32127     pub fn PowerWriteDCDefaultIndex(rootsystempowerkey: super::Registry::HKEY, schemepersonalityguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, defaultdcindex: u32) -> u32;
128     #[cfg(feature = "Win32_System_Registry")]
PowerWriteDCValueIndex(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, dcvalueindex: u32) -> u32129     pub fn PowerWriteDCValueIndex(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, dcvalueindex: u32) -> u32;
130     #[cfg(feature = "Win32_System_Registry")]
PowerWriteDescription(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *const u8, buffersize: u32) -> u32131     pub fn PowerWriteDescription(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *const u8, buffersize: u32) -> u32;
132     #[cfg(feature = "Win32_System_Registry")]
PowerWriteFriendlyName(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *const u8, buffersize: u32) -> u32133     pub fn PowerWriteFriendlyName(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *const u8, buffersize: u32) -> u32;
134     #[cfg(feature = "Win32_System_Registry")]
PowerWriteIconResourceSpecifier(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *const u8, buffersize: u32) -> u32135     pub fn PowerWriteIconResourceSpecifier(rootpowerkey: super::Registry::HKEY, schemeguid: *const ::windows_sys::core::GUID, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *const u8, buffersize: u32) -> u32;
136     #[cfg(feature = "Win32_System_Registry")]
PowerWritePossibleDescription(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, possiblesettingindex: u32, buffer: *const u8, buffersize: u32) -> u32137     pub fn PowerWritePossibleDescription(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, possiblesettingindex: u32, buffer: *const u8, buffersize: u32) -> u32;
138     #[cfg(feature = "Win32_System_Registry")]
PowerWritePossibleFriendlyName(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, possiblesettingindex: u32, buffer: *const u8, buffersize: u32) -> u32139     pub fn PowerWritePossibleFriendlyName(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, possiblesettingindex: u32, buffer: *const u8, buffersize: u32) -> u32;
140     #[cfg(feature = "Win32_System_Registry")]
PowerWritePossibleValue(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, r#type: u32, possiblesettingindex: u32, buffer: *const u8, buffersize: u32) -> u32141     pub fn PowerWritePossibleValue(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, r#type: u32, possiblesettingindex: u32, buffer: *const u8, buffersize: u32) -> u32;
PowerWriteSettingAttributes(subgroupguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, attributes: u32) -> u32142     pub fn PowerWriteSettingAttributes(subgroupguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, attributes: u32) -> u32;
143     #[cfg(feature = "Win32_System_Registry")]
PowerWriteValueIncrement(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valueincrement: u32) -> u32144     pub fn PowerWriteValueIncrement(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valueincrement: u32) -> u32;
145     #[cfg(feature = "Win32_System_Registry")]
PowerWriteValueMax(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valuemaximum: u32) -> u32146     pub fn PowerWriteValueMax(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valuemaximum: u32) -> u32;
147     #[cfg(feature = "Win32_System_Registry")]
PowerWriteValueMin(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valueminimum: u32) -> u32148     pub fn PowerWriteValueMin(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, valueminimum: u32) -> u32;
149     #[cfg(feature = "Win32_System_Registry")]
PowerWriteValueUnitsSpecifier(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *const u8, buffersize: u32) -> u32150     pub fn PowerWriteValueUnitsSpecifier(rootpowerkey: super::Registry::HKEY, subgroupofpowersettingsguid: *const ::windows_sys::core::GUID, powersettingguid: *const ::windows_sys::core::GUID, buffer: *const u8, buffersize: u32) -> u32;
151     #[cfg(feature = "Win32_Foundation")]
ReadGlobalPwrPolicy(pglobalpowerpolicy: *const GLOBAL_POWER_POLICY) -> super::super::Foundation::BOOLEAN152     pub fn ReadGlobalPwrPolicy(pglobalpowerpolicy: *const GLOBAL_POWER_POLICY) -> super::super::Foundation::BOOLEAN;
153     #[cfg(feature = "Win32_Foundation")]
ReadProcessorPwrScheme(uiid: u32, pmachineprocessorpowerpolicy: *mut MACHINE_PROCESSOR_POWER_POLICY) -> super::super::Foundation::BOOLEAN154     pub fn ReadProcessorPwrScheme(uiid: u32, pmachineprocessorpowerpolicy: *mut MACHINE_PROCESSOR_POWER_POLICY) -> super::super::Foundation::BOOLEAN;
155     #[cfg(feature = "Win32_Foundation")]
ReadPwrScheme(uiid: u32, ppowerpolicy: *mut POWER_POLICY) -> super::super::Foundation::BOOLEAN156     pub fn ReadPwrScheme(uiid: u32, ppowerpolicy: *mut POWER_POLICY) -> super::super::Foundation::BOOLEAN;
157     #[cfg(feature = "Win32_Foundation")]
RegisterPowerSettingNotification(hrecipient: super::super::Foundation::HANDLE, powersettingguid: *const ::windows_sys::core::GUID, flags: u32) -> HPOWERNOTIFY158     pub fn RegisterPowerSettingNotification(hrecipient: super::super::Foundation::HANDLE, powersettingguid: *const ::windows_sys::core::GUID, flags: u32) -> HPOWERNOTIFY;
159     #[cfg(feature = "Win32_Foundation")]
RegisterSuspendResumeNotification(hrecipient: super::super::Foundation::HANDLE, flags: u32) -> HPOWERNOTIFY160     pub fn RegisterSuspendResumeNotification(hrecipient: super::super::Foundation::HANDLE, flags: u32) -> HPOWERNOTIFY;
161     #[cfg(feature = "Win32_Foundation")]
RequestWakeupLatency(latency: LATENCY_TIME) -> super::super::Foundation::BOOL162     pub fn RequestWakeupLatency(latency: LATENCY_TIME) -> super::super::Foundation::BOOL;
163     #[cfg(feature = "Win32_Foundation")]
SetActivePwrScheme(uiid: u32, pglobalpowerpolicy: *const GLOBAL_POWER_POLICY, ppowerpolicy: *const POWER_POLICY) -> super::super::Foundation::BOOLEAN164     pub fn SetActivePwrScheme(uiid: u32, pglobalpowerpolicy: *const GLOBAL_POWER_POLICY, ppowerpolicy: *const POWER_POLICY) -> super::super::Foundation::BOOLEAN;
165     #[cfg(feature = "Win32_Foundation")]
SetSuspendState(bhibernate: super::super::Foundation::BOOLEAN, bforce: super::super::Foundation::BOOLEAN, bwakeupeventsdisabled: super::super::Foundation::BOOLEAN) -> super::super::Foundation::BOOLEAN166     pub fn SetSuspendState(bhibernate: super::super::Foundation::BOOLEAN, bforce: super::super::Foundation::BOOLEAN, bwakeupeventsdisabled: super::super::Foundation::BOOLEAN) -> super::super::Foundation::BOOLEAN;
167     #[cfg(feature = "Win32_Foundation")]
SetSystemPowerState(fsuspend: super::super::Foundation::BOOL, fforce: super::super::Foundation::BOOL) -> super::super::Foundation::BOOL168     pub fn SetSystemPowerState(fsuspend: super::super::Foundation::BOOL, fforce: super::super::Foundation::BOOL) -> super::super::Foundation::BOOL;
SetThreadExecutionState(esflags: EXECUTION_STATE) -> EXECUTION_STATE169     pub fn SetThreadExecutionState(esflags: EXECUTION_STATE) -> EXECUTION_STATE;
170     #[cfg(feature = "Win32_Foundation")]
UnregisterPowerSettingNotification(handle: HPOWERNOTIFY) -> super::super::Foundation::BOOL171     pub fn UnregisterPowerSettingNotification(handle: HPOWERNOTIFY) -> super::super::Foundation::BOOL;
172     #[cfg(feature = "Win32_Foundation")]
UnregisterSuspendResumeNotification(handle: HPOWERNOTIFY) -> super::super::Foundation::BOOL173     pub fn UnregisterSuspendResumeNotification(handle: HPOWERNOTIFY) -> super::super::Foundation::BOOL;
174     #[cfg(feature = "Win32_Foundation")]
ValidatePowerPolicies(pglobalpowerpolicy: *mut GLOBAL_POWER_POLICY, ppowerpolicy: *mut POWER_POLICY) -> super::super::Foundation::BOOLEAN175     pub fn ValidatePowerPolicies(pglobalpowerpolicy: *mut GLOBAL_POWER_POLICY, ppowerpolicy: *mut POWER_POLICY) -> super::super::Foundation::BOOLEAN;
176     #[cfg(feature = "Win32_Foundation")]
WriteGlobalPwrPolicy(pglobalpowerpolicy: *const GLOBAL_POWER_POLICY) -> super::super::Foundation::BOOLEAN177     pub fn WriteGlobalPwrPolicy(pglobalpowerpolicy: *const GLOBAL_POWER_POLICY) -> super::super::Foundation::BOOLEAN;
178     #[cfg(feature = "Win32_Foundation")]
WriteProcessorPwrScheme(uiid: u32, pmachineprocessorpowerpolicy: *const MACHINE_PROCESSOR_POWER_POLICY) -> super::super::Foundation::BOOLEAN179     pub fn WriteProcessorPwrScheme(uiid: u32, pmachineprocessorpowerpolicy: *const MACHINE_PROCESSOR_POWER_POLICY) -> super::super::Foundation::BOOLEAN;
180     #[cfg(feature = "Win32_Foundation")]
WritePwrScheme(puiid: *const u32, lpszschemename: super::super::Foundation::PWSTR, lpszdescription: super::super::Foundation::PWSTR, lpscheme: *const POWER_POLICY) -> super::super::Foundation::BOOLEAN181     pub fn WritePwrScheme(puiid: *const u32, lpszschemename: super::super::Foundation::PWSTR, lpszdescription: super::super::Foundation::PWSTR, lpscheme: *const POWER_POLICY) -> super::super::Foundation::BOOLEAN;
182 }
183 #[repr(C)]
184 pub struct ACPI_REAL_TIME {
185     pub Year: u16,
186     pub Month: u8,
187     pub Day: u8,
188     pub Hour: u8,
189     pub Minute: u8,
190     pub Second: u8,
191     pub Valid: u8,
192     pub Milliseconds: u16,
193     pub TimeZone: i16,
194     pub DayLight: u8,
195     pub Reserved1: [u8; 3],
196 }
197 impl ::core::marker::Copy for ACPI_REAL_TIME {}
198 impl ::core::clone::Clone for ACPI_REAL_TIME {
clone(&self) -> Self199     fn clone(&self) -> Self {
200         *self
201     }
202 }
203 pub const ACPI_TIME_ADJUST_DAYLIGHT: u32 = 1u32;
204 pub const ACPI_TIME_IN_DAYLIGHT: u32 = 2u32;
205 pub const ACPI_TIME_ZONE_UNKNOWN: u32 = 2047u32;
206 pub const ACTIVE_COOLING: u32 = 0u32;
207 #[repr(C)]
208 pub struct ADMINISTRATOR_POWER_POLICY {
209     pub MinSleep: SYSTEM_POWER_STATE,
210     pub MaxSleep: SYSTEM_POWER_STATE,
211     pub MinVideoTimeout: u32,
212     pub MaxVideoTimeout: u32,
213     pub MinSpindownTimeout: u32,
214     pub MaxSpindownTimeout: u32,
215 }
216 impl ::core::marker::Copy for ADMINISTRATOR_POWER_POLICY {}
217 impl ::core::clone::Clone for ADMINISTRATOR_POWER_POLICY {
clone(&self) -> Self218     fn clone(&self) -> Self {
219         *self
220     }
221 }
222 pub const BATTERY_CAPACITY_RELATIVE: u32 = 1073741824u32;
223 #[repr(C)]
224 pub struct BATTERY_CHARGER_STATUS {
225     pub Type: BATTERY_CHARGING_SOURCE_TYPE,
226     pub VaData: [u32; 1],
227 }
228 impl ::core::marker::Copy for BATTERY_CHARGER_STATUS {}
229 impl ::core::clone::Clone for BATTERY_CHARGER_STATUS {
clone(&self) -> Self230     fn clone(&self) -> Self {
231         *self
232     }
233 }
234 pub const BATTERY_CHARGING: u32 = 4u32;
235 #[repr(C)]
236 pub struct BATTERY_CHARGING_SOURCE {
237     pub Type: BATTERY_CHARGING_SOURCE_TYPE,
238     pub MaxCurrent: u32,
239 }
240 impl ::core::marker::Copy for BATTERY_CHARGING_SOURCE {}
241 impl ::core::clone::Clone for BATTERY_CHARGING_SOURCE {
clone(&self) -> Self242     fn clone(&self) -> Self {
243         *self
244     }
245 }
246 #[repr(C)]
247 #[cfg(feature = "Win32_Foundation")]
248 pub struct BATTERY_CHARGING_SOURCE_INFORMATION {
249     pub Type: BATTERY_CHARGING_SOURCE_TYPE,
250     pub SourceOnline: super::super::Foundation::BOOLEAN,
251 }
252 #[cfg(feature = "Win32_Foundation")]
253 impl ::core::marker::Copy for BATTERY_CHARGING_SOURCE_INFORMATION {}
254 #[cfg(feature = "Win32_Foundation")]
255 impl ::core::clone::Clone for BATTERY_CHARGING_SOURCE_INFORMATION {
clone(&self) -> Self256     fn clone(&self) -> Self {
257         *self
258     }
259 }
260 pub type BATTERY_CHARGING_SOURCE_TYPE = i32;
261 pub const BatteryChargingSourceType_AC: BATTERY_CHARGING_SOURCE_TYPE = 1i32;
262 pub const BatteryChargingSourceType_USB: BATTERY_CHARGING_SOURCE_TYPE = 2i32;
263 pub const BatteryChargingSourceType_Wireless: BATTERY_CHARGING_SOURCE_TYPE = 3i32;
264 pub const BatteryChargingSourceType_Max: BATTERY_CHARGING_SOURCE_TYPE = 4i32;
265 pub const BATTERY_CLASS_MAJOR_VERSION: u32 = 1u32;
266 pub const BATTERY_CLASS_MINOR_VERSION: u32 = 0u32;
267 pub const BATTERY_CLASS_MINOR_VERSION_1: u32 = 1u32;
268 pub const BATTERY_CRITICAL: u32 = 8u32;
269 pub const BATTERY_CYCLE_COUNT_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 4019772196, data2: 20, data3: 19493, data4: [165, 11, 199, 36, 174, 92, 211, 113] };
270 pub const BATTERY_DISCHARGING: u32 = 2u32;
271 pub const BATTERY_FULL_CHARGED_CAPACITY_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1085539685, data2: 38647, data3: 17461, data4: [134, 148, 151, 224, 228, 57, 89, 5] };
272 #[repr(C)]
273 pub struct BATTERY_INFORMATION {
274     pub Capabilities: u32,
275     pub Technology: u8,
276     pub Reserved: [u8; 3],
277     pub Chemistry: [u8; 4],
278     pub DesignedCapacity: u32,
279     pub FullChargedCapacity: u32,
280     pub DefaultAlert1: u32,
281     pub DefaultAlert2: u32,
282     pub CriticalBias: u32,
283     pub CycleCount: u32,
284 }
285 impl ::core::marker::Copy for BATTERY_INFORMATION {}
286 impl ::core::clone::Clone for BATTERY_INFORMATION {
clone(&self) -> Self287     fn clone(&self) -> Self {
288         *self
289     }
290 }
291 pub const BATTERY_IS_SHORT_TERM: u32 = 536870912u32;
292 #[repr(C)]
293 pub struct BATTERY_MANUFACTURE_DATE {
294     pub Day: u8,
295     pub Month: u8,
296     pub Year: u16,
297 }
298 impl ::core::marker::Copy for BATTERY_MANUFACTURE_DATE {}
299 impl ::core::clone::Clone for BATTERY_MANUFACTURE_DATE {
clone(&self) -> Self300     fn clone(&self) -> Self {
301         *self
302     }
303 }
304 pub const BATTERY_MINIPORT_UPDATE_DATA_VER_1: u32 = 1u32;
305 pub const BATTERY_MINIPORT_UPDATE_DATA_VER_2: u32 = 2u32;
306 pub const BATTERY_POWER_ON_LINE: u32 = 1u32;
307 #[repr(C)]
308 pub struct BATTERY_QUERY_INFORMATION {
309     pub BatteryTag: u32,
310     pub InformationLevel: BATTERY_QUERY_INFORMATION_LEVEL,
311     pub AtRate: u32,
312 }
313 impl ::core::marker::Copy for BATTERY_QUERY_INFORMATION {}
314 impl ::core::clone::Clone for BATTERY_QUERY_INFORMATION {
clone(&self) -> Self315     fn clone(&self) -> Self {
316         *self
317     }
318 }
319 pub type BATTERY_QUERY_INFORMATION_LEVEL = i32;
320 pub const BatteryInformation: BATTERY_QUERY_INFORMATION_LEVEL = 0i32;
321 pub const BatteryGranularityInformation: BATTERY_QUERY_INFORMATION_LEVEL = 1i32;
322 pub const BatteryTemperature: BATTERY_QUERY_INFORMATION_LEVEL = 2i32;
323 pub const BatteryEstimatedTime: BATTERY_QUERY_INFORMATION_LEVEL = 3i32;
324 pub const BatteryDeviceName: BATTERY_QUERY_INFORMATION_LEVEL = 4i32;
325 pub const BatteryManufactureDate: BATTERY_QUERY_INFORMATION_LEVEL = 5i32;
326 pub const BatteryManufactureName: BATTERY_QUERY_INFORMATION_LEVEL = 6i32;
327 pub const BatteryUniqueID: BATTERY_QUERY_INFORMATION_LEVEL = 7i32;
328 pub const BatterySerialNumber: BATTERY_QUERY_INFORMATION_LEVEL = 8i32;
329 #[repr(C)]
330 pub struct BATTERY_REPORTING_SCALE {
331     pub Granularity: u32,
332     pub Capacity: u32,
333 }
334 impl ::core::marker::Copy for BATTERY_REPORTING_SCALE {}
335 impl ::core::clone::Clone for BATTERY_REPORTING_SCALE {
clone(&self) -> Self336     fn clone(&self) -> Self {
337         *self
338     }
339 }
340 pub const BATTERY_RUNTIME_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1398421351, data2: 6850, data3: 18876, data4: [160, 119, 63, 122, 2, 228, 10, 236] };
341 pub const BATTERY_SEALED: u32 = 268435456u32;
342 pub const BATTERY_SET_CHARGER_ID_SUPPORTED: u32 = 8u32;
343 pub const BATTERY_SET_CHARGE_SUPPORTED: u32 = 1u32;
344 pub const BATTERY_SET_CHARGINGSOURCE_SUPPORTED: u32 = 4u32;
345 pub const BATTERY_SET_DISCHARGE_SUPPORTED: u32 = 2u32;
346 #[repr(C)]
347 pub struct BATTERY_SET_INFORMATION {
348     pub BatteryTag: u32,
349     pub InformationLevel: BATTERY_SET_INFORMATION_LEVEL,
350     pub Buffer: [u8; 1],
351 }
352 impl ::core::marker::Copy for BATTERY_SET_INFORMATION {}
353 impl ::core::clone::Clone for BATTERY_SET_INFORMATION {
clone(&self) -> Self354     fn clone(&self) -> Self {
355         *self
356     }
357 }
358 pub type BATTERY_SET_INFORMATION_LEVEL = i32;
359 pub const BatteryCriticalBias: BATTERY_SET_INFORMATION_LEVEL = 0i32;
360 pub const BatteryCharge: BATTERY_SET_INFORMATION_LEVEL = 1i32;
361 pub const BatteryDischarge: BATTERY_SET_INFORMATION_LEVEL = 2i32;
362 pub const BatteryChargingSource: BATTERY_SET_INFORMATION_LEVEL = 3i32;
363 pub const BatteryChargerId: BATTERY_SET_INFORMATION_LEVEL = 4i32;
364 pub const BatteryChargerStatus: BATTERY_SET_INFORMATION_LEVEL = 5i32;
365 pub const BATTERY_STATIC_DATA_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 98690147, data2: 58594, data3: 20137, data4: [128, 203, 155, 212, 179, 202, 6, 85] };
366 #[repr(C)]
367 pub struct BATTERY_STATUS {
368     pub PowerState: u32,
369     pub Capacity: u32,
370     pub Voltage: u32,
371     pub Rate: i32,
372 }
373 impl ::core::marker::Copy for BATTERY_STATUS {}
374 impl ::core::clone::Clone for BATTERY_STATUS {
clone(&self) -> Self375     fn clone(&self) -> Self {
376         *self
377     }
378 }
379 pub const BATTERY_STATUS_CHANGE_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 3453984963, data2: 31835, data3: 20035, data4: [160, 52, 5, 159, 165, 184, 67, 100] };
380 pub const BATTERY_STATUS_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 4232474833, data2: 60351, data3: 16750, data4: [135, 206, 55, 74, 78, 188, 17, 26] };
381 pub const BATTERY_SYSTEM_BATTERY: u32 = 2147483648u32;
382 pub const BATTERY_TAG_CHANGE_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID {
383     data1: 1579118105,
384     data2: 34694,
385     data3: 19747,
386     data4: [148, 252, 158, 116, 107, 213, 216, 136],
387 };
388 pub const BATTERY_TAG_INVALID: u32 = 0u32;
389 pub const BATTERY_TEMPERATURE_WMI_GUID: ::windows_sys::core::GUID = ::windows_sys::core::GUID {
390     data1: 441622861,
391     data2: 44494,
392     data3: 19012,
393     data4: [154, 62, 200, 216, 241, 95, 242, 194],
394 };
395 pub const BATTERY_UNKNOWN_CAPACITY: u32 = 4294967295u32;
396 pub const BATTERY_UNKNOWN_CURRENT: u32 = 4294967295u32;
397 pub const BATTERY_UNKNOWN_RATE: u32 = 2147483648u32;
398 pub const BATTERY_UNKNOWN_TIME: u32 = 4294967295u32;
399 pub const BATTERY_UNKNOWN_VOLTAGE: u32 = 4294967295u32;
400 #[repr(C)]
401 pub struct BATTERY_USB_CHARGER_STATUS {
402     pub Type: BATTERY_CHARGING_SOURCE_TYPE,
403     pub Reserved: u32,
404     pub Flags: u32,
405     pub MaxCurrent: u32,
406     pub Voltage: u32,
407     pub PortType: USB_CHARGER_PORT,
408     pub PortId: u64,
409     pub PowerSourceInformation: *mut ::core::ffi::c_void,
410     pub OemCharger: ::windows_sys::core::GUID,
411 }
412 impl ::core::marker::Copy for BATTERY_USB_CHARGER_STATUS {}
413 impl ::core::clone::Clone for BATTERY_USB_CHARGER_STATUS {
clone(&self) -> Self414     fn clone(&self) -> Self {
415         *self
416     }
417 }
418 pub const BATTERY_USB_CHARGER_STATUS_FN_DEFAULT_USB: u32 = 1u32;
419 pub const BATTERY_USB_CHARGER_STATUS_UCM_PD: u32 = 2u32;
420 #[repr(C)]
421 pub struct BATTERY_WAIT_STATUS {
422     pub BatteryTag: u32,
423     pub Timeout: u32,
424     pub PowerState: u32,
425     pub LowCapacity: u32,
426     pub HighCapacity: u32,
427 }
428 impl ::core::marker::Copy for BATTERY_WAIT_STATUS {}
429 impl ::core::clone::Clone for BATTERY_WAIT_STATUS {
clone(&self) -> Self430     fn clone(&self) -> Self {
431         *self
432     }
433 }
434 #[repr(C)]
435 pub struct CM_POWER_DATA {
436     pub PD_Size: u32,
437     pub PD_MostRecentPowerState: DEVICE_POWER_STATE,
438     pub PD_Capabilities: u32,
439     pub PD_D1Latency: u32,
440     pub PD_D2Latency: u32,
441     pub PD_D3Latency: u32,
442     pub PD_PowerStateMapping: [DEVICE_POWER_STATE; 7],
443     pub PD_DeepestSystemWake: SYSTEM_POWER_STATE,
444 }
445 impl ::core::marker::Copy for CM_POWER_DATA {}
446 impl ::core::clone::Clone for CM_POWER_DATA {
clone(&self) -> Self447     fn clone(&self) -> Self {
448         *self
449     }
450 }
451 pub const DEVICEPOWER_AND_OPERATION: u32 = 1073741824u32;
452 pub const DEVICEPOWER_CLEAR_WAKEENABLED: u32 = 2u32;
453 pub const DEVICEPOWER_FILTER_DEVICES_PRESENT: u32 = 536870912u32;
454 pub const DEVICEPOWER_FILTER_HARDWARE: u32 = 268435456u32;
455 pub const DEVICEPOWER_FILTER_ON_NAME: u32 = 33554432u32;
456 pub const DEVICEPOWER_FILTER_WAKEENABLED: u32 = 134217728u32;
457 pub const DEVICEPOWER_FILTER_WAKEPROGRAMMABLE: u32 = 67108864u32;
458 pub const DEVICEPOWER_HARDWAREID: u32 = 2147483648u32;
459 pub const DEVICEPOWER_SET_WAKEENABLED: u32 = 1u32;
460 #[repr(C)]
461 pub struct DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS {
462     pub Callback: PDEVICE_NOTIFY_CALLBACK_ROUTINE,
463     pub Context: *mut ::core::ffi::c_void,
464 }
465 impl ::core::marker::Copy for DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS {}
466 impl ::core::clone::Clone for DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS {
clone(&self) -> Self467     fn clone(&self) -> Self {
468         *self
469     }
470 }
471 pub type DEVICE_POWER_STATE = i32;
472 pub const PowerDeviceUnspecified: DEVICE_POWER_STATE = 0i32;
473 pub const PowerDeviceD0: DEVICE_POWER_STATE = 1i32;
474 pub const PowerDeviceD1: DEVICE_POWER_STATE = 2i32;
475 pub const PowerDeviceD2: DEVICE_POWER_STATE = 3i32;
476 pub const PowerDeviceD3: DEVICE_POWER_STATE = 4i32;
477 pub const PowerDeviceMaximum: DEVICE_POWER_STATE = 5i32;
478 pub type EFFECTIVE_POWER_MODE = i32;
479 pub const EffectivePowerModeBatterySaver: EFFECTIVE_POWER_MODE = 0i32;
480 pub const EffectivePowerModeBetterBattery: EFFECTIVE_POWER_MODE = 1i32;
481 pub const EffectivePowerModeBalanced: EFFECTIVE_POWER_MODE = 2i32;
482 pub const EffectivePowerModeHighPerformance: EFFECTIVE_POWER_MODE = 3i32;
483 pub const EffectivePowerModeMaxPerformance: EFFECTIVE_POWER_MODE = 4i32;
484 pub const EffectivePowerModeGameMode: EFFECTIVE_POWER_MODE = 5i32;
485 pub const EffectivePowerModeMixedReality: EFFECTIVE_POWER_MODE = 6i32;
486 pub type EFFECTIVE_POWER_MODE_CALLBACK = unsafe extern "system" fn(mode: EFFECTIVE_POWER_MODE, context: *const ::core::ffi::c_void);
487 pub const EFFECTIVE_POWER_MODE_V1: u32 = 1u32;
488 pub const EFFECTIVE_POWER_MODE_V2: u32 = 2u32;
489 #[repr(C)]
490 pub struct EMI_CHANNEL_MEASUREMENT_DATA {
491     pub AbsoluteEnergy: u64,
492     pub AbsoluteTime: u64,
493 }
494 impl ::core::marker::Copy for EMI_CHANNEL_MEASUREMENT_DATA {}
495 impl ::core::clone::Clone for EMI_CHANNEL_MEASUREMENT_DATA {
clone(&self) -> Self496     fn clone(&self) -> Self {
497         *self
498     }
499 }
500 #[repr(C)]
501 pub struct EMI_CHANNEL_V2 {
502     pub MeasurementUnit: EMI_MEASUREMENT_UNIT,
503     pub ChannelNameSize: u16,
504     pub ChannelName: [u16; 1],
505 }
506 impl ::core::marker::Copy for EMI_CHANNEL_V2 {}
507 impl ::core::clone::Clone for EMI_CHANNEL_V2 {
clone(&self) -> Self508     fn clone(&self) -> Self {
509         *self
510     }
511 }
512 #[repr(C)]
513 pub struct EMI_MEASUREMENT_DATA_V2 {
514     pub ChannelData: [EMI_CHANNEL_MEASUREMENT_DATA; 1],
515 }
516 impl ::core::marker::Copy for EMI_MEASUREMENT_DATA_V2 {}
517 impl ::core::clone::Clone for EMI_MEASUREMENT_DATA_V2 {
clone(&self) -> Self518     fn clone(&self) -> Self {
519         *self
520     }
521 }
522 pub type EMI_MEASUREMENT_UNIT = i32;
523 pub const EmiMeasurementUnitPicowattHours: EMI_MEASUREMENT_UNIT = 0i32;
524 #[repr(C)]
525 pub struct EMI_METADATA_SIZE {
526     pub MetadataSize: u32,
527 }
528 impl ::core::marker::Copy for EMI_METADATA_SIZE {}
529 impl ::core::clone::Clone for EMI_METADATA_SIZE {
clone(&self) -> Self530     fn clone(&self) -> Self {
531         *self
532     }
533 }
534 #[repr(C)]
535 pub struct EMI_METADATA_V1 {
536     pub MeasurementUnit: EMI_MEASUREMENT_UNIT,
537     pub HardwareOEM: [u16; 16],
538     pub HardwareModel: [u16; 16],
539     pub HardwareRevision: u16,
540     pub MeteredHardwareNameSize: u16,
541     pub MeteredHardwareName: [u16; 1],
542 }
543 impl ::core::marker::Copy for EMI_METADATA_V1 {}
544 impl ::core::clone::Clone for EMI_METADATA_V1 {
clone(&self) -> Self545     fn clone(&self) -> Self {
546         *self
547     }
548 }
549 #[repr(C)]
550 pub struct EMI_METADATA_V2 {
551     pub HardwareOEM: [u16; 16],
552     pub HardwareModel: [u16; 16],
553     pub HardwareRevision: u16,
554     pub ChannelCount: u16,
555     pub Channels: [EMI_CHANNEL_V2; 1],
556 }
557 impl ::core::marker::Copy for EMI_METADATA_V2 {}
558 impl ::core::clone::Clone for EMI_METADATA_V2 {
clone(&self) -> Self559     fn clone(&self) -> Self {
560         *self
561     }
562 }
563 pub const EMI_NAME_MAX: u32 = 16u32;
564 #[repr(C)]
565 pub struct EMI_VERSION {
566     pub EmiVersion: u16,
567 }
568 impl ::core::marker::Copy for EMI_VERSION {}
569 impl ::core::clone::Clone for EMI_VERSION {
clone(&self) -> Self570     fn clone(&self) -> Self {
571         *self
572     }
573 }
574 pub const EMI_VERSION_V1: u32 = 1u32;
575 pub const EMI_VERSION_V2: u32 = 2u32;
576 pub type EXECUTION_STATE = u32;
577 pub const ES_AWAYMODE_REQUIRED: EXECUTION_STATE = 64u32;
578 pub const ES_CONTINUOUS: EXECUTION_STATE = 2147483648u32;
579 pub const ES_DISPLAY_REQUIRED: EXECUTION_STATE = 2u32;
580 pub const ES_SYSTEM_REQUIRED: EXECUTION_STATE = 1u32;
581 pub const ES_USER_PRESENT: EXECUTION_STATE = 4u32;
582 pub const EnableMultiBatteryDisplay: u32 = 2u32;
583 pub const EnablePasswordLogon: u32 = 4u32;
584 pub const EnableSysTrayBatteryMeter: u32 = 1u32;
585 pub const EnableVideoDimDisplay: u32 = 16u32;
586 pub const EnableWakeOnRing: u32 = 8u32;
587 #[repr(C)]
588 pub struct GLOBAL_MACHINE_POWER_POLICY {
589     pub Revision: u32,
590     pub LidOpenWakeAc: SYSTEM_POWER_STATE,
591     pub LidOpenWakeDc: SYSTEM_POWER_STATE,
592     pub BroadcastCapacityResolution: u32,
593 }
594 impl ::core::marker::Copy for GLOBAL_MACHINE_POWER_POLICY {}
595 impl ::core::clone::Clone for GLOBAL_MACHINE_POWER_POLICY {
clone(&self) -> Self596     fn clone(&self) -> Self {
597         *self
598     }
599 }
600 #[repr(C)]
601 #[cfg(feature = "Win32_Foundation")]
602 pub struct GLOBAL_POWER_POLICY {
603     pub user: GLOBAL_USER_POWER_POLICY,
604     pub mach: GLOBAL_MACHINE_POWER_POLICY,
605 }
606 #[cfg(feature = "Win32_Foundation")]
607 impl ::core::marker::Copy for GLOBAL_POWER_POLICY {}
608 #[cfg(feature = "Win32_Foundation")]
609 impl ::core::clone::Clone for GLOBAL_POWER_POLICY {
clone(&self) -> Self610     fn clone(&self) -> Self {
611         *self
612     }
613 }
614 #[repr(C)]
615 #[cfg(feature = "Win32_Foundation")]
616 pub struct GLOBAL_USER_POWER_POLICY {
617     pub Revision: u32,
618     pub PowerButtonAc: POWER_ACTION_POLICY,
619     pub PowerButtonDc: POWER_ACTION_POLICY,
620     pub SleepButtonAc: POWER_ACTION_POLICY,
621     pub SleepButtonDc: POWER_ACTION_POLICY,
622     pub LidCloseAc: POWER_ACTION_POLICY,
623     pub LidCloseDc: POWER_ACTION_POLICY,
624     pub DischargePolicy: [SYSTEM_POWER_LEVEL; 4],
625     pub GlobalFlags: u32,
626 }
627 #[cfg(feature = "Win32_Foundation")]
628 impl ::core::marker::Copy for GLOBAL_USER_POWER_POLICY {}
629 #[cfg(feature = "Win32_Foundation")]
630 impl ::core::clone::Clone for GLOBAL_USER_POWER_POLICY {
clone(&self) -> Self631     fn clone(&self) -> Self {
632         *self
633     }
634 }
635 pub const GUID_CLASS_INPUT: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1293833650, data2: 61807, data3: 4559, data4: [136, 203, 0, 17, 17, 0, 0, 48] };
636 pub const GUID_DEVICE_ACPI_TIME: ::windows_sys::core::GUID = ::windows_sys::core::GUID {
637     data1: 2549718006,
638     data2: 17559,
639     data3: 20248,
640     data4: [187, 34, 75, 159, 178, 251, 239, 156],
641 };
642 pub const GUID_DEVICE_APPLICATIONLAUNCH_BUTTON: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1654085870, data2: 39022, data3: 19870, data4: [142, 71, 222, 39, 248, 171, 5, 77] };
643 pub const GUID_DEVICE_BATTERY: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1919098452, data2: 30884, data3: 4560, data4: [188, 247, 0, 170, 0, 183, 179, 42] };
644 pub const GUID_DEVICE_ENERGY_METER: ::windows_sys::core::GUID = ::windows_sys::core::GUID {
645     data1: 1170047812,
646     data2: 32470,
647     data3: 18895,
648     data4: [164, 64, 194, 118, 201, 51, 176, 83],
649 };
650 pub const GUID_DEVICE_FAN: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 99406141, data2: 33242, data3: 18986, data4: [138, 76, 82, 79, 35, 221, 77, 201] };
651 pub const GUID_DEVICE_LID: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1257913682, data2: 29863, data3: 4560, data4: [190, 94, 0, 160, 201, 6, 40, 87] };
652 pub const GUID_DEVICE_MEMORY: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1070657597, data2: 37600, data3: 17915, data4: [183, 92, 94, 216, 255, 176, 16, 33] };
653 pub const GUID_DEVICE_MESSAGE_INDICATOR: ::windows_sys::core::GUID = ::windows_sys::core::GUID {
654     data1: 3444089701,
655     data2: 64148,
656     data3: 19682,
657     data4: [162, 50, 161, 183, 100, 229, 216, 180],
658 };
659 pub const GUID_DEVICE_PROCESSOR: ::windows_sys::core::GUID = ::windows_sys::core::GUID {
660     data1: 2549799696,
661     data2: 20019,
662     data3: 16558,
663     data4: [53, 156, 139, 239, 2, 157, 189, 208],
664 };
665 pub const GUID_DEVICE_SYS_BUTTON: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1257913683, data2: 29863, data3: 4560, data4: [190, 94, 0, 160, 201, 6, 40, 87] };
666 pub const GUID_DEVICE_THERMAL_ZONE: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 1257913681, data2: 29863, data3: 4560, data4: [190, 94, 0, 160, 201, 6, 40, 87] };
667 pub const GUID_DEVINTERFACE_THERMAL_COOLING: ::windows_sys::core::GUID = ::windows_sys::core::GUID {
668     data1: 3689166653,
669     data2: 15489,
670     data3: 16587,
671     data4: [172, 228, 224, 229, 208, 95, 12, 159],
672 };
673 pub const GUID_DEVINTERFACE_THERMAL_MANAGER: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 2457780371, data2: 27044, data3: 19392, data4: [189, 2, 113, 22, 100, 113, 68, 99] };
674 pub type HPOWERNOTIFY = isize;
675 pub const IOCTL_ACPI_GET_REAL_TIME: u32 = 2703888u32;
676 pub const IOCTL_ACPI_SET_REAL_TIME: u32 = 2720276u32;
677 pub const IOCTL_BATTERY_CHARGING_SOURCE_CHANGE: u32 = 2703440u32;
678 pub const IOCTL_BATTERY_QUERY_INFORMATION: u32 = 2703428u32;
679 pub const IOCTL_BATTERY_QUERY_STATUS: u32 = 2703436u32;
680 pub const IOCTL_BATTERY_QUERY_TAG: u32 = 2703424u32;
681 pub const IOCTL_BATTERY_SET_INFORMATION: u32 = 2719816u32;
682 pub const IOCTL_EMI_GET_MEASUREMENT: u32 = 2244620u32;
683 pub const IOCTL_EMI_GET_METADATA: u32 = 2244616u32;
684 pub const IOCTL_EMI_GET_METADATA_SIZE: u32 = 2244612u32;
685 pub const IOCTL_EMI_GET_VERSION: u32 = 2244608u32;
686 pub const IOCTL_GET_PROCESSOR_OBJ_INFO: u32 = 2703744u32;
687 pub const IOCTL_GET_SYS_BUTTON_CAPS: u32 = 2703680u32;
688 pub const IOCTL_GET_SYS_BUTTON_EVENT: u32 = 2703684u32;
689 pub const IOCTL_GET_WAKE_ALARM_POLICY: u32 = 2736652u32;
690 pub const IOCTL_GET_WAKE_ALARM_SYSTEM_POWERSTATE: u32 = 2703896u32;
691 pub const IOCTL_GET_WAKE_ALARM_VALUE: u32 = 2736648u32;
692 pub const IOCTL_NOTIFY_SWITCH_EVENT: u32 = 2703616u32;
693 pub const IOCTL_QUERY_LID: u32 = 2703552u32;
694 pub const IOCTL_RUN_ACTIVE_COOLING_METHOD: u32 = 2719880u32;
695 pub const IOCTL_SET_SYS_MESSAGE_INDICATOR: u32 = 2720192u32;
696 pub const IOCTL_SET_WAKE_ALARM_POLICY: u32 = 2720260u32;
697 pub const IOCTL_SET_WAKE_ALARM_VALUE: u32 = 2720256u32;
698 pub const IOCTL_THERMAL_QUERY_INFORMATION: u32 = 2703488u32;
699 pub const IOCTL_THERMAL_READ_POLICY: u32 = 2703508u32;
700 pub const IOCTL_THERMAL_READ_TEMPERATURE: u32 = 2703504u32;
701 pub const IOCTL_THERMAL_SET_COOLING_POLICY: u32 = 2719876u32;
702 pub const IOCTL_THERMAL_SET_PASSIVE_LIMIT: u32 = 2719884u32;
703 pub type LATENCY_TIME = i32;
704 pub const LT_DONT_CARE: LATENCY_TIME = 0i32;
705 pub const LT_LOWEST_LATENCY: LATENCY_TIME = 1i32;
706 #[repr(C)]
707 pub struct MACHINE_POWER_POLICY {
708     pub Revision: u32,
709     pub MinSleepAc: SYSTEM_POWER_STATE,
710     pub MinSleepDc: SYSTEM_POWER_STATE,
711     pub ReducedLatencySleepAc: SYSTEM_POWER_STATE,
712     pub ReducedLatencySleepDc: SYSTEM_POWER_STATE,
713     pub DozeTimeoutAc: u32,
714     pub DozeTimeoutDc: u32,
715     pub DozeS4TimeoutAc: u32,
716     pub DozeS4TimeoutDc: u32,
717     pub MinThrottleAc: u8,
718     pub MinThrottleDc: u8,
719     pub pad1: [u8; 2],
720     pub OverThrottledAc: POWER_ACTION_POLICY,
721     pub OverThrottledDc: POWER_ACTION_POLICY,
722 }
723 impl ::core::marker::Copy for MACHINE_POWER_POLICY {}
724 impl ::core::clone::Clone for MACHINE_POWER_POLICY {
clone(&self) -> Self725     fn clone(&self) -> Self {
726         *self
727     }
728 }
729 #[repr(C)]
730 pub struct MACHINE_PROCESSOR_POWER_POLICY {
731     pub Revision: u32,
732     pub ProcessorPolicyAc: PROCESSOR_POWER_POLICY,
733     pub ProcessorPolicyDc: PROCESSOR_POWER_POLICY,
734 }
735 impl ::core::marker::Copy for MACHINE_PROCESSOR_POWER_POLICY {}
736 impl ::core::clone::Clone for MACHINE_PROCESSOR_POWER_POLICY {
clone(&self) -> Self737     fn clone(&self) -> Self {
738         *self
739     }
740 }
741 pub const MAX_ACTIVE_COOLING_LEVELS: u32 = 10u32;
742 pub const MAX_BATTERY_STRING_SIZE: u32 = 128u32;
743 pub const PASSIVE_COOLING: u32 = 1u32;
744 pub const PDCAP_S0_SUPPORTED: u32 = 65536u32;
745 pub const PDCAP_S1_SUPPORTED: u32 = 131072u32;
746 pub const PDCAP_S2_SUPPORTED: u32 = 262144u32;
747 pub const PDCAP_S3_SUPPORTED: u32 = 524288u32;
748 pub const PDCAP_S4_SUPPORTED: u32 = 16777216u32;
749 pub const PDCAP_S5_SUPPORTED: u32 = 33554432u32;
750 pub const PDCAP_WAKE_FROM_S0_SUPPORTED: u32 = 1048576u32;
751 pub const PDCAP_WAKE_FROM_S1_SUPPORTED: u32 = 2097152u32;
752 pub const PDCAP_WAKE_FROM_S2_SUPPORTED: u32 = 4194304u32;
753 pub const PDCAP_WAKE_FROM_S3_SUPPORTED: u32 = 8388608u32;
754 pub type PDEVICE_NOTIFY_CALLBACK_ROUTINE = unsafe extern "system" fn(context: *const ::core::ffi::c_void, r#type: u32, setting: *const ::core::ffi::c_void) -> u32;
755 #[repr(C)]
756 pub struct POWERBROADCAST_SETTING {
757     pub PowerSetting: ::windows_sys::core::GUID,
758     pub DataLength: u32,
759     pub Data: [u8; 1],
760 }
761 impl ::core::marker::Copy for POWERBROADCAST_SETTING {}
762 impl ::core::clone::Clone for POWERBROADCAST_SETTING {
clone(&self) -> Self763     fn clone(&self) -> Self {
764         *self
765     }
766 }
767 pub type POWER_ACTION = i32;
768 pub const PowerActionNone: POWER_ACTION = 0i32;
769 pub const PowerActionReserved: POWER_ACTION = 1i32;
770 pub const PowerActionSleep: POWER_ACTION = 2i32;
771 pub const PowerActionHibernate: POWER_ACTION = 3i32;
772 pub const PowerActionShutdown: POWER_ACTION = 4i32;
773 pub const PowerActionShutdownReset: POWER_ACTION = 5i32;
774 pub const PowerActionShutdownOff: POWER_ACTION = 6i32;
775 pub const PowerActionWarmEject: POWER_ACTION = 7i32;
776 pub const PowerActionDisplayOff: POWER_ACTION = 8i32;
777 #[repr(C)]
778 pub struct POWER_ACTION_POLICY {
779     pub Action: POWER_ACTION,
780     pub Flags: u32,
781     pub EventCode: POWER_ACTION_POLICY_EVENT_CODE,
782 }
783 impl ::core::marker::Copy for POWER_ACTION_POLICY {}
784 impl ::core::clone::Clone for POWER_ACTION_POLICY {
clone(&self) -> Self785     fn clone(&self) -> Self {
786         *self
787     }
788 }
789 pub type POWER_ACTION_POLICY_EVENT_CODE = u32;
790 pub const POWER_FORCE_TRIGGER_RESET: POWER_ACTION_POLICY_EVENT_CODE = 2147483648u32;
791 pub const POWER_LEVEL_USER_NOTIFY_EXEC: POWER_ACTION_POLICY_EVENT_CODE = 4u32;
792 pub const POWER_LEVEL_USER_NOTIFY_SOUND: POWER_ACTION_POLICY_EVENT_CODE = 2u32;
793 pub const POWER_LEVEL_USER_NOTIFY_TEXT: POWER_ACTION_POLICY_EVENT_CODE = 1u32;
794 pub const POWER_USER_NOTIFY_BUTTON: POWER_ACTION_POLICY_EVENT_CODE = 8u32;
795 pub const POWER_USER_NOTIFY_SHUTDOWN: POWER_ACTION_POLICY_EVENT_CODE = 16u32;
796 pub const POWER_ATTRIBUTE_HIDE: u32 = 1u32;
797 pub const POWER_ATTRIBUTE_SHOW_AOAC: u32 = 2u32;
798 pub type POWER_DATA_ACCESSOR = i32;
799 pub const ACCESS_AC_POWER_SETTING_INDEX: POWER_DATA_ACCESSOR = 0i32;
800 pub const ACCESS_DC_POWER_SETTING_INDEX: POWER_DATA_ACCESSOR = 1i32;
801 pub const ACCESS_FRIENDLY_NAME: POWER_DATA_ACCESSOR = 2i32;
802 pub const ACCESS_DESCRIPTION: POWER_DATA_ACCESSOR = 3i32;
803 pub const ACCESS_POSSIBLE_POWER_SETTING: POWER_DATA_ACCESSOR = 4i32;
804 pub const ACCESS_POSSIBLE_POWER_SETTING_FRIENDLY_NAME: POWER_DATA_ACCESSOR = 5i32;
805 pub const ACCESS_POSSIBLE_POWER_SETTING_DESCRIPTION: POWER_DATA_ACCESSOR = 6i32;
806 pub const ACCESS_DEFAULT_AC_POWER_SETTING: POWER_DATA_ACCESSOR = 7i32;
807 pub const ACCESS_DEFAULT_DC_POWER_SETTING: POWER_DATA_ACCESSOR = 8i32;
808 pub const ACCESS_POSSIBLE_VALUE_MIN: POWER_DATA_ACCESSOR = 9i32;
809 pub const ACCESS_POSSIBLE_VALUE_MAX: POWER_DATA_ACCESSOR = 10i32;
810 pub const ACCESS_POSSIBLE_VALUE_INCREMENT: POWER_DATA_ACCESSOR = 11i32;
811 pub const ACCESS_POSSIBLE_VALUE_UNITS: POWER_DATA_ACCESSOR = 12i32;
812 pub const ACCESS_ICON_RESOURCE: POWER_DATA_ACCESSOR = 13i32;
813 pub const ACCESS_DEFAULT_SECURITY_DESCRIPTOR: POWER_DATA_ACCESSOR = 14i32;
814 pub const ACCESS_ATTRIBUTES: POWER_DATA_ACCESSOR = 15i32;
815 pub const ACCESS_SCHEME: POWER_DATA_ACCESSOR = 16i32;
816 pub const ACCESS_SUBGROUP: POWER_DATA_ACCESSOR = 17i32;
817 pub const ACCESS_INDIVIDUAL_SETTING: POWER_DATA_ACCESSOR = 18i32;
818 pub const ACCESS_ACTIVE_SCHEME: POWER_DATA_ACCESSOR = 19i32;
819 pub const ACCESS_CREATE_SCHEME: POWER_DATA_ACCESSOR = 20i32;
820 pub const ACCESS_AC_POWER_SETTING_MAX: POWER_DATA_ACCESSOR = 21i32;
821 pub const ACCESS_DC_POWER_SETTING_MAX: POWER_DATA_ACCESSOR = 22i32;
822 pub const ACCESS_AC_POWER_SETTING_MIN: POWER_DATA_ACCESSOR = 23i32;
823 pub const ACCESS_DC_POWER_SETTING_MIN: POWER_DATA_ACCESSOR = 24i32;
824 pub const ACCESS_PROFILE: POWER_DATA_ACCESSOR = 25i32;
825 pub const ACCESS_OVERLAY_SCHEME: POWER_DATA_ACCESSOR = 26i32;
826 pub const ACCESS_ACTIVE_OVERLAY_SCHEME: POWER_DATA_ACCESSOR = 27i32;
827 pub type POWER_INFORMATION_LEVEL = i32;
828 pub const SystemPowerPolicyAc: POWER_INFORMATION_LEVEL = 0i32;
829 pub const SystemPowerPolicyDc: POWER_INFORMATION_LEVEL = 1i32;
830 pub const VerifySystemPolicyAc: POWER_INFORMATION_LEVEL = 2i32;
831 pub const VerifySystemPolicyDc: POWER_INFORMATION_LEVEL = 3i32;
832 pub const SystemPowerCapabilities: POWER_INFORMATION_LEVEL = 4i32;
833 pub const SystemBatteryState: POWER_INFORMATION_LEVEL = 5i32;
834 pub const SystemPowerStateHandler: POWER_INFORMATION_LEVEL = 6i32;
835 pub const ProcessorStateHandler: POWER_INFORMATION_LEVEL = 7i32;
836 pub const SystemPowerPolicyCurrent: POWER_INFORMATION_LEVEL = 8i32;
837 pub const AdministratorPowerPolicy: POWER_INFORMATION_LEVEL = 9i32;
838 pub const SystemReserveHiberFile: POWER_INFORMATION_LEVEL = 10i32;
839 pub const ProcessorInformation: POWER_INFORMATION_LEVEL = 11i32;
840 pub const SystemPowerInformation: POWER_INFORMATION_LEVEL = 12i32;
841 pub const ProcessorStateHandler2: POWER_INFORMATION_LEVEL = 13i32;
842 pub const LastWakeTime: POWER_INFORMATION_LEVEL = 14i32;
843 pub const LastSleepTime: POWER_INFORMATION_LEVEL = 15i32;
844 pub const SystemExecutionState: POWER_INFORMATION_LEVEL = 16i32;
845 pub const SystemPowerStateNotifyHandler: POWER_INFORMATION_LEVEL = 17i32;
846 pub const ProcessorPowerPolicyAc: POWER_INFORMATION_LEVEL = 18i32;
847 pub const ProcessorPowerPolicyDc: POWER_INFORMATION_LEVEL = 19i32;
848 pub const VerifyProcessorPowerPolicyAc: POWER_INFORMATION_LEVEL = 20i32;
849 pub const VerifyProcessorPowerPolicyDc: POWER_INFORMATION_LEVEL = 21i32;
850 pub const ProcessorPowerPolicyCurrent: POWER_INFORMATION_LEVEL = 22i32;
851 pub const SystemPowerStateLogging: POWER_INFORMATION_LEVEL = 23i32;
852 pub const SystemPowerLoggingEntry: POWER_INFORMATION_LEVEL = 24i32;
853 pub const SetPowerSettingValue: POWER_INFORMATION_LEVEL = 25i32;
854 pub const NotifyUserPowerSetting: POWER_INFORMATION_LEVEL = 26i32;
855 pub const PowerInformationLevelUnused0: POWER_INFORMATION_LEVEL = 27i32;
856 pub const SystemMonitorHiberBootPowerOff: POWER_INFORMATION_LEVEL = 28i32;
857 pub const SystemVideoState: POWER_INFORMATION_LEVEL = 29i32;
858 pub const TraceApplicationPowerMessage: POWER_INFORMATION_LEVEL = 30i32;
859 pub const TraceApplicationPowerMessageEnd: POWER_INFORMATION_LEVEL = 31i32;
860 pub const ProcessorPerfStates: POWER_INFORMATION_LEVEL = 32i32;
861 pub const ProcessorIdleStates: POWER_INFORMATION_LEVEL = 33i32;
862 pub const ProcessorCap: POWER_INFORMATION_LEVEL = 34i32;
863 pub const SystemWakeSource: POWER_INFORMATION_LEVEL = 35i32;
864 pub const SystemHiberFileInformation: POWER_INFORMATION_LEVEL = 36i32;
865 pub const TraceServicePowerMessage: POWER_INFORMATION_LEVEL = 37i32;
866 pub const ProcessorLoad: POWER_INFORMATION_LEVEL = 38i32;
867 pub const PowerShutdownNotification: POWER_INFORMATION_LEVEL = 39i32;
868 pub const MonitorCapabilities: POWER_INFORMATION_LEVEL = 40i32;
869 pub const SessionPowerInit: POWER_INFORMATION_LEVEL = 41i32;
870 pub const SessionDisplayState: POWER_INFORMATION_LEVEL = 42i32;
871 pub const PowerRequestCreate: POWER_INFORMATION_LEVEL = 43i32;
872 pub const PowerRequestAction: POWER_INFORMATION_LEVEL = 44i32;
873 pub const GetPowerRequestList: POWER_INFORMATION_LEVEL = 45i32;
874 pub const ProcessorInformationEx: POWER_INFORMATION_LEVEL = 46i32;
875 pub const NotifyUserModeLegacyPowerEvent: POWER_INFORMATION_LEVEL = 47i32;
876 pub const GroupPark: POWER_INFORMATION_LEVEL = 48i32;
877 pub const ProcessorIdleDomains: POWER_INFORMATION_LEVEL = 49i32;
878 pub const WakeTimerList: POWER_INFORMATION_LEVEL = 50i32;
879 pub const SystemHiberFileSize: POWER_INFORMATION_LEVEL = 51i32;
880 pub const ProcessorIdleStatesHv: POWER_INFORMATION_LEVEL = 52i32;
881 pub const ProcessorPerfStatesHv: POWER_INFORMATION_LEVEL = 53i32;
882 pub const ProcessorPerfCapHv: POWER_INFORMATION_LEVEL = 54i32;
883 pub const ProcessorSetIdle: POWER_INFORMATION_LEVEL = 55i32;
884 pub const LogicalProcessorIdling: POWER_INFORMATION_LEVEL = 56i32;
885 pub const UserPresence: POWER_INFORMATION_LEVEL = 57i32;
886 pub const PowerSettingNotificationName: POWER_INFORMATION_LEVEL = 58i32;
887 pub const GetPowerSettingValue: POWER_INFORMATION_LEVEL = 59i32;
888 pub const IdleResiliency: POWER_INFORMATION_LEVEL = 60i32;
889 pub const SessionRITState: POWER_INFORMATION_LEVEL = 61i32;
890 pub const SessionConnectNotification: POWER_INFORMATION_LEVEL = 62i32;
891 pub const SessionPowerCleanup: POWER_INFORMATION_LEVEL = 63i32;
892 pub const SessionLockState: POWER_INFORMATION_LEVEL = 64i32;
893 pub const SystemHiberbootState: POWER_INFORMATION_LEVEL = 65i32;
894 pub const PlatformInformation: POWER_INFORMATION_LEVEL = 66i32;
895 pub const PdcInvocation: POWER_INFORMATION_LEVEL = 67i32;
896 pub const MonitorInvocation: POWER_INFORMATION_LEVEL = 68i32;
897 pub const FirmwareTableInformationRegistered: POWER_INFORMATION_LEVEL = 69i32;
898 pub const SetShutdownSelectedTime: POWER_INFORMATION_LEVEL = 70i32;
899 pub const SuspendResumeInvocation: POWER_INFORMATION_LEVEL = 71i32;
900 pub const PlmPowerRequestCreate: POWER_INFORMATION_LEVEL = 72i32;
901 pub const ScreenOff: POWER_INFORMATION_LEVEL = 73i32;
902 pub const CsDeviceNotification: POWER_INFORMATION_LEVEL = 74i32;
903 pub const PlatformRole: POWER_INFORMATION_LEVEL = 75i32;
904 pub const LastResumePerformance: POWER_INFORMATION_LEVEL = 76i32;
905 pub const DisplayBurst: POWER_INFORMATION_LEVEL = 77i32;
906 pub const ExitLatencySamplingPercentage: POWER_INFORMATION_LEVEL = 78i32;
907 pub const RegisterSpmPowerSettings: POWER_INFORMATION_LEVEL = 79i32;
908 pub const PlatformIdleStates: POWER_INFORMATION_LEVEL = 80i32;
909 pub const ProcessorIdleVeto: POWER_INFORMATION_LEVEL = 81i32;
910 pub const PlatformIdleVeto: POWER_INFORMATION_LEVEL = 82i32;
911 pub const SystemBatteryStatePrecise: POWER_INFORMATION_LEVEL = 83i32;
912 pub const ThermalEvent: POWER_INFORMATION_LEVEL = 84i32;
913 pub const PowerRequestActionInternal: POWER_INFORMATION_LEVEL = 85i32;
914 pub const BatteryDeviceState: POWER_INFORMATION_LEVEL = 86i32;
915 pub const PowerInformationInternal: POWER_INFORMATION_LEVEL = 87i32;
916 pub const ThermalStandby: POWER_INFORMATION_LEVEL = 88i32;
917 pub const SystemHiberFileType: POWER_INFORMATION_LEVEL = 89i32;
918 pub const PhysicalPowerButtonPress: POWER_INFORMATION_LEVEL = 90i32;
919 pub const QueryPotentialDripsConstraint: POWER_INFORMATION_LEVEL = 91i32;
920 pub const EnergyTrackerCreate: POWER_INFORMATION_LEVEL = 92i32;
921 pub const EnergyTrackerQuery: POWER_INFORMATION_LEVEL = 93i32;
922 pub const UpdateBlackBoxRecorder: POWER_INFORMATION_LEVEL = 94i32;
923 pub const SessionAllowExternalDmaDevices: POWER_INFORMATION_LEVEL = 95i32;
924 pub const SendSuspendResumeNotification: POWER_INFORMATION_LEVEL = 96i32;
925 pub const PowerInformationLevelMaximum: POWER_INFORMATION_LEVEL = 97i32;
926 pub type POWER_PLATFORM_ROLE = i32;
927 pub const PlatformRoleUnspecified: POWER_PLATFORM_ROLE = 0i32;
928 pub const PlatformRoleDesktop: POWER_PLATFORM_ROLE = 1i32;
929 pub const PlatformRoleMobile: POWER_PLATFORM_ROLE = 2i32;
930 pub const PlatformRoleWorkstation: POWER_PLATFORM_ROLE = 3i32;
931 pub const PlatformRoleEnterpriseServer: POWER_PLATFORM_ROLE = 4i32;
932 pub const PlatformRoleSOHOServer: POWER_PLATFORM_ROLE = 5i32;
933 pub const PlatformRoleAppliancePC: POWER_PLATFORM_ROLE = 6i32;
934 pub const PlatformRolePerformanceServer: POWER_PLATFORM_ROLE = 7i32;
935 pub const PlatformRoleSlate: POWER_PLATFORM_ROLE = 8i32;
936 pub const PlatformRoleMaximum: POWER_PLATFORM_ROLE = 9i32;
937 pub type POWER_PLATFORM_ROLE_VERSION = u32;
938 pub const POWER_PLATFORM_ROLE_V1: POWER_PLATFORM_ROLE_VERSION = 1u32;
939 pub const POWER_PLATFORM_ROLE_V2: POWER_PLATFORM_ROLE_VERSION = 2u32;
940 #[repr(C)]
941 #[cfg(feature = "Win32_Foundation")]
942 pub struct POWER_POLICY {
943     pub user: USER_POWER_POLICY,
944     pub mach: MACHINE_POWER_POLICY,
945 }
946 #[cfg(feature = "Win32_Foundation")]
947 impl ::core::marker::Copy for POWER_POLICY {}
948 #[cfg(feature = "Win32_Foundation")]
949 impl ::core::clone::Clone for POWER_POLICY {
clone(&self) -> Self950     fn clone(&self) -> Self {
951         *self
952     }
953 }
954 pub type POWER_REQUEST_TYPE = i32;
955 pub const PowerRequestDisplayRequired: POWER_REQUEST_TYPE = 0i32;
956 pub const PowerRequestSystemRequired: POWER_REQUEST_TYPE = 1i32;
957 pub const PowerRequestAwayModeRequired: POWER_REQUEST_TYPE = 2i32;
958 pub const PowerRequestExecutionRequired: POWER_REQUEST_TYPE = 3i32;
959 pub type POWER_SETTING_REGISTER_NOTIFICATION_FLAGS = u32;
960 pub const DEVICE_NOTIFY_SERVICE_HANDLE: POWER_SETTING_REGISTER_NOTIFICATION_FLAGS = 1u32;
961 pub const DEVICE_NOTIFY_CALLBACK: POWER_SETTING_REGISTER_NOTIFICATION_FLAGS = 2u32;
962 pub const DEVICE_NOTIFY_WINDOW_HANDLE: POWER_SETTING_REGISTER_NOTIFICATION_FLAGS = 0u32;
963 #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")]
964 pub const PROCESSOR_NUMBER_PKEY: super::super::UI::Shell::PropertiesSystem::PROPERTYKEY = super::super::UI::Shell::PropertiesSystem::PROPERTYKEY {
965     fmtid: ::windows_sys::core::GUID { data1: 1462028317, data2: 54703, data3: 19487, data4: [161, 3, 160, 110, 40, 242, 4, 198] },
966     pid: 1u32,
967 };
968 #[repr(C)]
969 pub struct PROCESSOR_OBJECT_INFO {
970     pub PhysicalID: u32,
971     pub PBlkAddress: u32,
972     pub PBlkLength: u8,
973 }
974 impl ::core::marker::Copy for PROCESSOR_OBJECT_INFO {}
975 impl ::core::clone::Clone for PROCESSOR_OBJECT_INFO {
clone(&self) -> Self976     fn clone(&self) -> Self {
977         *self
978     }
979 }
980 #[repr(C)]
981 pub struct PROCESSOR_OBJECT_INFO_EX {
982     pub PhysicalID: u32,
983     pub PBlkAddress: u32,
984     pub PBlkLength: u8,
985     pub InitialApicId: u32,
986 }
987 impl ::core::marker::Copy for PROCESSOR_OBJECT_INFO_EX {}
988 impl ::core::clone::Clone for PROCESSOR_OBJECT_INFO_EX {
clone(&self) -> Self989     fn clone(&self) -> Self {
990         *self
991     }
992 }
993 #[repr(C)]
994 pub struct PROCESSOR_POWER_POLICY {
995     pub Revision: u32,
996     pub DynamicThrottle: u8,
997     pub Spare: [u8; 3],
998     pub _bitfield: u32,
999     pub PolicyCount: u32,
1000     pub Policy: [PROCESSOR_POWER_POLICY_INFO; 3],
1001 }
1002 impl ::core::marker::Copy for PROCESSOR_POWER_POLICY {}
1003 impl ::core::clone::Clone for PROCESSOR_POWER_POLICY {
clone(&self) -> Self1004     fn clone(&self) -> Self {
1005         *self
1006     }
1007 }
1008 #[repr(C)]
1009 pub struct PROCESSOR_POWER_POLICY_INFO {
1010     pub TimeCheck: u32,
1011     pub DemoteLimit: u32,
1012     pub PromoteLimit: u32,
1013     pub DemotePercent: u8,
1014     pub PromotePercent: u8,
1015     pub Spare: [u8; 2],
1016     pub _bitfield: u32,
1017 }
1018 impl ::core::marker::Copy for PROCESSOR_POWER_POLICY_INFO {}
1019 impl ::core::clone::Clone for PROCESSOR_POWER_POLICY_INFO {
clone(&self) -> Self1020     fn clone(&self) -> Self {
1021         *self
1022     }
1023 }
1024 #[cfg(feature = "Win32_Foundation")]
1025 pub type PWRSCHEMESENUMPROC = unsafe extern "system" fn(index: u32, namesize: u32, name: super::super::Foundation::PWSTR, descriptionsize: u32, description: super::super::Foundation::PWSTR, policy: *const POWER_POLICY, context: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOLEAN;
1026 #[cfg(feature = "Win32_Foundation")]
1027 pub type PWRSCHEMESENUMPROC_V1 = unsafe extern "system" fn(index: u32, namesize: u32, name: *const i8, descriptionsize: u32, description: *const i8, policy: *const POWER_POLICY, context: super::super::Foundation::LPARAM) -> super::super::Foundation::BOOLEAN;
1028 #[repr(C)]
1029 pub struct SET_POWER_SETTING_VALUE {
1030     pub Version: u32,
1031     pub Guid: ::windows_sys::core::GUID,
1032     pub PowerCondition: SYSTEM_POWER_CONDITION,
1033     pub DataLength: u32,
1034     pub Data: [u8; 1],
1035 }
1036 impl ::core::marker::Copy for SET_POWER_SETTING_VALUE {}
1037 impl ::core::clone::Clone for SET_POWER_SETTING_VALUE {
clone(&self) -> Self1038     fn clone(&self) -> Self {
1039         *self
1040     }
1041 }
1042 #[repr(C)]
1043 #[cfg(feature = "Win32_Foundation")]
1044 pub struct SYSTEM_BATTERY_STATE {
1045     pub AcOnLine: super::super::Foundation::BOOLEAN,
1046     pub BatteryPresent: super::super::Foundation::BOOLEAN,
1047     pub Charging: super::super::Foundation::BOOLEAN,
1048     pub Discharging: super::super::Foundation::BOOLEAN,
1049     pub Spare1: [super::super::Foundation::BOOLEAN; 3],
1050     pub Tag: u8,
1051     pub MaxCapacity: u32,
1052     pub RemainingCapacity: u32,
1053     pub Rate: u32,
1054     pub EstimatedTime: u32,
1055     pub DefaultAlert1: u32,
1056     pub DefaultAlert2: u32,
1057 }
1058 #[cfg(feature = "Win32_Foundation")]
1059 impl ::core::marker::Copy for SYSTEM_BATTERY_STATE {}
1060 #[cfg(feature = "Win32_Foundation")]
1061 impl ::core::clone::Clone for SYSTEM_BATTERY_STATE {
clone(&self) -> Self1062     fn clone(&self) -> Self {
1063         *self
1064     }
1065 }
1066 #[repr(C)]
1067 #[cfg(feature = "Win32_Foundation")]
1068 pub struct SYSTEM_POWER_CAPABILITIES {
1069     pub PowerButtonPresent: super::super::Foundation::BOOLEAN,
1070     pub SleepButtonPresent: super::super::Foundation::BOOLEAN,
1071     pub LidPresent: super::super::Foundation::BOOLEAN,
1072     pub SystemS1: super::super::Foundation::BOOLEAN,
1073     pub SystemS2: super::super::Foundation::BOOLEAN,
1074     pub SystemS3: super::super::Foundation::BOOLEAN,
1075     pub SystemS4: super::super::Foundation::BOOLEAN,
1076     pub SystemS5: super::super::Foundation::BOOLEAN,
1077     pub HiberFilePresent: super::super::Foundation::BOOLEAN,
1078     pub FullWake: super::super::Foundation::BOOLEAN,
1079     pub VideoDimPresent: super::super::Foundation::BOOLEAN,
1080     pub ApmPresent: super::super::Foundation::BOOLEAN,
1081     pub UpsPresent: super::super::Foundation::BOOLEAN,
1082     pub ThermalControl: super::super::Foundation::BOOLEAN,
1083     pub ProcessorThrottle: super::super::Foundation::BOOLEAN,
1084     pub ProcessorMinThrottle: u8,
1085     pub ProcessorMaxThrottle: u8,
1086     pub FastSystemS4: super::super::Foundation::BOOLEAN,
1087     pub Hiberboot: super::super::Foundation::BOOLEAN,
1088     pub WakeAlarmPresent: super::super::Foundation::BOOLEAN,
1089     pub AoAc: super::super::Foundation::BOOLEAN,
1090     pub DiskSpinDown: super::super::Foundation::BOOLEAN,
1091     pub HiberFileType: u8,
1092     pub AoAcConnectivitySupported: super::super::Foundation::BOOLEAN,
1093     pub spare3: [u8; 6],
1094     pub SystemBatteriesPresent: super::super::Foundation::BOOLEAN,
1095     pub BatteriesAreShortTerm: super::super::Foundation::BOOLEAN,
1096     pub BatteryScale: [BATTERY_REPORTING_SCALE; 3],
1097     pub AcOnLineWake: SYSTEM_POWER_STATE,
1098     pub SoftLidWake: SYSTEM_POWER_STATE,
1099     pub RtcWake: SYSTEM_POWER_STATE,
1100     pub MinDeviceWakeState: SYSTEM_POWER_STATE,
1101     pub DefaultLowLatencyWake: SYSTEM_POWER_STATE,
1102 }
1103 #[cfg(feature = "Win32_Foundation")]
1104 impl ::core::marker::Copy for SYSTEM_POWER_CAPABILITIES {}
1105 #[cfg(feature = "Win32_Foundation")]
1106 impl ::core::clone::Clone for SYSTEM_POWER_CAPABILITIES {
clone(&self) -> Self1107     fn clone(&self) -> Self {
1108         *self
1109     }
1110 }
1111 pub type SYSTEM_POWER_CONDITION = i32;
1112 pub const PoAc: SYSTEM_POWER_CONDITION = 0i32;
1113 pub const PoDc: SYSTEM_POWER_CONDITION = 1i32;
1114 pub const PoHot: SYSTEM_POWER_CONDITION = 2i32;
1115 pub const PoConditionMaximum: SYSTEM_POWER_CONDITION = 3i32;
1116 #[repr(C)]
1117 #[cfg(feature = "Win32_Foundation")]
1118 pub struct SYSTEM_POWER_LEVEL {
1119     pub Enable: super::super::Foundation::BOOLEAN,
1120     pub Spare: [u8; 3],
1121     pub BatteryLevel: u32,
1122     pub PowerPolicy: POWER_ACTION_POLICY,
1123     pub MinSystemState: SYSTEM_POWER_STATE,
1124 }
1125 #[cfg(feature = "Win32_Foundation")]
1126 impl ::core::marker::Copy for SYSTEM_POWER_LEVEL {}
1127 #[cfg(feature = "Win32_Foundation")]
1128 impl ::core::clone::Clone for SYSTEM_POWER_LEVEL {
clone(&self) -> Self1129     fn clone(&self) -> Self {
1130         *self
1131     }
1132 }
1133 #[repr(C)]
1134 #[cfg(feature = "Win32_Foundation")]
1135 pub struct SYSTEM_POWER_POLICY {
1136     pub Revision: u32,
1137     pub PowerButton: POWER_ACTION_POLICY,
1138     pub SleepButton: POWER_ACTION_POLICY,
1139     pub LidClose: POWER_ACTION_POLICY,
1140     pub LidOpenWake: SYSTEM_POWER_STATE,
1141     pub Reserved: u32,
1142     pub Idle: POWER_ACTION_POLICY,
1143     pub IdleTimeout: u32,
1144     pub IdleSensitivity: u8,
1145     pub DynamicThrottle: u8,
1146     pub Spare2: [u8; 2],
1147     pub MinSleep: SYSTEM_POWER_STATE,
1148     pub MaxSleep: SYSTEM_POWER_STATE,
1149     pub ReducedLatencySleep: SYSTEM_POWER_STATE,
1150     pub WinLogonFlags: u32,
1151     pub Spare3: u32,
1152     pub DozeS4Timeout: u32,
1153     pub BroadcastCapacityResolution: u32,
1154     pub DischargePolicy: [SYSTEM_POWER_LEVEL; 4],
1155     pub VideoTimeout: u32,
1156     pub VideoDimDisplay: super::super::Foundation::BOOLEAN,
1157     pub VideoReserved: [u32; 3],
1158     pub SpindownTimeout: u32,
1159     pub OptimizeForPower: super::super::Foundation::BOOLEAN,
1160     pub FanThrottleTolerance: u8,
1161     pub ForcedThrottle: u8,
1162     pub MinThrottle: u8,
1163     pub OverThrottled: POWER_ACTION_POLICY,
1164 }
1165 #[cfg(feature = "Win32_Foundation")]
1166 impl ::core::marker::Copy for SYSTEM_POWER_POLICY {}
1167 #[cfg(feature = "Win32_Foundation")]
1168 impl ::core::clone::Clone for SYSTEM_POWER_POLICY {
clone(&self) -> Self1169     fn clone(&self) -> Self {
1170         *self
1171     }
1172 }
1173 pub type SYSTEM_POWER_STATE = i32;
1174 pub const PowerSystemUnspecified: SYSTEM_POWER_STATE = 0i32;
1175 pub const PowerSystemWorking: SYSTEM_POWER_STATE = 1i32;
1176 pub const PowerSystemSleeping1: SYSTEM_POWER_STATE = 2i32;
1177 pub const PowerSystemSleeping2: SYSTEM_POWER_STATE = 3i32;
1178 pub const PowerSystemSleeping3: SYSTEM_POWER_STATE = 4i32;
1179 pub const PowerSystemHibernate: SYSTEM_POWER_STATE = 5i32;
1180 pub const PowerSystemShutdown: SYSTEM_POWER_STATE = 6i32;
1181 pub const PowerSystemMaximum: SYSTEM_POWER_STATE = 7i32;
1182 #[repr(C)]
1183 pub struct SYSTEM_POWER_STATUS {
1184     pub ACLineStatus: u8,
1185     pub BatteryFlag: u8,
1186     pub BatteryLifePercent: u8,
1187     pub SystemStatusFlag: u8,
1188     pub BatteryLifeTime: u32,
1189     pub BatteryFullLifeTime: u32,
1190 }
1191 impl ::core::marker::Copy for SYSTEM_POWER_STATUS {}
1192 impl ::core::clone::Clone for SYSTEM_POWER_STATUS {
clone(&self) -> Self1193     fn clone(&self) -> Self {
1194         *self
1195     }
1196 }
1197 pub const SYS_BUTTON_LID: u32 = 4u32;
1198 pub const SYS_BUTTON_LID_CHANGED: u32 = 524288u32;
1199 pub const SYS_BUTTON_LID_CLOSED: u32 = 131072u32;
1200 pub const SYS_BUTTON_LID_INITIAL: u32 = 262144u32;
1201 pub const SYS_BUTTON_LID_OPEN: u32 = 65536u32;
1202 pub const SYS_BUTTON_LID_STATE_MASK: u32 = 196608u32;
1203 pub const SYS_BUTTON_POWER: u32 = 1u32;
1204 pub const SYS_BUTTON_SLEEP: u32 = 2u32;
1205 pub const SYS_BUTTON_WAKE: u32 = 2147483648u32;
1206 pub const THERMAL_COOLING_INTERFACE_VERSION: u32 = 1u32;
1207 pub const THERMAL_DEVICE_INTERFACE_VERSION: u32 = 1u32;
1208 #[repr(C)]
1209 #[cfg(feature = "Win32_Foundation")]
1210 pub struct THERMAL_EVENT {
1211     pub Version: u32,
1212     pub Size: u32,
1213     pub Type: u32,
1214     pub Temperature: u32,
1215     pub TripPointTemperature: u32,
1216     pub Initiator: super::super::Foundation::PWSTR,
1217 }
1218 #[cfg(feature = "Win32_Foundation")]
1219 impl ::core::marker::Copy for THERMAL_EVENT {}
1220 #[cfg(feature = "Win32_Foundation")]
1221 impl ::core::clone::Clone for THERMAL_EVENT {
clone(&self) -> Self1222     fn clone(&self) -> Self {
1223         *self
1224     }
1225 }
1226 pub const THERMAL_EVENT_VERSION: u32 = 1u32;
1227 #[repr(C)]
1228 pub struct THERMAL_INFORMATION {
1229     pub ThermalStamp: u32,
1230     pub ThermalConstant1: u32,
1231     pub ThermalConstant2: u32,
1232     pub Processors: usize,
1233     pub SamplingPeriod: u32,
1234     pub CurrentTemperature: u32,
1235     pub PassiveTripPoint: u32,
1236     pub CriticalTripPoint: u32,
1237     pub ActiveTripPointCount: u8,
1238     pub ActiveTripPoint: [u32; 10],
1239 }
1240 impl ::core::marker::Copy for THERMAL_INFORMATION {}
1241 impl ::core::clone::Clone for THERMAL_INFORMATION {
clone(&self) -> Self1242     fn clone(&self) -> Self {
1243         *self
1244     }
1245 }
1246 #[repr(C)]
1247 #[cfg(feature = "Win32_Foundation")]
1248 pub struct THERMAL_POLICY {
1249     pub Version: u32,
1250     pub WaitForUpdate: super::super::Foundation::BOOLEAN,
1251     pub Hibernate: super::super::Foundation::BOOLEAN,
1252     pub Critical: super::super::Foundation::BOOLEAN,
1253     pub ThermalStandby: super::super::Foundation::BOOLEAN,
1254     pub ActivationReasons: u32,
1255     pub PassiveLimit: u32,
1256     pub ActiveLevel: u32,
1257     pub OverThrottled: super::super::Foundation::BOOLEAN,
1258 }
1259 #[cfg(feature = "Win32_Foundation")]
1260 impl ::core::marker::Copy for THERMAL_POLICY {}
1261 #[cfg(feature = "Win32_Foundation")]
1262 impl ::core::clone::Clone for THERMAL_POLICY {
clone(&self) -> Self1263     fn clone(&self) -> Self {
1264         *self
1265     }
1266 }
1267 pub const THERMAL_POLICY_VERSION_1: u32 = 1u32;
1268 pub const THERMAL_POLICY_VERSION_2: u32 = 2u32;
1269 #[repr(C)]
1270 pub struct THERMAL_WAIT_READ {
1271     pub Timeout: u32,
1272     pub LowTemperature: u32,
1273     pub HighTemperature: u32,
1274 }
1275 impl ::core::marker::Copy for THERMAL_WAIT_READ {}
1276 impl ::core::clone::Clone for THERMAL_WAIT_READ {
clone(&self) -> Self1277     fn clone(&self) -> Self {
1278         *self
1279     }
1280 }
1281 pub const TZ_ACTIVATION_REASON_CURRENT: u32 = 2u32;
1282 pub const TZ_ACTIVATION_REASON_THERMAL: u32 = 1u32;
1283 pub const UNKNOWN_CAPACITY: u32 = 4294967295u32;
1284 pub const UNKNOWN_CURRENT: u32 = 4294967295u32;
1285 pub const UNKNOWN_RATE: u32 = 2147483648u32;
1286 pub const UNKNOWN_VOLTAGE: u32 = 4294967295u32;
1287 pub type USB_CHARGER_PORT = i32;
1288 pub const UsbChargerPort_Legacy: USB_CHARGER_PORT = 0i32;
1289 pub const UsbChargerPort_TypeC: USB_CHARGER_PORT = 1i32;
1290 pub const UsbChargerPort_Max: USB_CHARGER_PORT = 2i32;
1291 #[repr(C)]
1292 #[cfg(feature = "Win32_Foundation")]
1293 pub struct USER_POWER_POLICY {
1294     pub Revision: u32,
1295     pub IdleAc: POWER_ACTION_POLICY,
1296     pub IdleDc: POWER_ACTION_POLICY,
1297     pub IdleTimeoutAc: u32,
1298     pub IdleTimeoutDc: u32,
1299     pub IdleSensitivityAc: u8,
1300     pub IdleSensitivityDc: u8,
1301     pub ThrottlePolicyAc: u8,
1302     pub ThrottlePolicyDc: u8,
1303     pub MaxSleepAc: SYSTEM_POWER_STATE,
1304     pub MaxSleepDc: SYSTEM_POWER_STATE,
1305     pub Reserved: [u32; 2],
1306     pub VideoTimeoutAc: u32,
1307     pub VideoTimeoutDc: u32,
1308     pub SpindownTimeoutAc: u32,
1309     pub SpindownTimeoutDc: u32,
1310     pub OptimizeForPowerAc: super::super::Foundation::BOOLEAN,
1311     pub OptimizeForPowerDc: super::super::Foundation::BOOLEAN,
1312     pub FanThrottleToleranceAc: u8,
1313     pub FanThrottleToleranceDc: u8,
1314     pub ForcedThrottleAc: u8,
1315     pub ForcedThrottleDc: u8,
1316 }
1317 #[cfg(feature = "Win32_Foundation")]
1318 impl ::core::marker::Copy for USER_POWER_POLICY {}
1319 #[cfg(feature = "Win32_Foundation")]
1320 impl ::core::clone::Clone for USER_POWER_POLICY {
clone(&self) -> Self1321     fn clone(&self) -> Self {
1322         *self
1323     }
1324 }
1325 #[repr(C)]
1326 pub struct WAKE_ALARM_INFORMATION {
1327     pub TimerIdentifier: u32,
1328     pub Timeout: u32,
1329 }
1330 impl ::core::marker::Copy for WAKE_ALARM_INFORMATION {}
1331 impl ::core::clone::Clone for WAKE_ALARM_INFORMATION {
clone(&self) -> Self1332     fn clone(&self) -> Self {
1333         *self
1334     }
1335 }
1336