Author: akhaldi
Date: Wed Mar 3 22:06:23 2010
New Revision: 45807
URL:
http://svn.reactos.org/svn/reactos?rev=45807&view=rev
Log:
- Move more stuff to wdm.h
- Improve more Io* and Ke* definitions
Modified:
branches/header-work/include/ddk/wdm.h
branches/header-work/include/ddk/winddk.h
Modified: branches/header-work/include/ddk/wdm.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/wdm.h?r…
==============================================================================
--- branches/header-work/include/ddk/wdm.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/wdm.h [iso-8859-1] Wed Mar 3 22:06:23 2010
@@ -1454,6 +1454,170 @@
/******************************************************************************
* Kernel Functions *
******************************************************************************/
+
+#if (NTDDI_VERSION >= NTDDI_WIN2K)
+
+NTKERNELAPI
+DECLSPEC_NORETURN
+VOID
+NTAPI
+KeBugCheckEx(
+ IN ULONG BugCheckCode,
+ IN ULONG_PTR BugCheckParameter1,
+ IN ULONG_PTR BugCheckParameter2,
+ IN ULONG_PTR BugCheckParameter3,
+ IN ULONG_PTR BugCheckParameter4);
+
+NTKERNELAPI
+BOOLEAN
+KeCancelTimer(
+ IN OUT PKTIMER);
+
+NTKERNELAPI
+NTSTATUS
+KeDelayExecutionThread(
+ IN KPROCESSOR_MODE WaitMode,
+ IN BOOLEAN Alertable,
+ IN PLARGE_INTEGER Interval);
+
+NTKERNELAPI
+BOOLEAN
+KeDeregisterBugCheckCallback(
+ IN OUT PKBUGCHECK_CALLBACK_RECORD CallbackRecord);
+
+NTKERNELAPI
+VOID
+KeEnterCriticalRegion(VOID);
+
+NTKERNELAPI
+VOID
+KeInitializeDeviceQueue(
+ OUT PKDEVICE_QUEUE DeviceQueue);
+
+NTKERNELAPI
+VOID
+KeInitializeMutex(
+ OUT PRKMUTEX Mutex,
+ IN ULONG Level);
+
+NTKERNELAPI
+VOID
+KeInitializeSemaphore(
+ OUT PRKSEMAPHORE Semaphore,
+ IN LONG Count,
+ IN LONG Limit);
+
+NTKERNELAPI
+VOID
+KeInitializeTimer(
+ OUT PKTIMER Timer);
+
+NTKERNELAPI
+VOID
+KeInitializeTimerEx(
+ OUT PKTIMER Timer,
+ IN TIMER_TYPE Type);
+
+NTKERNELAPI
+BOOLEAN
+KeInsertByKeyDeviceQueue(
+ IN OUT PKDEVICE_QUEUE DeviceQueue,
+ IN OUT PKDEVICE_QUEUE_ENTRY DeviceQueueEntry,
+ IN ULONG SortKey);
+
+NTKERNELAPI
+BOOLEAN
+KeInsertDeviceQueue(
+ IN OUT PKDEVICE_QUEUE DeviceQueue,
+ IN OUT PKDEVICE_QUEUE_ENTRY DeviceQueueEntry);
+
+NTKERNELAPI
+BOOLEAN
+KeInsertQueueDpc(
+ IN OUT PRKDPC Dpc,
+ IN PVOID SystemArgument1 OPTIONAL,
+ IN PVOID SystemArgument2 OPTIONAL);
+
+NTKERNELAPI
+VOID
+KeLeaveCriticalRegion(VOID);
+
+#endif
+
+#if (NTDDI_VERSION >= NTDDI_WINXP)
+
+VOID
+FASTCALL
+KeAcquireInStackQueuedSpinLock (
+ IN OUT PKSPIN_LOCK SpinLock,
+ OUT PKLOCK_QUEUE_HANDLE LockHandle);
+
+NTKERNELAPI
+VOID
+FASTCALL
+KeAcquireInStackQueuedSpinLockAtDpcLevel(
+ IN OUT PKSPIN_LOCK SpinLock,
+ OUT PKLOCK_QUEUE_HANDLE LockHandle);
+
+NTKERNELAPI
+KIRQL
+KeAcquireInterruptSpinLock(
+ IN OUT PKINTERRUPT Interrupt);
+
+NTKERNELAPI
+BOOLEAN
+KeAreApcsDisabled(VOID);
+
+NTKERNELAPI
+ULONG
+KeGetRecommendedSharedDataAlignment(VOID);
+
+#endif
+
+#if (NTDDI_VERSION >= NTDDI_WINXPSP2)
+
+NTKERNELAPI
+VOID
+KeFlushQueuedDpcs(
+ VOID);
+
+#endif
+
+#if defined(_IA64_)
+FORCEINLINE
+VOID
+KeFlushWriteBuffer (VOID)
+{
+ __mf ();
+ return;
+}
+
+#else
+NTHALAPI
+VOID
+KeFlushWriteBuffer (VOID);
+
+#endif
+
+NTKERNELAPI
+VOID
+KeClearEvent(
+ IN OUT PRKEVENT Event);
+
+/*
+ * VOID
+ * KeFlushIoBuffers(
+ * IN PMDL Mdl,
+ * IN BOOLEAN ReadOperation,
+ * IN BOOLEAN DmaOperation)
+ */
+#define KeFlushIoBuffers(_Mdl, _ReadOperation, _DmaOperation)
+
+#define ExAcquireSpinLock(Lock, OldIrql) KeAcquireSpinLock((Lock), (OldIrql))
+#define ExReleaseSpinLock(Lock, OldIrql) KeReleaseSpinLock((Lock), (OldIrql))
+#define ExAcquireSpinLockAtDpcLevel(Lock) KeAcquireSpinLockAtDpcLevel(Lock)
+#define ExReleaseSpinLockFromDpcLevel(Lock) KeReleaseSpinLockFromDpcLevel(Lock)
+
/* SPINLOCK FUNCTIONS */
@@ -6634,6 +6798,72 @@
IN PULONG Key OPTIONAL,
IN PDRIVER_CANCEL CancelFunction OPTIONAL);
+NTKERNELAPI
+VOID
+IoStartTimer(
+ IN PDEVICE_OBJECT DeviceObject);
+
+NTKERNELAPI
+VOID
+IoStopTimer(
+ IN PDEVICE_OBJECT DeviceObject);
+
+NTKERNELAPI
+NTSTATUS
+IoUnregisterPlugPlayNotification(
+ IN PVOID NotificationEntry);
+
+NTKERNELAPI
+VOID
+IoUnregisterShutdownNotification(
+ IN PDEVICE_OBJECT DeviceObject);
+
+NTKERNELAPI
+VOID
+IoUpdateShareAccess(
+ IN PFILE_OBJECT FileObject,
+ IN OUT PSHARE_ACCESS ShareAccess);
+
+NTKERNELAPI
+NTSTATUS
+IoWMIAllocateInstanceIds(
+ IN GUID *Guid,
+ IN ULONG InstanceCount,
+ OUT ULONG *FirstInstanceId);
+
+NTKERNELAPI
+NTSTATUS
+IoWMIQuerySingleInstanceMultiple(
+ IN PVOID *DataBlockObjectList,
+ IN PUNICODE_STRING InstanceNames,
+ IN ULONG ObjectCount,
+ IN OUT ULONG *InOutBufferSize,
+ OUT PVOID OutBuffer);
+
+NTKERNELAPI
+NTSTATUS
+IoWMIRegistrationControl(
+ IN PDEVICE_OBJECT DeviceObject,
+ IN ULONG Action);
+
+NTKERNELAPI
+NTSTATUS
+IoWMISuggestInstanceName(
+ IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL,
+ IN PUNICODE_STRING SymbolicLinkName OPTIONAL,
+ IN BOOLEAN CombineNames,
+ OUT PUNICODE_STRING SuggestedInstanceName);
+
+NTKERNELAPI
+NTSTATUS
+IoWMIWriteEvent(
+ IN PVOID WnodeEventItem);
+
+NTKERNELAPI
+VOID
+IoWriteErrorLogEntry(
+ IN PVOID ElEntry);
+
#endif
#if (NTDDI_VERSION >= NTDDI_WINXP)
@@ -6700,6 +6930,95 @@
IN BOOLEAN DeferredStartIo,
IN BOOLEAN NonCancelable);
+NTKERNELAPI
+NTSTATUS
+IoWMIDeviceObjectToInstanceName(
+ IN PVOID DataBlockObject,
+ IN PDEVICE_OBJECT DeviceObject,
+ OUT PUNICODE_STRING InstanceName);
+
+NTKERNELAPI
+NTSTATUS
+IoWMIExecuteMethod(
+ IN PVOID DataBlockObject,
+ IN PUNICODE_STRING InstanceName,
+ IN ULONG MethodId,
+ IN ULONG InBufferSize,
+ IN OUT PULONG OutBufferSize,
+ IN OUT PUCHAR InOutBuffer);
+
+NTKERNELAPI
+NTSTATUS
+IoWMIHandleToInstanceName(
+ IN PVOID DataBlockObject,
+ IN HANDLE FileHandle,
+ OUT PUNICODE_STRING InstanceName);
+
+NTKERNELAPI
+NTSTATUS
+IoWMIOpenBlock(
+ IN GUID *DataBlockGuid,
+ IN ULONG DesiredAccess,
+ OUT PVOID *DataBlockObject);
+
+NTKERNELAPI
+NTSTATUS
+IoWMIQueryAllData(
+ IN PVOID DataBlockObject,
+ IN OUT ULONG *InOutBufferSize,
+ OUT PVOID OutBuffer);
+
+NTKERNELAPI
+NTSTATUS
+IoWMIQueryAllDataMultiple(
+ IN PVOID *DataBlockObjectList,
+ IN ULONG ObjectCount,
+ IN OUT ULONG *InOutBufferSize,
+ OUT PVOID OutBuffer);
+
+NTKERNELAPI
+NTSTATUS
+IoWMIQuerySingleInstance(
+ IN PVOID DataBlockObject,
+ IN PUNICODE_STRING InstanceName,
+ IN OUT ULONG *InOutBufferSize,
+ OUT PVOID OutBuffer);
+
+NTKERNELAPI
+NTSTATUS
+IoWMISetNotificationCallback(
+ IN OUT PVOID Object,
+ IN WMI_NOTIFICATION_CALLBACK Callback,
+ IN PVOID Context OPTIONAL);
+
+NTKERNELAPI
+NTSTATUS
+IoWMISetSingleInstance(
+ IN PVOID DataBlockObject,
+ IN PUNICODE_STRING InstanceName,
+ IN ULONG Version,
+ IN ULONG ValueBufferSize,
+ IN PVOID ValueBuffer);
+
+NTKERNELAPI
+NTSTATUS
+IoWMISetSingleItem(
+ IN PVOID DataBlockObject,
+ IN PUNICODE_STRING InstanceName,
+ IN ULONG DataItemId,
+ IN ULONG Version,
+ IN ULONG ValueBufferSize,
+ IN PVOID ValueBuffer);
+
+#endif
+
+#if defined(_WIN64)
+NTKERNELAPI
+ULONG
+IoWMIDeviceObjectToProviderId(
+ IN PDEVICE_OBJECT DeviceObject);
+#else
+#define IoWMIDeviceObjectToProviderId(DeviceObject) ((ULONG)(DeviceObject))
#endif
/*
Modified: branches/header-work/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/winddk.…
==============================================================================
--- branches/header-work/include/ddk/winddk.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/winddk.h [iso-8859-1] Wed Mar 3 22:06:23 2010
@@ -2790,40 +2790,6 @@
IoSetThreadHardErrorMode(
IN BOOLEAN EnableHardErrors);
-
-
-
-NTKERNELAPI
-VOID
-NTAPI
-IoStartTimer(
- IN PDEVICE_OBJECT DeviceObject);
-
-NTKERNELAPI
-VOID
-NTAPI
-IoStopTimer(
- IN PDEVICE_OBJECT DeviceObject);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoUnregisterPlugPlayNotification(
- IN PVOID NotificationEntry);
-
-NTKERNELAPI
-VOID
-NTAPI
-IoUnregisterShutdownNotification(
- IN PDEVICE_OBJECT DeviceObject);
-
-NTKERNELAPI
-VOID
-NTAPI
-IoUpdateShareAccess(
- IN PFILE_OBJECT FileObject,
- IN OUT PSHARE_ACCESS ShareAccess);
-
NTKERNELAPI
NTSTATUS
NTAPI
@@ -2837,148 +2803,6 @@
IoVolumeDeviceToDosName(
IN PVOID VolumeDeviceObject,
OUT PUNICODE_STRING DosName);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoWMIAllocateInstanceIds(
- IN GUID *Guid,
- IN ULONG InstanceCount,
- OUT ULONG *FirstInstanceId);
-
-NTKERNELAPI
-ULONG
-NTAPI
-IoWMIDeviceObjectToProviderId(
- IN PDEVICE_OBJECT DeviceObject);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoWMIDeviceObjectToInstanceName(
- IN PVOID DataBlockObject,
- IN PDEVICE_OBJECT DeviceObject,
- OUT PUNICODE_STRING InstanceName);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoWMIExecuteMethod(
- IN PVOID DataBlockObject,
- IN PUNICODE_STRING InstanceName,
- IN ULONG MethodId,
- IN ULONG InBufferSize,
- IN OUT PULONG OutBufferSize,
- IN OUT PUCHAR InOutBuffer);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoWMIHandleToInstanceName(
- IN PVOID DataBlockObject,
- IN HANDLE FileHandle,
- OUT PUNICODE_STRING InstanceName);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoWMIOpenBlock(
- IN GUID *DataBlockGuid,
- IN ULONG DesiredAccess,
- OUT PVOID *DataBlockObject);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoWMIQueryAllData(
- IN PVOID DataBlockObject,
- IN OUT ULONG *InOutBufferSize,
- OUT PVOID OutBuffer);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoWMIQueryAllDataMultiple(
- IN PVOID *DataBlockObjectList,
- IN ULONG ObjectCount,
- IN OUT ULONG *InOutBufferSize,
- OUT PVOID OutBuffer);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoWMIQuerySingleInstance(
- IN PVOID DataBlockObject,
- IN PUNICODE_STRING InstanceName,
- IN OUT ULONG *InOutBufferSize,
- OUT PVOID OutBuffer);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoWMIQuerySingleInstanceMultiple(
- IN PVOID *DataBlockObjectList,
- IN PUNICODE_STRING InstanceNames,
- IN ULONG ObjectCount,
- IN OUT ULONG *InOutBufferSize,
- OUT PVOID OutBuffer);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoWMIRegistrationControl(
- IN PDEVICE_OBJECT DeviceObject,
- IN ULONG Action);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoWMISetNotificationCallback(
- IN PVOID Object,
- IN WMI_NOTIFICATION_CALLBACK Callback,
- IN PVOID Context);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoWMISetSingleInstance(
- IN PVOID DataBlockObject,
- IN PUNICODE_STRING InstanceName,
- IN ULONG Version,
- IN ULONG ValueBufferSize,
- IN PVOID ValueBuffer);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoWMISetSingleItem(
- IN PVOID DataBlockObject,
- IN PUNICODE_STRING InstanceName,
- IN ULONG DataItemId,
- IN ULONG Version,
- IN ULONG ValueBufferSize,
- IN PVOID ValueBuffer);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoWMISuggestInstanceName(
- IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL,
- IN PUNICODE_STRING SymbolicLinkName OPTIONAL,
- IN BOOLEAN CombineNames,
- OUT PUNICODE_STRING SuggestedInstanceName);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-IoWMIWriteEvent(
- IN PVOID WnodeEventItem);
-
-NTKERNELAPI
-VOID
-NTAPI
-IoWriteErrorLogEntry(
- IN PVOID ElEntry);
NTKERNELAPI
NTSTATUS
@@ -2997,56 +2821,7 @@
IN PDEVICE_OBJECT DeviceObject,
IN struct _DRIVE_LAYOUT_INFORMATION_EX *PartitionBuffer);
-
-
/** Kernel routines **/
-
-#if defined (_M_AMD64)
-NTKERNELAPI
-VOID
-FASTCALL
-KeAcquireInStackQueuedSpinLock(
- IN PKSPIN_LOCK SpinLock,
- IN PKLOCK_QUEUE_HANDLE LockHandle);
-
-NTKERNELAPI
-VOID
-FASTCALL
-KeReleaseInStackQueuedSpinLock(
- IN PKLOCK_QUEUE_HANDLE LockHandle);
-#else
-NTHALAPI
-VOID
-FASTCALL
-KeAcquireInStackQueuedSpinLock(
- IN PKSPIN_LOCK SpinLock,
- IN PKLOCK_QUEUE_HANDLE LockHandle);
-
-NTHALAPI
-VOID
-FASTCALL
-KeReleaseInStackQueuedSpinLock(
- IN PKLOCK_QUEUE_HANDLE LockHandle);
-#endif
-
-NTKERNELAPI
-VOID
-FASTCALL
-KeAcquireInStackQueuedSpinLockAtDpcLevel(
- IN PKSPIN_LOCK SpinLock,
- IN PKLOCK_QUEUE_HANDLE LockHandle);
-
-NTKERNELAPI
-KIRQL
-NTAPI
-KeAcquireInterruptSpinLock(
- IN PKINTERRUPT Interrupt);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-KeAreApcsDisabled(
- VOID);
NTKERNELAPI
DECLSPEC_NORETURN
@@ -3054,144 +2829,6 @@
NTAPI
KeBugCheck(
IN ULONG BugCheckCode);
-
-NTKERNELAPI
-DECLSPEC_NORETURN
-VOID
-NTAPI
-KeBugCheckEx(
- IN ULONG BugCheckCode,
- IN ULONG_PTR BugCheckParameter1,
- IN ULONG_PTR BugCheckParameter2,
- IN ULONG_PTR BugCheckParameter3,
- IN ULONG_PTR BugCheckParameter4);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-KeCancelTimer(
- IN PKTIMER Timer);
-
-NTKERNELAPI
-VOID
-NTAPI
-KeClearEvent(
- IN PRKEVENT Event);
-
-NTKERNELAPI
-NTSTATUS
-NTAPI
-KeDelayExecutionThread(
- IN KPROCESSOR_MODE WaitMode,
- IN BOOLEAN Alertable,
- IN PLARGE_INTEGER Interval);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-KeDeregisterBugCheckCallback(
- IN PKBUGCHECK_CALLBACK_RECORD CallbackRecord);
-
-NTKERNELAPI
-VOID
-NTAPI
-KeEnterCriticalRegion(
- VOID);
-
-/*
- * VOID
- * KeFlushIoBuffers(
- * IN PMDL Mdl,
- * IN BOOLEAN ReadOperation,
- * IN BOOLEAN DmaOperation)
- */
-#define KeFlushIoBuffers(_Mdl, _ReadOperation, _DmaOperation)
-
-#define ExAcquireSpinLock(Lock, OldIrql) KeAcquireSpinLock((Lock), (OldIrql))
-#define ExReleaseSpinLock(Lock, OldIrql) KeReleaseSpinLock((Lock), (OldIrql))
-#define ExAcquireSpinLockAtDpcLevel(Lock) KeAcquireSpinLockAtDpcLevel(Lock)
-#define ExReleaseSpinLockFromDpcLevel(Lock) KeReleaseSpinLockFromDpcLevel(Lock)
-
-NTKERNELAPI
-VOID
-NTAPI
-KeFlushQueuedDpcs(
- VOID
-);
-
-NTHALAPI
-VOID
-NTAPI
-KeFlushWriteBuffer(VOID);
-
-NTKERNELAPI
-ULONG
-NTAPI
-KeGetRecommendedSharedDataAlignment(
- VOID);
-
-NTKERNELAPI
-VOID
-NTAPI
-KeInitializeDeviceQueue(
- IN PKDEVICE_QUEUE DeviceQueue);
-
-NTKERNELAPI
-VOID
-NTAPI
-KeInitializeMutex(
- IN PRKMUTEX Mutex,
- IN ULONG Level);
-
-NTKERNELAPI
-VOID
-NTAPI
-KeInitializeSemaphore(
- IN PRKSEMAPHORE Semaphore,
- IN LONG Count,
- IN LONG Limit);
-
-NTKERNELAPI
-VOID
-NTAPI
-KeInitializeTimer(
- IN PKTIMER Timer);
-
-NTKERNELAPI
-VOID
-NTAPI
-KeInitializeTimerEx(
- IN PKTIMER Timer,
- IN TIMER_TYPE Type);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-KeInsertByKeyDeviceQueue(
- IN PKDEVICE_QUEUE DeviceQueue,
- IN PKDEVICE_QUEUE_ENTRY DeviceQueueEntry,
- IN ULONG SortKey);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-KeInsertDeviceQueue(
- IN PKDEVICE_QUEUE DeviceQueue,
- IN PKDEVICE_QUEUE_ENTRY DeviceQueueEntry);
-
-NTKERNELAPI
-BOOLEAN
-NTAPI
-KeInsertQueueDpc(
- IN PRKDPC Dpc,
- IN PVOID SystemArgument1,
- IN PVOID SystemArgument2);
-
-NTKERNELAPI
-VOID
-NTAPI
-KeLeaveCriticalRegion(
- VOID);
#ifdef _X86_