[SDK][NDK] Move SYSTEM_POWER_INFORMATION to ntpoapi.h (#869)

As suggested by Thomas Faber. See CORE-12587 for more details.
This commit is contained in:
Serge Gautherie 2018-12-05 13:48:01 +01:00 committed by Hermès BÉLUSCA - MAÏTO
parent 88ddb37acb
commit c34fa1e389
4 changed files with 24 additions and 9 deletions

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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 {