https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c34fa1e3899bf3f3a9f58c11ba78c919d40220b6
commit c34fa1e3899bf3f3a9f58c11ba78c919d40220b6 Author: Serge Gautherie <32623169+sergegauthe...@users.noreply.github.com> AuthorDate: Wed Dec 5 13:48:01 2018 +0100 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-ma...@reactos.org> CommitDate: Wed Dec 5 13:48:01 2018 +0100 [SDK][NDK] Move SYSTEM_POWER_INFORMATION to ntpoapi.h (#869) As suggested by Thomas Faber. See CORE-12587 for more details. --- modules/rostests/apitests/powrprof/power.c | 1 + sdk/include/ddk/ntpoapi.h | 7 +++++++ sdk/include/ndk/potypes.h | 16 ++++++++++++++++ sdk/include/xdk/winnt_old.h | 9 --------- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/modules/rostests/apitests/powrprof/power.c b/modules/rostests/apitests/powrprof/power.c index e618fd8369..d95b8d108e 100644 --- a/modules/rostests/apitests/powrprof/power.c +++ b/modules/rostests/apitests/powrprof/power.c @@ -14,6 +14,7 @@ #include <ntstatus.h> #define WIN32_NO_STATUS #include <winreg.h> +#include <ndk/potypes.h> #include <powrprof.h> unsigned int g_NumPwrSchemes = 0; diff --git a/sdk/include/ddk/ntpoapi.h b/sdk/include/ddk/ntpoapi.h index 7f1496308d..7856fff043 100644 --- a/sdk/include/ddk/ntpoapi.h +++ b/sdk/include/ddk/ntpoapi.h @@ -271,6 +271,13 @@ typedef struct _PROCESSOR_STATE_HANDLER2 { PROCESSOR_PERF_LEVEL PerfLevel[1]; } PROCESSOR_STATE_HANDLER2, *PPROCESSOR_STATE_HANDLER2; +typedef struct _SYSTEM_POWER_INFORMATION { + ULONG MaxIdlenessAllowed; + ULONG Idleness; + ULONG TimeRemaining; + UCHAR CoolingMode; +} SYSTEM_POWER_INFORMATION, *PSYSTEM_POWER_INFORMATION; + _IRQL_requires_max_(PASSIVE_LEVEL) __kernel_entry NTSYSCALLAPI diff --git a/sdk/include/ndk/potypes.h b/sdk/include/ndk/potypes.h index 48a2dd69cc..9c67881085 100644 --- a/sdk/include/ndk/potypes.h +++ b/sdk/include/ndk/potypes.h @@ -27,6 +27,20 @@ Author: #include <ntpoapi.h> #endif +#ifdef NTOS_MODE_USER +// +// Information Structures for NtPowerInformation +// Copied from ddk\ntpoapi.h +// +typedef struct _SYSTEM_POWER_INFORMATION +{ + ULONG MaxIdlenessAllowed; + ULONG Idleness; + ULONG TimeRemaining; + UCHAR CoolingMode; +} SYSTEM_POWER_INFORMATION, *PSYSTEM_POWER_INFORMATION; +#endif + // // Docking states // @@ -123,7 +137,9 @@ typedef struct _PO_IRP_QUEUE PIRP PendingIrpList; } PO_IRP_QUEUE, *PPO_IRP_QUEUE; +// // Power IRP Manager +// typedef struct _PO_IRP_MANAGER { PO_IRP_QUEUE DeviceIrpQueue; diff --git a/sdk/include/xdk/winnt_old.h b/sdk/include/xdk/winnt_old.h index 07c811837f..1ea3d93973 100644 --- a/sdk/include/xdk/winnt_old.h +++ b/sdk/include/xdk/winnt_old.h @@ -3882,15 +3882,6 @@ typedef enum _POWER_INFORMATION_LEVEL { PowerInformationLevelMaximum } POWER_INFORMATION_LEVEL; -#if 1 /* (_WIN32_WINNT >= 0x0500) */ -typedef struct _SYSTEM_POWER_INFORMATION { - ULONG MaxIdlenessAllowed; - ULONG Idleness; - ULONG TimeRemaining; - UCHAR CoolingMode; -} SYSTEM_POWER_INFORMATION,*PSYSTEM_POWER_INFORMATION; -#endif - #if (_WIN32_WINNT >= 0x0501) typedef enum _ACTIVATION_CONTEXT_INFO_CLASS {