Author: akhaldi
Date: Sun May 16 14:23:45 2010
New Revision: 47239
URL:
http://svn.reactos.org/svn/reactos?rev=47239&view=rev
Log:
[PSDK]
- batclass.h : Introduce pragma once, apply a consistent formatting, apply appropriate
conditionals, add some missing definitions and group related ones.
- winnt.h : Update JOBOBJECTINFOCLASS, BATTERY_REPORTING_SCALE and
POWER_INFORMATION_LEVEL, introduce _ANONYMOUS_UNION in
SYSTEM_LOGICAL_PROCESSOR_INFORMATION, and apply a consistent formatting for the rest.
Modified:
branches/header-work/include/psdk/batclass.h
branches/header-work/include/psdk/winnt.h
Modified: branches/header-work/include/psdk/batclass.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/batcla…
==============================================================================
--- branches/header-work/include/psdk/batclass.h [iso-8859-1] (original)
+++ branches/header-work/include/psdk/batclass.h [iso-8859-1] Sun May 16 14:23:45 2010
@@ -20,49 +20,38 @@
*
*/
-#ifndef __BATCLASS_H
-#define __BATCLASS_H
+#pragma once
#ifdef __cplusplus
extern "C" {
#endif
-#if defined(_BATTERYCLASS_)
- #define BCLASSAPI
-#else
- #define BCLASSAPI DECLSPEC_IMPORT
-#endif
-
-
/* Battery device GUIDs */
DEFINE_GUID(GUID_DEVICE_BATTERY,
0x72631e54L, 0x78A4, 0x11d0, 0xbc, 0xf7, 0x00, 0xaa, 0x00, 0xb7, 0xb3, 0x2a);
+#if (NTDDI_VERSION >= NTDDI_WINXP)
DEFINE_GUID(BATTERY_STATUS_WMI_GUID,
0xfc4670d1, 0xebbf, 0x416e, 0x87, 0xce, 0x37, 0x4a, 0x4e, 0xbc, 0x11, 0x1a);
-
DEFINE_GUID(BATTERY_RUNTIME_WMI_GUID,
0x535a3767, 0x1ac2, 0x49bc, 0xa0, 0x77, 0x3f, 0x7a, 0x02, 0xe4, 0x0a, 0xec);
-
DEFINE_GUID(BATTERY_TEMPERATURE_WMI_GUID,
0x1a52a14d, 0xadce, 0x4a44, 0x9a, 0x3e, 0xc8, 0xd8, 0xf1, 0x5f, 0xf2, 0xc2);
-
DEFINE_GUID(BATTERY_FULL_CHARGED_CAPACITY_WMI_GUID,
0x40b40565, 0x96f7, 0x4435, 0x86, 0x94, 0x97, 0xe0, 0xe4, 0x39, 0x59, 0x05);
-
DEFINE_GUID(BATTERY_CYCLE_COUNT_WMI_GUID,
0xef98db24, 0x0014, 0x4c25, 0xa5, 0x0b, 0xc7, 0x24, 0xae, 0x5c, 0xd3, 0x71);
-
DEFINE_GUID(BATTERY_STATIC_DATA_WMI_GUID,
0x05e1e463, 0xe4e2, 0x4ea9, 0x80, 0xcb, 0x9b, 0xd4, 0xb3, 0xca, 0x06, 0x55);
-
DEFINE_GUID(BATTERY_STATUS_CHANGE_WMI_GUID,
0xcddfa0c3, 0x7c5b, 0x4e43, 0xa0, 0x34, 0x05, 0x9f, 0xa5, 0xb8, 0x43, 0x64);
-
DEFINE_GUID(BATTERY_TAG_CHANGE_WMI_GUID,
0x5e1f6e19, 0x8786, 0x4d23, 0x94, 0xfc, 0x9e, 0x74, 0x6b, 0xd5, 0xd8, 0x88);
-
+#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
+
+#ifndef _BATCLASS_
+#define _BATCLASS_
/* BATTERY_INFORMATION.Capabilities constants */
#define BATTERY_SET_CHARGE_SUPPORTED 0x00000001
@@ -72,30 +61,13 @@
#define BATTERY_CAPACITY_RELATIVE 0x40000000
#define BATTERY_SYSTEM_BATTERY 0x80000000
-typedef struct _BATTERY_INFORMATION {
- ULONG Capabilities;
- UCHAR Technology;
- UCHAR Reserved[3];
- UCHAR Chemistry[4];
- ULONG DesignedCapacity;
- ULONG FullChargedCapacity;
- ULONG DefaultAlert1;
- ULONG DefaultAlert2;
- ULONG CriticalBias;
- ULONG CycleCount;
-} BATTERY_INFORMATION, *PBATTERY_INFORMATION;
-
-typedef struct _BATTERY_MANUFACTURE_DATE {
- UCHAR Day;
- UCHAR Month;
- USHORT Year;
-} BATTERY_MANUFACTURE_DATE, *PBATTERY_MANUFACTURE_DATE;
-
-typedef struct _BATTERY_NOTIFY {
- ULONG PowerState;
- ULONG LowCapacity;
- ULONG HighCapacity;
-} BATTERY_NOTIFY, *PBATTERY_NOTIFY;
+/* BATTERY_INFORMATION.Capacity constants */
+#define BATTERY_UNKNOWN_CAPACITY 0xFFFFFFFF
+
+/* BatteryEstimatedTime constant */
+#define BATTERY_UNKNOWN_TIME 0x80000000
+
+#define MAX_BATTERY_STRING_SIZE 128
/* BATTERY_STATUS.PowerState flags */
#define BATTERY_POWER_ON_LINE 0x00000001
@@ -109,15 +81,17 @@
/* BATTERY_STATUS.Rate constant */
#define BATTERY_UNKNOWN_RATE 0x80000000
-typedef struct _BATTERY_STATUS {
- ULONG PowerState;
- ULONG Capacity;
- ULONG Voltage;
- LONG Rate;
-} BATTERY_STATUS, *PBATTERY_STATUS;
-
-/* BATTERY_INFORMATION.Capacity constants */
-#define BATTERY_UNKNOWN_CAPACITY 0xFFFFFFFF
+#define IOCTL_BATTERY_QUERY_TAG \
+ CTL_CODE(FILE_DEVICE_BATTERY, 0x10, METHOD_BUFFERED, FILE_READ_ACCESS)
+#define IOCTL_BATTERY_QUERY_INFORMATION \
+ CTL_CODE(FILE_DEVICE_BATTERY, 0x11, METHOD_BUFFERED, FILE_READ_ACCESS)
+#define IOCTL_BATTERY_SET_INFORMATION \
+ CTL_CODE(FILE_DEVICE_BATTERY, 0x12, METHOD_BUFFERED, FILE_WRITE_ACCESS)
+#define IOCTL_BATTERY_QUERY_STATUS \
+ CTL_CODE(FILE_DEVICE_BATTERY, 0x13, METHOD_BUFFERED, FILE_READ_ACCESS)
+
+/* NTSTATUS possibly returned by BCLASS_QUERY_STATUS */
+#define BATTERY_TAG_INVALID 0
typedef enum _BATTERY_QUERY_INFORMATION_LEVEL {
BatteryInformation = 0,
@@ -131,17 +105,30 @@
BatterySerialNumber
} BATTERY_QUERY_INFORMATION_LEVEL;
-/* BatteryEstimatedTime constant */
-#define BATTERY_UNKNOWN_TIME 0x80000000
-
-/* NTSTATUS possibly returned by BCLASS_QUERY_STATUS */
-#define BATTERY_TAG_INVALID 0
-
typedef struct _BATTERY_QUERY_INFORMATION {
- ULONG BatteryTag;
- BATTERY_QUERY_INFORMATION_LEVEL InformationLevel;
- LONG AtRate;
+ ULONG BatteryTag;
+ BATTERY_QUERY_INFORMATION_LEVEL InformationLevel;
+ LONG AtRate;
} BATTERY_QUERY_INFORMATION, *PBATTERY_QUERY_INFORMATION;
+
+typedef struct _BATTERY_INFORMATION {
+ ULONG Capabilities;
+ UCHAR Technology;
+ UCHAR Reserved[3];
+ UCHAR Chemistry[4];
+ ULONG DesignedCapacity;
+ ULONG FullChargedCapacity;
+ ULONG DefaultAlert1;
+ ULONG DefaultAlert2;
+ ULONG CriticalBias;
+ ULONG CycleCount;
+} BATTERY_INFORMATION, *PBATTERY_INFORMATION;
+
+typedef struct _BATTERY_MANUFACTURE_DATE {
+ UCHAR Day;
+ UCHAR Month;
+ USHORT Year;
+} BATTERY_MANUFACTURE_DATE, *PBATTERY_MANUFACTURE_DATE;
typedef enum _BATTERY_SET_INFORMATION_LEVEL {
BatteryCriticalBias = 0,
@@ -149,119 +136,185 @@
BatteryDischarge
} BATTERY_SET_INFORMATION_LEVEL;
-#define MAX_BATTERY_STRING_SIZE 128
-
typedef struct _BATTERY_SET_INFORMATION {
- ULONG BatteryTag;
- BATTERY_SET_INFORMATION_LEVEL InformationLevel;
- UCHAR Buffer[1];
+ ULONG BatteryTag;
+ BATTERY_SET_INFORMATION_LEVEL InformationLevel;
+ UCHAR Buffer[1];
} BATTERY_SET_INFORMATION, *PBATTERY_SET_INFORMATION;
typedef struct _BATTERY_WAIT_STATUS {
- ULONG BatteryTag;
- ULONG Timeout;
- ULONG PowerState;
- ULONG LowCapacity;
- ULONG HighCapacity;
+ ULONG BatteryTag;
+ ULONG Timeout;
+ ULONG PowerState;
+ ULONG LowCapacity;
+ ULONG HighCapacity;
} BATTERY_WAIT_STATUS, *PBATTERY_WAIT_STATUS;
-
-#define IOCTL_BATTERY_QUERY_TAG \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x10, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_BATTERY_QUERY_INFORMATION \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x11, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_BATTERY_SET_INFORMATION \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x12, METHOD_BUFFERED, FILE_WRITE_ACCESS)
-
-#define IOCTL_BATTERY_QUERY_STATUS \
- CTL_CODE(FILE_DEVICE_BATTERY, 0x13, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-
-typedef NTSTATUS
-(NTAPI *BCLASS_DISABLE_STATUS_NOTIFY)(
- IN PVOID Context);
-
-typedef NTSTATUS
-(NTAPI *BCLASS_QUERY_INFORMATION)(
- IN PVOID Context,
- IN ULONG BatteryTag,
- IN BATTERY_QUERY_INFORMATION_LEVEL Level,
- IN LONG AtRate OPTIONAL,
- OUT PVOID Buffer,
- IN ULONG BufferLength,
- OUT PULONG ReturnedLength);
-
-typedef NTSTATUS
-(NTAPI *BCLASS_QUERY_STATUS)(
- IN PVOID Context,
- IN ULONG BatteryTag,
- OUT PBATTERY_STATUS BatteryStatus);
-
-typedef NTSTATUS
-(NTAPI *BCLASS_QUERY_TAG)(
- IN PVOID Context,
- OUT PULONG BatteryTag);
-
-typedef NTSTATUS
-(NTAPI *BCLASS_SET_INFORMATION)(
- IN PVOID Context,
- IN ULONG BatteryTag,
- IN BATTERY_SET_INFORMATION_LEVEL Level,
- IN PVOID Buffer OPTIONAL);
-
-typedef NTSTATUS
-(NTAPI *BCLASS_SET_STATUS_NOTIFY)(
- IN PVOID Context,
- IN ULONG BatteryTag,
- IN PBATTERY_NOTIFY BatteryNotify);
-
-
-typedef struct _BATTERY_MINIPORT_INFO {
- USHORT MajorVersion;
- USHORT MinorVersion;
- PVOID Context;
- BCLASS_QUERY_TAG QueryTag;
- BCLASS_QUERY_INFORMATION QueryInformation;
- BCLASS_SET_INFORMATION SetInformation;
- BCLASS_QUERY_STATUS QueryStatus;
- BCLASS_SET_STATUS_NOTIFY SetStatusNotify;
- BCLASS_DISABLE_STATUS_NOTIFY DisableStatusNotify;
- PDEVICE_OBJECT Pdo;
- PUNICODE_STRING DeviceName;
-} BATTERY_MINIPORT_INFO, *PBATTERY_MINIPORT_INFO;
+typedef struct _BATTERY_STATUS {
+ ULONG PowerState;
+ ULONG Capacity;
+ ULONG Voltage;
+ LONG Rate;
+} BATTERY_STATUS, *PBATTERY_STATUS;
+
+#ifndef _WINDOWS_H
/* BATTERY_MINIPORT_INFO.XxxVersion */
#define BATTERY_CLASS_MAJOR_VERSION 0x0001
#define BATTERY_CLASS_MINOR_VERSION 0x0000
+typedef NTSTATUS
+(NTAPI BCLASS_QUERY_TAG_CALLBACK)(
+ IN PVOID Context,
+ OUT PULONG BatteryTag);
+typedef BCLASS_QUERY_TAG_CALLBACK *PBCLASS_QUERY_TAG_CALLBACK;
+
+typedef NTSTATUS
+(NTAPI BCLASS_QUERY_INFORMATION_CALLBACK)(
+ IN PVOID Context,
+ IN ULONG BatteryTag,
+ IN BATTERY_QUERY_INFORMATION_LEVEL Level,
+ IN LONG AtRate,
+ OUT PVOID Buffer,
+ IN ULONG BufferLength,
+ OUT PULONG ReturnedLength);
+typedef BCLASS_QUERY_INFORMATION_CALLBACK *PBCLASS_QUERY_INFORMATION_CALLBACK;
+
+typedef NTSTATUS
+(NTAPI BCLASS_QUERY_STATUS_CALLBACK)(
+ IN PVOID Context,
+ IN ULONG BatteryTag,
+ OUT PBATTERY_STATUS BatteryStatus);
+typedef BCLASS_QUERY_STATUS_CALLBACK *PBCLASS_QUERY_STATUS_CALLBACK;
+
+typedef struct _BATTERY_NOTIFY {
+ ULONG PowerState;
+ ULONG LowCapacity;
+ ULONG HighCapacity;
+} BATTERY_NOTIFY, *PBATTERY_NOTIFY;
+
+typedef NTSTATUS
+(NTAPI BCLASS_SET_STATUS_NOTIFY_CALLBACK)(
+ IN PVOID Context,
+ IN ULONG BatteryTag,
+ IN PBATTERY_NOTIFY BatteryNotify);
+typedef BCLASS_SET_STATUS_NOTIFY_CALLBACK *PBCLASS_SET_STATUS_NOTIFY_CALLBACK;
+
+typedef NTSTATUS
+(NTAPI BCLASS_SET_INFORMATION_CALLBACK)(
+ IN PVOID Context,
+ IN ULONG BatteryTag,
+ IN BATTERY_SET_INFORMATION_LEVEL Level,
+ IN PVOID Buffer OPTIONAL);
+typedef BCLASS_SET_INFORMATION_CALLBACK *PBCLASS_SET_INFORMATION_CALLBACK;
+
+typedef NTSTATUS
+(NTAPI BCLASS_DISABLE_STATUS_NOTIFY_CALLBACK)(
+ IN PVOID Context);
+typedef BCLASS_DISABLE_STATUS_NOTIFY_CALLBACK *PBCLASS_DISABLE_STATUS_NOTIFY_CALLBACK;
+
+typedef PBCLASS_QUERY_TAG_CALLBACK BCLASS_QUERY_TAG;
+typedef PBCLASS_QUERY_INFORMATION_CALLBACK BCLASS_QUERY_INFORMATION;
+typedef PBCLASS_QUERY_STATUS_CALLBACK BCLASS_QUERY_STATUS;
+typedef PBCLASS_SET_STATUS_NOTIFY_CALLBACK BCLASS_SET_STATUS_NOTIFY;
+typedef PBCLASS_SET_INFORMATION_CALLBACK BCLASS_SET_INFORMATION;
+typedef PBCLASS_DISABLE_STATUS_NOTIFY_CALLBACK BCLASS_DISABLE_STATUS_NOTIFY;
+
+typedef struct _BATTERY_MINIPORT_INFO {
+ USHORT MajorVersion;
+ USHORT MinorVersion;
+ PVOID Context;
+ BCLASS_QUERY_TAG QueryTag;
+ BCLASS_QUERY_INFORMATION QueryInformation;
+ BCLASS_SET_INFORMATION SetInformation;
+ BCLASS_QUERY_STATUS QueryStatus;
+ BCLASS_SET_STATUS_NOTIFY SetStatusNotify;
+ BCLASS_DISABLE_STATUS_NOTIFY DisableStatusNotify;
+ PDEVICE_OBJECT Pdo;
+ PUNICODE_STRING DeviceName;
+} BATTERY_MINIPORT_INFO, *PBATTERY_MINIPORT_INFO;
+
+#if (NTDDI_VERSION >= NTDDI_WINXP)
+
+typedef struct _BATTERY_WMI_STATUS {
+ ULONG Tag;
+ ULONG RemainingCapacity;
+ LONG ChargeRate;
+ LONG DischargeRate;
+ ULONG Voltage;
+ BOOLEAN PowerOnline;
+ BOOLEAN Charging;
+ BOOLEAN Discharging;
+ BOOLEAN Critical;
+} BATTERY_WMI_STATUS, *PBATTERY_WMI_STATUS;
+
+typedef struct _BATTERY_WMI_RUNTIME {
+ ULONG Tag;
+ ULONG EstimatedRuntime;
+} BATTERY_WMI_RUNTIME, *PBATTERY_WMI_RUNTIME;
+
+typedef struct _BATTERY_WMI_TEMPERATURE {
+ ULONG Tag;
+ ULONG Temperature;
+} BATTERY_WMI_TEMPERATURE, *PBATTERY_WMI_TEMPERATURE;
+
+typedef struct _BATTERY_WMI_FULL_CHARGED_CAPACITY {
+ ULONG Tag;
+ ULONG FullChargedCapacity;
+} BATTERY_WMI_FULL_CHARGED_CAPACITY, *PBATTERY_WMI_FULL_CHARGED_CAPACITY;
+
+typedef struct _BATTERY_WMI_CYCLE_COUNT {
+ ULONG Tag;
+ ULONG CycleCount;
+} BATTERY_WMI_CYCLE_COUNT, *PBATTERY_WMI_CYCLE_COUNT;
+
+typedef struct _BATTERY_WMI_STATIC_DATA {
+ ULONG Tag;
+ WCHAR ManufactureDate[25];
+ BATTERY_REPORTING_SCALE Granularity [4];
+ ULONG Capabilities;
+ UCHAR Technology;
+ ULONG Chemistry;
+ ULONG DesignedCapacity;
+ ULONG DefaultAlert1;
+ ULONG DefaultAlert2;
+ ULONG CriticalBias;
+ WCHAR Strings[1];
+} BATTERY_WMI_STATIC_DATA, *PBATTERY_WMI_STATIC_DATA;
+
+typedef struct _BATTERY_WMI_STATUS_CHANGE {
+ ULONG Tag;
+ BOOLEAN PowerOnline;
+ BOOLEAN Charging;
+ BOOLEAN Discharging;
+ BOOLEAN Critical;
+} BATTERY_WMI_STATUS_CHANGE, *PBATTERY_WMI_STATUS_CHANGE;
+
+typedef struct _BATTERY_TAG_CHANGE {
+ ULONG Tag;
+} BATTERY_TAG_CHANGE, *PBATTERY_TAG_CHANGE;
+
+#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
+
+#if defined(_BATTERYCLASS_)
+#define BCLASSAPI
+#else
+#define BCLASSAPI DECLSPEC_IMPORT
+#endif
BCLASSAPI
NTSTATUS
NTAPI
BatteryClassInitializeDevice(
- IN PBATTERY_MINIPORT_INFO MiniportInfo,
- IN PVOID *ClassData);
+ IN PBATTERY_MINIPORT_INFO MiniportInfo,
+ IN PVOID *ClassData);
BCLASSAPI
NTSTATUS
NTAPI
BatteryClassIoctl(
- IN PVOID ClassData,
- IN PIRP Irp);
-
-BCLASSAPI
-NTSTATUS
-NTAPI
-BatteryClassQueryWmiDataBlock(
- IN PVOID ClassData,
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp,
- IN ULONG GuidIndex,
- IN OUT PULONG InstanceLengthArray,
- IN ULONG OutBufferSize,
- OUT PUCHAR Buffer);
+ IN PVOID ClassData,
+ IN OUT PIRP Irp);
BCLASSAPI
NTSTATUS
@@ -269,24 +322,42 @@
BatteryClassStatusNotify(
IN PVOID ClassData);
+#if (NTDDI_VERSION >= NTDDI_WINXP)
+
+BCLASSAPI
+NTSTATUS
+NTAPI
+BatteryClassQueryWmiDataBlock(
+ IN PVOID ClassData,
+ IN OUT PDEVICE_OBJECT DeviceObject,
+ IN OUT PIRP Irp,
+ IN ULONG GuidIndex,
+ OUT PULONG InstanceLengthArray,
+ IN ULONG OutBufferSize,
+ OUT PUCHAR Buffer OPTIONAL);
+
BCLASSAPI
NTSTATUS
NTAPI
BatteryClassSystemControl(
- IN PVOID ClassData,
- IN PVOID WmiLibContext, /* PWMILIB_CONTEXT */
- IN PDEVICE_OBJECT DeviceObject,
- IN PIRP Irp,
- OUT PVOID Disposition); /* PSYSCTL_IRP_DISPOSITION */
+ IN PVOID ClassData,
+ IN PVOID WmiLibContext, /* PWMILIB_CONTEXT */
+ IN PDEVICE_OBJECT DeviceObject,
+ IN OUT PIRP Irp,
+ OUT PVOID Disposition); /* PSYSCTL_IRP_DISPOSITION */
+
+#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
BCLASSAPI
NTSTATUS
NTAPI
BatteryClassUnload(
- IN PVOID ClassData);
+ IN PVOID ClassData);
+
+#endif /* _WINDOWS_H */
+
+#endif /* _BATCLASS_ */
#ifdef __cplusplus
}
#endif
-
-#endif /* __BATCLASS_H */
Modified: branches/header-work/include/psdk/winnt.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/winnt.…
==============================================================================
--- branches/header-work/include/psdk/winnt.h [iso-8859-1] (original)
+++ branches/header-work/include/psdk/winnt.h [iso-8859-1] Sun May 16 14:23:45 2010
@@ -3211,19 +3211,21 @@
} QUOTA_LIMITS,*PQUOTA_LIMITS;
typedef struct _IO_COUNTERS {
- ULONGLONG ReadOperationCount;
- ULONGLONG WriteOperationCount;
- ULONGLONG OtherOperationCount;
- ULONGLONG ReadTransferCount;
- ULONGLONG WriteTransferCount;
- ULONGLONG OtherTransferCount;
+ ULONGLONG ReadOperationCount;
+ ULONGLONG WriteOperationCount;
+ ULONGLONG OtherOperationCount;
+ ULONGLONG ReadTransferCount;
+ ULONGLONG WriteTransferCount;
+ ULONGLONG OtherTransferCount;
} IO_COUNTERS, *PIO_COUNTERS;
+
typedef struct _FILE_NOTIFY_INFORMATION {
- DWORD NextEntryOffset;
- DWORD Action;
- DWORD FileNameLength;
- WCHAR FileName[1];
+ DWORD NextEntryOffset;
+ DWORD Action;
+ DWORD FileNameLength;
+ WCHAR FileName[1];
} FILE_NOTIFY_INFORMATION,*PFILE_NOTIFY_INFORMATION;
+
typedef struct _TAPE_ERASE {
DWORD Type;
BOOLEAN Immediate;
@@ -3283,15 +3285,17 @@
DWORD Count;
DWORD Size;
} TAPE_CREATE_PARTITION,*PTAPE_CREATE_PARTITION;
+
typedef struct _MEMORY_BASIC_INFORMATION {
- PVOID BaseAddress;
- PVOID AllocationBase;
- DWORD AllocationProtect;
- SIZE_T RegionSize;
- DWORD State;
- DWORD Protect;
- DWORD Type;
+ PVOID BaseAddress;
+ PVOID AllocationBase;
+ DWORD AllocationProtect;
+ SIZE_T RegionSize;
+ DWORD State;
+ DWORD Protect;
+ DWORD Type;
} MEMORY_BASIC_INFORMATION,*PMEMORY_BASIC_INFORMATION;
+
typedef struct _MESSAGE_RESOURCE_ENTRY {
WORD Length;
WORD Flags;
@@ -4285,13 +4289,13 @@
} NT_TIB64,*PNT_TIB64;
typedef struct _REPARSE_GUID_DATA_BUFFER {
- DWORD ReparseTag;
- WORD ReparseDataLength;
- WORD Reserved;
- GUID ReparseGuid;
- struct {
- BYTE DataBuffer[1];
- } GenericReparseBuffer;
+ DWORD ReparseTag;
+ WORD ReparseDataLength;
+ WORD Reserved;
+ GUID ReparseGuid;
+ struct {
+ BYTE DataBuffer[1];
+ } GenericReparseBuffer;
} REPARSE_GUID_DATA_BUFFER, *PREPARSE_GUID_DATA_BUFFER;
typedef struct _REPARSE_POINT_INFORMATION {
@@ -4300,9 +4304,9 @@
} REPARSE_POINT_INFORMATION, *PREPARSE_POINT_INFORMATION;
typedef union _FILE_SEGMENT_ELEMENT {
- PVOID64 Buffer;
- ULONGLONG Alignment;
-}FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT;
+ PVOID64 Buffer;
+ ULONGLONG Alignment;
+} FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT;
/* JOBOBJECT_BASIC_LIMIT_INFORMATION.LimitFlags constants */
#define JOB_OBJECT_LIMIT_WORKINGSET 0x0001
@@ -4357,17 +4361,18 @@
#define JOB_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|31)
typedef enum _JOBOBJECTINFOCLASS {
- JobObjectBasicAccountingInformation = 1,
- JobObjectBasicLimitInformation,
- JobObjectBasicProcessIdList,
- JobObjectBasicUIRestrictions,
- JobObjectSecurityLimitInformation,
- JobObjectEndOfJobTimeInformation,
- JobObjectAssociateCompletionPortInformation,
- JobObjectBasicAndIoAccountingInformation,
- JobObjectExtendedLimitInformation,
- JobObjectJobSetInformation,
- MaxJobObjectInfoClass
+ JobObjectBasicAccountingInformation = 1,
+ JobObjectBasicLimitInformation,
+ JobObjectBasicProcessIdList,
+ JobObjectBasicUIRestrictions,
+ JobObjectSecurityLimitInformation,
+ JobObjectEndOfJobTimeInformation,
+ JobObjectAssociateCompletionPortInformation,
+ JobObjectBasicAndIoAccountingInformation,
+ JobObjectExtendedLimitInformation,
+ JobObjectJobSetInformation,
+ JobObjectGroupInformation,
+ MaxJobObjectInfoClass
} JOBOBJECTINFOCLASS;
typedef struct _JOB_SET_ARRAY {
@@ -4377,70 +4382,71 @@
} JOB_SET_ARRAY, *PJOB_SET_ARRAY;
typedef struct _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION {
- LARGE_INTEGER TotalUserTime;
- LARGE_INTEGER TotalKernelTime;
- LARGE_INTEGER ThisPeriodTotalUserTime;
- LARGE_INTEGER ThisPeriodTotalKernelTime;
- DWORD TotalPageFaultCount;
- DWORD TotalProcesses;
- DWORD ActiveProcesses;
- DWORD TotalTerminatedProcesses;
+ LARGE_INTEGER TotalUserTime;
+ LARGE_INTEGER TotalKernelTime;
+ LARGE_INTEGER ThisPeriodTotalUserTime;
+ LARGE_INTEGER ThisPeriodTotalKernelTime;
+ DWORD TotalPageFaultCount;
+ DWORD TotalProcesses;
+ DWORD ActiveProcesses;
+ DWORD TotalTerminatedProcesses;
} JOBOBJECT_BASIC_ACCOUNTING_INFORMATION,*PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION;
+
typedef struct _JOBOBJECT_BASIC_LIMIT_INFORMATION {
- LARGE_INTEGER PerProcessUserTimeLimit;
- LARGE_INTEGER PerJobUserTimeLimit;
- DWORD LimitFlags;
- SIZE_T MinimumWorkingSetSize;
- SIZE_T MaximumWorkingSetSize;
- DWORD ActiveProcessLimit;
- ULONG_PTR Affinity;
- DWORD PriorityClass;
- DWORD SchedulingClass;
+ LARGE_INTEGER PerProcessUserTimeLimit;
+ LARGE_INTEGER PerJobUserTimeLimit;
+ DWORD LimitFlags;
+ SIZE_T MinimumWorkingSetSize;
+ SIZE_T MaximumWorkingSetSize;
+ DWORD ActiveProcessLimit;
+ ULONG_PTR Affinity;
+ DWORD PriorityClass;
+ DWORD SchedulingClass;
} JOBOBJECT_BASIC_LIMIT_INFORMATION,*PJOBOBJECT_BASIC_LIMIT_INFORMATION;
typedef struct _JOBOBJECT_BASIC_PROCESS_ID_LIST {
- DWORD NumberOfAssignedProcesses;
- DWORD NumberOfProcessIdsInList;
- ULONG_PTR ProcessIdList[1];
+ DWORD NumberOfAssignedProcesses;
+ DWORD NumberOfProcessIdsInList;
+ ULONG_PTR ProcessIdList[1];
} JOBOBJECT_BASIC_PROCESS_ID_LIST, *PJOBOBJECT_BASIC_PROCESS_ID_LIST;
typedef struct _JOBOBJECT_BASIC_UI_RESTRICTIONS {
- DWORD UIRestrictionsClass;
+ DWORD UIRestrictionsClass;
} JOBOBJECT_BASIC_UI_RESTRICTIONS,*PJOBOBJECT_BASIC_UI_RESTRICTIONS;
typedef struct _JOBOBJECT_SECURITY_LIMIT_INFORMATION {
- DWORD SecurityLimitFlags;
- HANDLE JobToken;
- PTOKEN_GROUPS SidsToDisable;
- PTOKEN_PRIVILEGES PrivilegesToDelete;
- PTOKEN_GROUPS RestrictedSids;
+ DWORD SecurityLimitFlags;
+ HANDLE JobToken;
+ PTOKEN_GROUPS SidsToDisable;
+ PTOKEN_PRIVILEGES PrivilegesToDelete;
+ PTOKEN_GROUPS RestrictedSids;
} JOBOBJECT_SECURITY_LIMIT_INFORMATION,*PJOBOBJECT_SECURITY_LIMIT_INFORMATION;
typedef struct _JOBOBJECT_END_OF_JOB_TIME_INFORMATION {
- DWORD EndOfJobTimeAction;
+ DWORD EndOfJobTimeAction;
} JOBOBJECT_END_OF_JOB_TIME_INFORMATION,*PJOBOBJECT_END_OF_JOB_TIME_INFORMATION;
typedef struct _JOBOBJECT_ASSOCIATE_COMPLETION_PORT {
- PVOID CompletionKey;
- HANDLE CompletionPort;
+ PVOID CompletionKey;
+ HANDLE CompletionPort;
} JOBOBJECT_ASSOCIATE_COMPLETION_PORT,*PJOBOBJECT_ASSOCIATE_COMPLETION_PORT;
typedef struct _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION {
- JOBOBJECT_BASIC_ACCOUNTING_INFORMATION BasicInfo;
- IO_COUNTERS IoInfo;
+ JOBOBJECT_BASIC_ACCOUNTING_INFORMATION BasicInfo;
+ IO_COUNTERS IoInfo;
}
JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION,*PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION;
typedef struct _JOBOBJECT_EXTENDED_LIMIT_INFORMATION {
- JOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimitInformation;
- IO_COUNTERS IoInfo;
- SIZE_T ProcessMemoryLimit;
- SIZE_T JobMemoryLimit;
- SIZE_T PeakProcessMemoryUsed;
- SIZE_T PeakJobMemoryUsed;
+ JOBOBJECT_BASIC_LIMIT_INFORMATION BasicLimitInformation;
+ IO_COUNTERS IoInfo;
+ SIZE_T ProcessMemoryLimit;
+ SIZE_T JobMemoryLimit;
+ SIZE_T PeakProcessMemoryUsed;
+ SIZE_T PeakJobMemoryUsed;
} JOBOBJECT_EXTENDED_LIMIT_INFORMATION,*PJOBOBJECT_EXTENDED_LIMIT_INFORMATION;
typedef struct _JOBOBJECT_JOBSET_INFORMATION {
- DWORD MemberLevel;
+ DWORD MemberLevel;
} JOBOBJECT_JOBSET_INFORMATION,*PJOBOBJECT_JOBSET_INFORMATION;
/* Fixme: Making these defines conditional on WINVER will break ddk includes */
@@ -4452,46 +4458,49 @@
#define ES_CONTINUOUS 0x80000000
typedef enum _LATENCY_TIME {
- LT_DONT_CARE,
- LT_LOWEST_LATENCY
+ LT_DONT_CARE,
+ LT_LOWEST_LATENCY
} LATENCY_TIME, *PLATENCY_TIME;
typedef enum _SYSTEM_POWER_STATE {
- PowerSystemUnspecified,
- PowerSystemWorking,
- PowerSystemSleeping1,
- PowerSystemSleeping2,
- PowerSystemSleeping3,
- PowerSystemHibernate,
- PowerSystemShutdown,
- PowerSystemMaximum
+ PowerSystemUnspecified = 0,
+ PowerSystemWorking,
+ PowerSystemSleeping1,
+ PowerSystemSleeping2,
+ PowerSystemSleeping3,
+ PowerSystemHibernate,
+ PowerSystemShutdown,
+ PowerSystemMaximum
} SYSTEM_POWER_STATE, *PSYSTEM_POWER_STATE;
+
#define POWER_SYSTEM_MAXIMUM PowerSystemMaximum
typedef enum {
- PowerActionNone,
- PowerActionReserved,
- PowerActionSleep,
- PowerActionHibernate,
- PowerActionShutdown,
- PowerActionShutdownReset,
- PowerActionShutdownOff,
- PowerActionWarmEject
+ PowerActionNone = 0,
+ PowerActionReserved,
+ PowerActionSleep,
+ PowerActionHibernate,
+ PowerActionShutdown,
+ PowerActionShutdownReset,
+ PowerActionShutdownOff,
+ PowerActionWarmEject
} POWER_ACTION, *PPOWER_ACTION;
typedef enum _DEVICE_POWER_STATE {
- PowerDeviceUnspecified,
- PowerDeviceD0,
- PowerDeviceD1,
- PowerDeviceD2,
- PowerDeviceD3,
- PowerDeviceMaximum
+ PowerDeviceUnspecified = 0,
+ PowerDeviceD0,
+ PowerDeviceD1,
+ PowerDeviceD2,
+ PowerDeviceD3,
+ PowerDeviceMaximum
} DEVICE_POWER_STATE, *PDEVICE_POWER_STATE;
+#if (NTDDI_VERSION >= NTDDI_WINXP) || !defined(_BATCLASS_)
typedef struct {
- DWORD Granularity;
- DWORD Capacity;
+ DWORD Granularity;
+ DWORD Capacity;
} BATTERY_REPORTING_SCALE, *PBATTERY_REPORTING_SCALE;
+#endif
typedef struct _POWER_ACTION_POLICY {
POWER_ACTION Action;
@@ -4620,30 +4629,61 @@
} PROCESSOR_POWER_INFORMATION, *PPROCESSOR_POWER_INFORMATION;
typedef DWORD EXECUTION_STATE;
+
typedef enum _POWER_INFORMATION_LEVEL {
- SystemPowerPolicyAc,
- SystemPowerPolicyDc,
- VerifySystemPolicyAc,
- VerifySystemPolicyDc,
- SystemPowerCapabilities,
- SystemBatteryState,
- SystemPowerStateHandler,
- ProcessorStateHandler,
- SystemPowerPolicyCurrent,
- AdministratorPowerPolicy,
- SystemReserveHiberFile,
- ProcessorInformation,
- SystemPowerInformation,
- ProcessorStateHandler2,
- LastWakeTime,
- LastSleepTime,
- SystemExecutionState,
- SystemPowerStateNotifyHandler,
- ProcessorPowerPolicyAc,
- ProcessorPowerPolicyDc,
- VerifyProcessorPowerPolicyAc,
- VerifyProcessorPowerPolicyDc,
- ProcessorPowerPolicyCurrent
+ SystemPowerPolicyAc,
+ SystemPowerPolicyDc,
+ VerifySystemPolicyAc,
+ VerifySystemPolicyDc,
+ SystemPowerCapabilities,
+ SystemBatteryState,
+ SystemPowerStateHandler,
+ ProcessorStateHandler,
+ SystemPowerPolicyCurrent,
+ AdministratorPowerPolicy,
+ SystemReserveHiberFile,
+ ProcessorInformation,
+ SystemPowerInformation,
+ ProcessorStateHandler2,
+ LastWakeTime,
+ LastSleepTime,
+ SystemExecutionState,
+ SystemPowerStateNotifyHandler,
+ ProcessorPowerPolicyAc,
+ ProcessorPowerPolicyDc,
+ VerifyProcessorPowerPolicyAc,
+ VerifyProcessorPowerPolicyDc,
+ ProcessorPowerPolicyCurrent,
+ SystemPowerStateLogging,
+ SystemPowerLoggingEntry,
+ SetPowerSettingValue,
+ NotifyUserPowerSetting,
+ PowerInformationLevelUnused0,
+ PowerInformationLevelUnused1,
+ SystemVideoState,
+ TraceApplicationPowerMessage,
+ TraceApplicationPowerMessageEnd,
+ ProcessorPerfStates,
+ ProcessorIdleStates,
+ ProcessorCap,
+ SystemWakeSource,
+ SystemHiberFileInformation,
+ TraceServicePowerMessage,
+ ProcessorLoad,
+ PowerShutdownNotification,
+ MonitorCapabilities,
+ SessionPowerInit,
+ SessionDisplayState,
+ PowerRequestCreate,
+ PowerRequestAction,
+ GetPowerRequestList,
+ ProcessorInformationEx,
+ NotifyUserModeLegacyPowerEvent,
+ GroupPark,
+ ProcessorIdleDomains,
+ WakeTimerList,
+ SystemHiberFileSize,
+ PowerInformationLevelMaximum
} POWER_INFORMATION_LEVEL;
#if 1 /* (WIN32_WINNT >= 0x0500) */
@@ -4833,42 +4873,44 @@
);
typedef enum _PROCESSOR_CACHE_TYPE {
- CacheUnified,
- CacheInstruction,
- CacheData,
- CacheTrace
+ CacheUnified,
+ CacheInstruction,
+ CacheData,
+ CacheTrace
} PROCESSOR_CACHE_TYPE;
typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP {
- RelationProcessorCore,
- RelationNumaNode,
- RelationCache,
- RelationProcessorPackage
+ RelationProcessorCore,
+ RelationNumaNode,
+ RelationCache,
+ RelationProcessorPackage,
+ RelationGroup,
+ RelationAll = 0xffff
} LOGICAL_PROCESSOR_RELATIONSHIP;
#define CACHE_FULLY_ASSOCIATIVE 0xFF
typedef struct _CACHE_DESCRIPTOR {
- BYTE Level;
- BYTE Associativity;
- WORD LineSize;
- DWORD Size;
- PROCESSOR_CACHE_TYPE Type;
+ BYTE Level;
+ BYTE Associativity;
+ WORD LineSize;
+ DWORD Size;
+ PROCESSOR_CACHE_TYPE Type;
} CACHE_DESCRIPTOR, *PCACHE_DESCRIPTOR;
typedef struct _SYSTEM_LOGICAL_PROCESSOR_INFORMATION {
- ULONG_PTR ProcessorMask;
- LOGICAL_PROCESSOR_RELATIONSHIP Relationship;
- union {
- struct {
- BYTE Flags;
- } ProcessorCore;
- struct {
- DWORD NodeNumber;
- } NumaNode;
- CACHE_DESCRIPTOR Cache;
- ULONGLONG Reserved[2];
- };
+ ULONG_PTR ProcessorMask;
+ LOGICAL_PROCESSOR_RELATIONSHIP Relationship;
+ _ANONYMOUS_UNION union {
+ struct {
+ BYTE Flags;
+ } ProcessorCore;
+ struct {
+ DWORD NodeNumber;
+ } NumaNode;
+ CACHE_DESCRIPTOR Cache;
+ ULONGLONG Reserved[2];
+ } DUMMYUNIONNAME;
} SYSTEM_LOGICAL_PROCESSOR_INFORMATION, *PSYSTEM_LOGICAL_PROCESSOR_INFORMATION;
NTSYSAPI