- Move more stuff to wdm.h
authorAmine Khaldi <amine.khaldi@reactos.org>
Tue, 2 Mar 2010 14:32:50 +0000 (14:32 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Tue, 2 Mar 2010 14:32:50 +0000 (14:32 +0000)
- Group some related definitions
- Add missing TRACE_INFORMATION_CLASS members
- Improve REG_NOTIFY_CLASS
- Fix REG_DELETE_KEY_INFORMATION

svn path=/branches/header-work/; revision=45755

include/ddk/wdm.h
include/ddk/winddk.h

index 47e1feb..579b61f 100644 (file)
 extern "C" {
 #endif
 
+#if !defined(_NTHALDLL_) && !defined(_BLDR_)
+
+#define NTHALAPI DECLSPEC_IMPORT
+
+#else
+
+#define NTHALAPI
+
+#endif
+
 #define NTKERNELAPI DECLSPEC_IMPORT
 
+#if defined(_WIN64)
+#define POINTER_ALIGNMENT DECLSPEC_ALIGN(8)
+#else
+#define POINTER_ALIGNMENT
+#endif
+
 #ifdef _WIN64
 #define PORT_MAXIMUM_MESSAGE_LENGTH 512
 #else
@@ -947,6 +963,21 @@ InterlockedPushEntrySList(
 
 #define PROCESSOR_FEATURE_MAX 64
 
+typedef enum _TRACE_INFORMATION_CLASS {
+  TraceIdClass,
+  TraceHandleClass,
+  TraceEnableFlagsClass,
+  TraceEnableLevelClass,
+  GlobalLoggerHandleClass,
+  EventLoggerHandleClass,
+  AllLoggerHandlesClass,
+  TraceHandleByNameClass,
+  LoggerEventsLostClass,
+  TraceSessionSettingsClass,
+  LoggerEventsLoggedClass,
+  MaxTraceInformationClass
+} TRACE_INFORMATION_CLASS;
+
 typedef enum _KINTERRUPT_POLARITY {
   InterruptPolarityUnknown,
   InterruptActiveHigh,
@@ -1384,6 +1415,8 @@ typedef struct _PNP_BUS_INFORMATION {
   MDL_SYSTEM_VA               | \
   MDL_IO_SPACE)
 
+#define FLUSH_MULTIPLE_MAXIMUM 32
+
 typedef struct _MDL {
     struct _MDL *Next;
     CSHORT Size;
@@ -1395,6 +1428,39 @@ typedef struct _MDL {
     ULONG ByteOffset;
 } MDL, *PMDL;
 
+typedef enum _MEMORY_CACHING_TYPE_ORIG {
+  MmFrameBufferCached = 2
+} MEMORY_CACHING_TYPE_ORIG;
+
+typedef enum _MEMORY_CACHING_TYPE {
+  MmNonCached = FALSE,
+  MmCached = TRUE,
+  MmWriteCombined = MmFrameBufferCached,
+  MmHardwareCoherentCached,
+  MmNonCachedUnordered,
+  MmUSWCCached,
+  MmMaximumCacheType
+} MEMORY_CACHING_TYPE;
+
+typedef enum _MM_PAGE_PRIORITY {
+  LowPagePriority,
+  NormalPagePriority = 16,
+  HighPagePriority = 32
+} MM_PAGE_PRIORITY;
+
+typedef enum _LOCK_OPERATION {
+  IoReadAccess,
+  IoWriteAccess,
+  IoModifyAccess
+} LOCK_OPERATION;
+
+typedef enum _MM_SYSTEM_SIZE {
+  MmSmallSystem,
+  MmMediumSystem,
+  MmLargeSystem
+} MM_SYSTEMSIZE;
+
+
 
 /******************************************************************************
  *                       Memory manager Functions                             *
@@ -2147,6 +2213,86 @@ typedef enum _KEY_SET_INFORMATION_CLASS {
   MaxKeySetInfoClass
 } KEY_SET_INFORMATION_CLASS;
 
+typedef enum _REG_NOTIFY_CLASS {
+  RegNtDeleteKey,
+  RegNtPreDeleteKey = RegNtDeleteKey,
+  RegNtSetValueKey,
+  RegNtPreSetValueKey = RegNtSetValueKey,
+  RegNtDeleteValueKey,
+  RegNtPreDeleteValueKey = RegNtDeleteValueKey,
+  RegNtSetInformationKey,
+  RegNtPreSetInformationKey = RegNtSetInformationKey,
+  RegNtRenameKey,
+  RegNtPreRenameKey = RegNtRenameKey,
+  RegNtEnumerateKey,
+  RegNtPreEnumerateKey = RegNtEnumerateKey,
+  RegNtEnumerateValueKey,
+  RegNtPreEnumerateValueKey = RegNtEnumerateValueKey,
+  RegNtQueryKey,
+  RegNtPreQueryKey = RegNtQueryKey,
+  RegNtQueryValueKey,
+  RegNtPreQueryValueKey = RegNtQueryValueKey,
+  RegNtQueryMultipleValueKey,
+  RegNtPreQueryMultipleValueKey = RegNtQueryMultipleValueKey,
+  RegNtPreCreateKey,
+  RegNtPostCreateKey,
+  RegNtPreOpenKey,
+  RegNtPostOpenKey,
+  RegNtKeyHandleClose,
+  RegNtPreKeyHandleClose = RegNtKeyHandleClose,
+  RegNtPostDeleteKey,
+  RegNtPostSetValueKey,
+  RegNtPostDeleteValueKey,
+  RegNtPostSetInformationKey,
+  RegNtPostRenameKey,
+  RegNtPostEnumerateKey,
+  RegNtPostEnumerateValueKey,
+  RegNtPostQueryKey,
+  RegNtPostQueryValueKey,
+  RegNtPostQueryMultipleValueKey,
+  RegNtPostKeyHandleClose,
+  RegNtPreCreateKeyEx,
+  RegNtPostCreateKeyEx,
+  RegNtPreOpenKeyEx,
+  RegNtPostOpenKeyEx,
+  RegNtPreFlushKey,
+  RegNtPostFlushKey,
+  RegNtPreLoadKey,
+  RegNtPostLoadKey,
+  RegNtPreUnLoadKey,
+  RegNtPostUnLoadKey,
+  RegNtPreQueryKeySecurity,
+  RegNtPostQueryKeySecurity,
+  RegNtPreSetKeySecurity,
+  RegNtPostSetKeySecurity,
+  RegNtCallbackObjectContextCleanup,
+  RegNtPreRestoreKey,
+  RegNtPostRestoreKey,
+  RegNtPreSaveKey,
+  RegNtPostSaveKey,
+  RegNtPreReplaceKey,
+  RegNtPostReplaceKey,
+  MaxRegNtNotifyClass
+} REG_NOTIFY_CLASS, *PREG_NOTIFY_CLASS;
+
+typedef NTSTATUS
+(NTAPI *PEX_CALLBACK_FUNCTION)(
+    IN PVOID CallbackContext,
+    IN PVOID Argument1,
+    IN PVOID Argument2
+);
+
+typedef struct _REG_DELETE_KEY_INFORMATION {
+  PVOID Object;
+  PVOID CallContext;
+  PVOID ObjectContext;
+  PVOID Reserved;
+} REG_DELETE_KEY_INFORMATION, *PREG_DELETE_KEY_INFORMATION
+#if (NTDDI_VERSION >= NTDDI_VISTA)
+, REG_FLUSH_KEY_INFORMATION, *PREG_FLUSH_KEY_INFORMATION
+#endif
+;
+
 /******************************************************************************
  *                         I/O Manager Functions                              *
  ******************************************************************************/
@@ -2536,6 +2682,20 @@ IoMapTransfer(
 
 #define MAXIMUM_VOLUME_LABEL_LENGTH       (32 * sizeof(WCHAR))
 
+typedef struct _OBJECT_HANDLE_INFORMATION {
+  ULONG HandleAttributes;
+  ACCESS_MASK GrantedAccess;
+} OBJECT_HANDLE_INFORMATION, *POBJECT_HANDLE_INFORMATION;
+
+typedef struct _CLIENT_ID {
+  HANDLE  UniqueProcess;
+  HANDLE  UniqueThread;
+} CLIENT_ID, *PCLIENT_ID;
+
+typedef VOID
+(DDKAPI *PKSTART_ROUTINE)(
+  IN PVOID  StartContext);
+
 typedef struct _VPB {
   CSHORT  Type;
   CSHORT  Size;
@@ -2725,7 +2885,31 @@ typedef enum _CREATE_FILE_TYPE {
 #define IO_REPARSE                      0x0
 #define IO_REMOUNT                      0x1
 
+typedef union _POWER_STATE {
+  SYSTEM_POWER_STATE  SystemState;
+  DEVICE_POWER_STATE  DeviceState;
+} POWER_STATE, *PPOWER_STATE;
+
+typedef enum _POWER_STATE_TYPE {
+  SystemPowerState = 0,
+  DevicePowerState
+} POWER_STATE_TYPE, *PPOWER_STATE_TYPE;
+
+typedef struct _IO_STATUS_BLOCK {
+  _ANONYMOUS_UNION union {
+    NTSTATUS  Status;
+    PVOID  Pointer;
+  } DUMMYUNIONNAME;
+  ULONG_PTR  Information;
+} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
 
+typedef VOID
+(DDKAPI *PREQUEST_POWER_COMPLETE)(
+  IN PDEVICE_OBJECT  DeviceObject,
+  IN UCHAR  MinorFunction,
+  IN POWER_STATE  PowerState,
+  IN PVOID  Context,
+  IN PIO_STATUS_BLOCK  IoStatus);
 
 typedef struct _PCI_SLOT_NUMBER {
   union {
@@ -2738,14 +2922,6 @@ typedef struct _PCI_SLOT_NUMBER {
   } u;
 } PCI_SLOT_NUMBER, *PPCI_SLOT_NUMBER;
 
-typedef struct _IO_STATUS_BLOCK {
-  _ANONYMOUS_UNION union {
-    NTSTATUS  Status;
-    PVOID  Pointer;
-  } DUMMYUNIONNAME;
-  ULONG_PTR  Information;
-} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
-
 typedef VOID
 (DDKAPI *PIO_APC_ROUTINE)(
   IN PVOID ApcContext,
@@ -2972,16 +3148,6 @@ typedef BOOLEAN
   IN PVOID Context,
   IN PPCI_DEVICE_PRESENCE_PARAMETERS Parameters);
 
-typedef union _POWER_STATE {
-  SYSTEM_POWER_STATE  SystemState;
-  DEVICE_POWER_STATE  DeviceState;
-} POWER_STATE, *PPOWER_STATE;
-
-typedef enum _POWER_STATE_TYPE {
-  SystemPowerState = 0,
-  DevicePowerState
-} POWER_STATE_TYPE, *PPOWER_STATE_TYPE;
-
 typedef struct _BUS_INTERFACE_STANDARD {
   USHORT  Size;
   USHORT  Version;
index 413d866..5a589e7 100644 (file)
@@ -42,12 +42,6 @@ extern "C" {
 
 #include "intrin.h"
 
-#if !defined(_NTHAL_)
-#define NTHALAPI DECLSPEC_IMPORT
-#else
-#define NTHALAPI
-#endif
-
 /* Pseudo modifiers for parameters */
 #ifndef IN
 #define IN
@@ -66,12 +60,6 @@ extern "C" {
 
 #define RESTRICTED_POINTER
 
-#if defined(_WIN64)
-#define POINTER_ALIGNMENT DECLSPEC_ALIGN(8)
-#else
-#define POINTER_ALIGNMENT
-#endif
-
 #define DECLSPEC_ADDRSAFE
 
 #ifdef NONAMELESSUNION
@@ -1321,54 +1309,6 @@ typedef enum _IO_QUERY_DEVICE_DATA_FORMAT {
   IoQueryDeviceMaxData
 } IO_QUERY_DEVICE_DATA_FORMAT, *PIO_QUERY_DEVICE_DATA_FORMAT;
 
-typedef enum _MEMORY_CACHING_TYPE_ORIG {
-  MmFrameBufferCached = 2
-} MEMORY_CACHING_TYPE_ORIG;
-
-typedef enum _MEMORY_CACHING_TYPE {
-  MmNonCached = FALSE,
-  MmCached = TRUE,
-  MmWriteCombined = MmFrameBufferCached,
-  MmHardwareCoherentCached,
-  MmNonCachedUnordered,
-  MmUSWCCached,
-  MmMaximumCacheType
-} MEMORY_CACHING_TYPE;
-
-typedef enum _MM_PAGE_PRIORITY {
-  LowPagePriority,
-  NormalPagePriority = 16,
-  HighPagePriority = 32
-} MM_PAGE_PRIORITY;
-
-typedef enum _LOCK_OPERATION {
-  IoReadAccess,
-  IoWriteAccess,
-  IoModifyAccess
-} LOCK_OPERATION;
-
-#define FLUSH_MULTIPLE_MAXIMUM 32
-
-typedef enum _MM_SYSTEM_SIZE {
-  MmSmallSystem,
-  MmMediumSystem,
-  MmLargeSystem
-} MM_SYSTEMSIZE;
-
-typedef struct _OBJECT_HANDLE_INFORMATION {
-  ULONG HandleAttributes;
-  ACCESS_MASK GrantedAccess;
-} OBJECT_HANDLE_INFORMATION, *POBJECT_HANDLE_INFORMATION;
-
-typedef struct _CLIENT_ID {
-  HANDLE  UniqueProcess;
-  HANDLE  UniqueThread;
-} CLIENT_ID, *PCLIENT_ID;
-
-typedef VOID
-(DDKAPI *PKSTART_ROUTINE)(
-  IN PVOID  StartContext);
-
 typedef VOID
 (DDKAPI *PCREATE_PROCESS_NOTIFY_ROUTINE)(
   IN HANDLE  ParentId,
@@ -1589,82 +1529,6 @@ typedef struct _PROCESS_SESSION_INFORMATION
     ULONG SessionId;
 } PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION;
 
-typedef VOID
-(DDKAPI *PREQUEST_POWER_COMPLETE)(
-  IN PDEVICE_OBJECT  DeviceObject,
-  IN UCHAR  MinorFunction,
-  IN POWER_STATE  PowerState,
-  IN PVOID  Context,
-  IN PIO_STATUS_BLOCK  IoStatus);
-
-typedef enum _TRACE_INFORMATION_CLASS {
-  TraceIdClass,
-  TraceHandleClass,
-  TraceEnableFlagsClass,
-  TraceEnableLevelClass,
-  GlobalLoggerHandleClass,
-  EventLoggerHandleClass,
-  AllLoggerHandlesClass,
-  TraceHandleByNameClass
-} TRACE_INFORMATION_CLASS;
-
-typedef enum _REG_NOTIFY_CLASS
-{
-  RegNtDeleteKey,
-  RegNtPreDeleteKey = RegNtDeleteKey,
-  RegNtSetValueKey,
-  RegNtPreSetValueKey = RegNtSetValueKey,
-  RegNtDeleteValueKey,
-  RegNtPreDeleteValueKey = RegNtDeleteValueKey,
-  RegNtSetInformationKey,
-  RegNtPreSetInformationKey = RegNtSetInformationKey,
-  RegNtRenameKey,
-  RegNtPreRenameKey = RegNtRenameKey,
-  RegNtEnumerateKey,
-  RegNtPreEnumerateKey = RegNtEnumerateKey,
-  RegNtEnumerateValueKey,
-  RegNtPreEnumerateValueKey = RegNtEnumerateValueKey,
-  RegNtQueryKey,
-  RegNtPreQueryKey = RegNtQueryKey,
-  RegNtQueryValueKey,
-  RegNtPreQueryValueKey = RegNtQueryValueKey,
-  RegNtQueryMultipleValueKey,
-  RegNtPreQueryMultipleValueKey = RegNtQueryMultipleValueKey,
-  RegNtPreCreateKey,
-  RegNtPostCreateKey,
-  RegNtPreOpenKey,
-  RegNtPostOpenKey,
-  RegNtKeyHandleClose,
-  RegNtPreKeyHandleClose = RegNtKeyHandleClose,
-  RegNtPostDeleteKey,
-  RegNtPostSetValueKey,
-  RegNtPostDeleteValueKey,
-  RegNtPostSetInformationKey,
-  RegNtPostRenameKey,
-  RegNtPostEnumerateKey,
-  RegNtPostEnumerateValueKey,
-  RegNtPostQueryKey,
-  RegNtPostQueryValueKey,
-  RegNtPostQueryMultipleValueKey,
-  RegNtPostKeyHandleClose,
-  RegNtPreCreateKeyEx,
-  RegNtPostCreateKeyEx,
-  RegNtPreOpenKeyEx,
-  RegNtPostOpenKeyEx
-} REG_NOTIFY_CLASS, *PREG_NOTIFY_CLASS;
-
-typedef NTSTATUS
-(NTAPI *PEX_CALLBACK_FUNCTION)(
-    IN PVOID CallbackContext,
-    IN PVOID Argument1,
-    IN PVOID Argument2
-);
-
-typedef struct _REG_DELETE_KEY_INFORMATION
-{
-    PVOID Object;
-} REG_DELETE_KEY_INFORMATION, *PREG_DELETE_KEY_INFORMATION;
-
 typedef struct _REG_SET_VALUE_KEY_INFORMATION
 {
     PVOID Object;