Revert r46466 this time for real
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 27 Mar 2010 18:57:56 +0000 (18:57 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 27 Mar 2010 18:57:56 +0000 (18:57 +0000)
svn path=/trunk/; revision=46493

115 files changed:
reactos/boot/freeldr/freeldr/disk/scsiport.c
reactos/dll/win32/gdi32/objects/bitmap.c
reactos/dll/win32/hid/precomp.h
reactos/dll/win32/setupapi/setupapi.rbuild
reactos/dll/win32/setupapi/setupapi_private.h
reactos/drivers/battery/battc/battc.c
reactos/drivers/directx/dxapi/dxapi_driver.h
reactos/drivers/directx/dxg/dxg_int.h
reactos/drivers/filesystems/ext2/inc/ext2fsd.h
reactos/drivers/serial/serial/serial.h
reactos/drivers/storage/ide/uniata/atapi.h
reactos/drivers/storage/ide/uniata/bsmaster.h
reactos/drivers/storage/ide/uniata/config.h
reactos/drivers/storage/ide/uniata/id_ata.cpp
reactos/drivers/storage/ide/uniata/srb.h
reactos/drivers/storage/scsiport/stubs.c
reactos/drivers/video/displays/vga/vgaddi.h
reactos/include/ddk/afilter.h
reactos/include/ddk/atsmedia.h [new file with mode: 0644]
reactos/include/ddk/bdasup.h
reactos/include/ddk/cfg.h [moved from reactos/include/psdk/cfg.h with 65% similarity]
reactos/include/ddk/cfgmgr32.h [new file with mode: 0644]
reactos/include/ddk/csq.h
reactos/include/ddk/hidclass.h
reactos/include/ddk/hidpi.h
reactos/include/ddk/mcd.h
reactos/include/ddk/mce.h [deleted file]
reactos/include/ddk/miniport.h
reactos/include/ddk/minitape.h
reactos/include/ddk/ndis.h
reactos/include/ddk/ntagp.h
reactos/include/ddk/ntdd8042.h
reactos/include/ddk/ntddk.h
reactos/include/ddk/ntifs.h
reactos/include/ddk/ntimage.h
reactos/include/ddk/ntpoapi.h
reactos/include/ddk/parallel.h
reactos/include/ddk/scsiwmi.h
reactos/include/ddk/smbus.h
reactos/include/ddk/srb.h
reactos/include/ddk/storport.h
reactos/include/ddk/tdikrnl.h
reactos/include/ddk/tvout.h [moved from reactos/include/psdk/tvout.h with 81% similarity]
reactos/include/ddk/upssvc.h
reactos/include/ddk/video.h
reactos/include/ddk/videoagp.h
reactos/include/ddk/wdm.h
reactos/include/ddk/wmilib.h
reactos/include/ddk/xmldsodid.h [new file with mode: 0644]
reactos/include/ndk/ketypes.h
reactos/include/ndk/peb_teb.h
reactos/include/ndk/pstypes.h
reactos/include/ndk/rtlfuncs.h
reactos/include/psdk/atsmedia.h [deleted file]
reactos/include/psdk/batclass.h
reactos/include/psdk/cfgmgr32.h [deleted file]
reactos/include/psdk/devpropdef.h [deleted file]
reactos/include/psdk/evntprov.h [deleted file]
reactos/include/psdk/ktmtypes.h
reactos/include/psdk/ntdef.h
reactos/include/psdk/ntiologc.h [deleted file]
reactos/include/psdk/ntstatus.h
reactos/include/psdk/usbioctl.h
reactos/include/psdk/winbase.h
reactos/include/psdk/wincon.h
reactos/include/psdk/windef.h
reactos/include/psdk/wingdi.h
reactos/include/psdk/winnt.h
reactos/include/psdk/winuser.h
reactos/include/reactos/idl/pnp.idl
reactos/include/reactos/wine/cfgmgr32.h [new file with mode: 0644]
reactos/include/xdk/amd64/ke.h [deleted file]
reactos/include/xdk/amd64/mm.h [deleted file]
reactos/include/xdk/arm/ke.h [deleted file]
reactos/include/xdk/cmfuncs.h [deleted file]
reactos/include/xdk/cmtypes.h [deleted file]
reactos/include/xdk/exfuncs.h [deleted file]
reactos/include/xdk/extypes.h [deleted file]
reactos/include/xdk/generate.bat [deleted file]
reactos/include/xdk/halfuncs.h [deleted file]
reactos/include/xdk/haltypes.h [deleted file]
reactos/include/xdk/ia64/ke.h [deleted file]
reactos/include/xdk/interlocked.h [deleted file]
reactos/include/xdk/iofuncs.h [deleted file]
reactos/include/xdk/iotypes.h [deleted file]
reactos/include/xdk/kdfuncs.h [deleted file]
reactos/include/xdk/kdtypes.h [deleted file]
reactos/include/xdk/kefuncs.h [deleted file]
reactos/include/xdk/ketypes.h [deleted file]
reactos/include/xdk/mips/ke.h [deleted file]
reactos/include/xdk/mmfuncs.h [deleted file]
reactos/include/xdk/mmtypes.h [deleted file]
reactos/include/xdk/ntddk.template.h [deleted file]
reactos/include/xdk/nttmapi.h [deleted file]
reactos/include/xdk/obfuncs.h [deleted file]
reactos/include/xdk/obtypes.h [deleted file]
reactos/include/xdk/pofuncs.h [deleted file]
reactos/include/xdk/potypes.h [deleted file]
reactos/include/xdk/ppc/ke.h [deleted file]
reactos/include/xdk/psfuncs.h [deleted file]
reactos/include/xdk/pstypes.h [deleted file]
reactos/include/xdk/rtlfuncs.h [deleted file]
reactos/include/xdk/rtltypes.h [deleted file]
reactos/include/xdk/sefuncs.h [deleted file]
reactos/include/xdk/setypes.h [deleted file]
reactos/include/xdk/wdm.template.h [deleted file]
reactos/include/xdk/wmifuncs.h [deleted file]
reactos/include/xdk/wmitypes.h [deleted file]
reactos/include/xdk/x86/ke.h [deleted file]
reactos/include/xdk/x86/mm.h [deleted file]
reactos/include/xdk/zwfuncs.h [deleted file]
reactos/ntoskrnl/include/ntoskrnl.h
reactos/ntoskrnl/mm/mminit.c
reactos/subsystems/subsystems.rbuild
reactos/subsystems/win32/win32k/pch.h

index 81ba4a4..d8d15b1 100644 (file)
@@ -385,7 +385,7 @@ SpiCreatePortConfig(
 }
 
 VOID
-__cdecl
+DDKCDECLAPI
 ScsiDebugPrint(
     IN ULONG DebugPrintLevel,
     IN PCCHAR DebugMessage,
@@ -421,7 +421,7 @@ ScsiDebugPrint(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortCompleteRequest(
     IN PVOID HwDeviceExtension,
     IN UCHAR PathId,
@@ -435,7 +435,7 @@ ScsiPortCompleteRequest(
 
 #undef ScsiPortConvertPhysicalAddressToUlong
 ULONG
-NTAPI
+DDKAPI
 ScsiPortConvertPhysicalAddressToUlong(
     IN SCSI_PHYSICAL_ADDRESS Address)
 {
@@ -443,7 +443,7 @@ ScsiPortConvertPhysicalAddressToUlong(
 }
 
 SCSI_PHYSICAL_ADDRESS
-NTAPI
+DDKAPI
 ScsiPortConvertUlongToPhysicalAddress(
     IN ULONG UlongAddress)
 {
@@ -451,7 +451,7 @@ ScsiPortConvertUlongToPhysicalAddress(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortFlushDma(
     IN PVOID DeviceExtension)
 {
@@ -460,7 +460,7 @@ ScsiPortFlushDma(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortFreeDeviceBase(
     IN PVOID HwDeviceExtension,
     IN PVOID MappedAddress)
@@ -469,7 +469,7 @@ ScsiPortFreeDeviceBase(
 }
 
 ULONG
-NTAPI
+DDKAPI
 ScsiPortGetBusData(
     IN PVOID DeviceExtension,
     IN ULONG BusDataType,
@@ -482,7 +482,7 @@ ScsiPortGetBusData(
 }
 
 PVOID
-NTAPI
+DDKAPI
 ScsiPortGetDeviceBase(
     IN PVOID HwDeviceExtension,
     IN INTERFACE_TYPE BusType,
@@ -514,7 +514,7 @@ ScsiPortGetDeviceBase(
 }
 
 PVOID
-NTAPI
+DDKAPI
 ScsiPortGetLogicalUnit(
     IN PVOID HwDeviceExtension,
     IN UCHAR PathId,
@@ -527,7 +527,7 @@ ScsiPortGetLogicalUnit(
 }
 
 SCSI_PHYSICAL_ADDRESS
-NTAPI
+DDKAPI
 ScsiPortGetPhysicalAddress(
     IN PVOID HwDeviceExtension,
     IN PSCSI_REQUEST_BLOCK Srb OPTIONAL,
@@ -564,7 +564,7 @@ ScsiPortGetPhysicalAddress(
 }
 
 PSCSI_REQUEST_BLOCK
-NTAPI
+DDKAPI
 ScsiPortGetSrb(
     IN PVOID DeviceExtension,
     IN UCHAR PathId,
@@ -641,7 +641,7 @@ SpiAllocateCommonBuffer(
 }
 
 PVOID
-NTAPI
+DDKAPI
 ScsiPortGetUncachedExtension(
     IN PVOID HwDeviceExtension,
     IN PPORT_CONFIGURATION_INFORMATION ConfigInfo,
@@ -726,7 +726,7 @@ ScsiPortGetUncachedExtension(
 }
 
 PVOID
-NTAPI
+DDKAPI
 ScsiPortGetVirtualAddress(
     IN PVOID HwDeviceExtension,
     IN SCSI_PHYSICAL_ADDRESS PhysicalAddress)
@@ -1031,7 +1031,7 @@ SpiGetPciConfigData(
 }
 
 ULONG
-NTAPI
+DDKAPI
 ScsiPortInitialize(
     IN PVOID Argument1,
     IN PVOID Argument2,
@@ -1186,7 +1186,7 @@ ScsiPortInitialize(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortIoMapTransfer(
     IN PVOID HwDeviceExtension,
     IN PSCSI_REQUEST_BLOCK Srb,
@@ -1198,7 +1198,7 @@ ScsiPortIoMapTransfer(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortLogError(
     IN PVOID HwDeviceExtension,
     IN PSCSI_REQUEST_BLOCK Srb OPTIONAL,
@@ -1213,7 +1213,7 @@ ScsiPortLogError(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortMoveMemory(
     IN PVOID WriteBuffer,
     IN PVOID ReadBuffer,
@@ -1223,7 +1223,7 @@ ScsiPortMoveMemory(
 }
 
 VOID
-__cdecl
+DDKCDECLAPI
 ScsiPortNotification(
     IN SCSI_NOTIFICATION_TYPE NotificationType,
     IN PVOID HwDeviceExtension,
@@ -1259,7 +1259,7 @@ ScsiPortNotification(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortReadPortBufferUchar(
     IN PUCHAR Port,
     OUT PUCHAR Buffer,
@@ -1269,7 +1269,7 @@ ScsiPortReadPortBufferUchar(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortReadPortBufferUlong(
     IN PULONG Port,
     OUT PULONG Buffer,
@@ -1279,7 +1279,7 @@ ScsiPortReadPortBufferUlong(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortReadPortBufferUshort(
     IN PUSHORT Port,
     OUT PUSHORT Buffer,
@@ -1289,7 +1289,7 @@ ScsiPortReadPortBufferUshort(
 }
 
 UCHAR
-NTAPI
+DDKAPI
 ScsiPortReadPortUchar(
     IN PUCHAR Port)
 {
@@ -1300,7 +1300,7 @@ ScsiPortReadPortUchar(
 }
 
 ULONG
-NTAPI
+DDKAPI
 ScsiPortReadPortUlong(
     IN PULONG Port)
 {
@@ -1308,7 +1308,7 @@ ScsiPortReadPortUlong(
 }
 
 USHORT
-NTAPI
+DDKAPI
 ScsiPortReadPortUshort(
     IN PUSHORT Port)
 {
@@ -1316,7 +1316,7 @@ ScsiPortReadPortUshort(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortReadRegisterBufferUchar(
     IN PUCHAR Register,
     IN PUCHAR Buffer,
@@ -1327,7 +1327,7 @@ ScsiPortReadRegisterBufferUchar(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortReadRegisterBufferUlong(
     IN PULONG Register,
     IN PULONG Buffer,
@@ -1338,7 +1338,7 @@ ScsiPortReadRegisterBufferUlong(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortReadRegisterBufferUshort(
     IN PUSHORT Register,
     IN PUSHORT Buffer,
@@ -1349,7 +1349,7 @@ ScsiPortReadRegisterBufferUshort(
 }
 
 UCHAR
-NTAPI
+DDKAPI
 ScsiPortReadRegisterUchar(
     IN PUCHAR Register)
 {
@@ -1357,7 +1357,7 @@ ScsiPortReadRegisterUchar(
 }
 
 ULONG
-NTAPI
+DDKAPI
 ScsiPortReadRegisterUlong(
     IN PULONG Register)
 {
@@ -1365,7 +1365,7 @@ ScsiPortReadRegisterUlong(
 }
 
 USHORT
-NTAPI
+DDKAPI
 ScsiPortReadRegisterUshort(
     IN PUSHORT Register)
 {
@@ -1373,7 +1373,7 @@ ScsiPortReadRegisterUshort(
 }
 
 ULONG
-NTAPI
+DDKAPI
 ScsiPortSetBusDataByOffset(
     IN PVOID DeviceExtension,
     IN ULONG BusDataType,
@@ -1389,7 +1389,7 @@ ScsiPortSetBusDataByOffset(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortStallExecution(
     IN ULONG Delay)
 {
@@ -1397,7 +1397,7 @@ ScsiPortStallExecution(
 }
 
 BOOLEAN
-NTAPI
+DDKAPI
 ScsiPortValidateRange(
     IN PVOID HwDeviceExtension,
     IN INTERFACE_TYPE BusType,
@@ -1417,7 +1417,7 @@ ScsiPortValidateRange(
 
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWritePortBufferUchar(
     IN PUCHAR Port,
     IN PUCHAR Buffer,
@@ -1427,7 +1427,7 @@ ScsiPortWritePortBufferUchar(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWritePortBufferUlong(
     IN PULONG Port,
     IN PULONG Buffer,
@@ -1437,7 +1437,7 @@ ScsiPortWritePortBufferUlong(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWritePortBufferUshort(
     IN PUSHORT Port,
     IN PUSHORT Buffer,
@@ -1447,7 +1447,7 @@ ScsiPortWritePortBufferUshort(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWritePortUchar(
     IN PUCHAR Port,
     IN UCHAR Value)
@@ -1456,7 +1456,7 @@ ScsiPortWritePortUchar(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWritePortUlong(
     IN PULONG Port,
     IN ULONG Value)
@@ -1465,7 +1465,7 @@ ScsiPortWritePortUlong(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWritePortUshort(
     IN PUSHORT Port,
     IN USHORT Value)
@@ -1474,7 +1474,7 @@ ScsiPortWritePortUshort(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWriteRegisterBufferUchar(
     IN PUCHAR Register,
     IN PUCHAR Buffer,
@@ -1485,7 +1485,7 @@ ScsiPortWriteRegisterBufferUchar(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWriteRegisterBufferUlong(
     IN PULONG Register,
     IN PULONG Buffer,
@@ -1496,7 +1496,7 @@ ScsiPortWriteRegisterBufferUlong(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWriteRegisterBufferUshort(
     IN PUSHORT Register,
     IN PUSHORT Buffer,
@@ -1507,7 +1507,7 @@ ScsiPortWriteRegisterBufferUshort(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWriteRegisterUchar(
     IN PUCHAR Register,
     IN ULONG Value)
@@ -1516,7 +1516,7 @@ ScsiPortWriteRegisterUchar(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWriteRegisterUlong(
     IN PULONG Register,
     IN ULONG Value)
@@ -1525,7 +1525,7 @@ ScsiPortWriteRegisterUlong(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWriteRegisterUshort(
     IN PUSHORT Register,
     IN USHORT Value)
index 2c7d4ce..f94c31a 100644 (file)
@@ -292,7 +292,7 @@ CreateBitmap(INT  Width,
              INT  Height,
              UINT  Planes,
              UINT  BitsPixel,
-             CONST VOID* pUnsafeBits)
+             PCVOID pUnsafeBits)
 {
     /* FIXME some part should be done in user mode */
     if (Width && Height)
index 9ae79ca..29e4dd6 100644 (file)
@@ -10,6 +10,7 @@ typedef VOID
 typedef VOID
 (WINAPI *PINTERFACE_DEREFERENCE)(
   PVOID  Context);
+#define DDKAPI __stdcall // FIXME
 #include <ntndk.h>
 #include <hidusage.h>
 #include <hidclass.h>
index 6f2d0c2..bb3e0e3 100644 (file)
@@ -10,7 +10,6 @@
        <define name="wcsnicmp">_wcsnicmp</define>
 
        <define name="_SETUPAPI_" />
-       <define name="_CFGMGR32_" />
        <library>pnp_client</library>
        <library>uuid</library>
        <library>wine</library>
index a3ff489..50c2d42 100644 (file)
 
 #include <pseh/pseh2.h>
 
+/* This hack definition is necessary as long as setupapi 
+   depends on Wine "compatibility" headers */
+typedef ULONG RESOURCEID;
+typedef RESOURCEID *PRESOURCEID;
+
 #include <pnp_c.h>
 #include "rpc_private.h"
 #include "resource.h"
@@ -56,8 +61,6 @@
 #define SETUP_DEVICE_INFO_SET_MAGIC 0xd00ff057
 #define SETUP_CLASS_IMAGE_LIST_MAGIC 0xd00ff058
 
-#define CMP_MAGIC  0x01234567
-
 struct DeviceInterface /* Element of DeviceInfo.InterfaceListHead */
 {
     LIST_ENTRY ListEntry;
index 7e4854c..6a0b722 100644 (file)
@@ -23,7 +23,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
 
 BCLASSAPI
 NTSTATUS
-NTAPI
+DDKAPI
 BatteryClassUnload(PVOID ClassData)
 {
   PBATTERY_CLASS_DATA BattClass = ClassData;
@@ -44,7 +44,7 @@ BatteryClassUnload(PVOID ClassData)
 
 BCLASSAPI
 NTSTATUS
-NTAPI
+DDKAPI
 BatteryClassSystemControl(PVOID ClassData,
                           PVOID WmiLibContext,
                           PDEVICE_OBJECT DeviceObject,
@@ -58,7 +58,7 @@ BatteryClassSystemControl(PVOID ClassData,
 
 BCLASSAPI
 NTSTATUS
-NTAPI
+DDKAPI
 BatteryClassQueryWmiDataBlock(PVOID ClassData,
                               PDEVICE_OBJECT DeviceObject,
                               PIRP Irp,
@@ -74,7 +74,7 @@ BatteryClassQueryWmiDataBlock(PVOID ClassData,
 
 BCLASSAPI
 NTSTATUS
-NTAPI
+DDKAPI
 BatteryClassStatusNotify(PVOID ClassData)
 {
   PBATTERY_CLASS_DATA BattClass = ClassData;
@@ -129,7 +129,7 @@ BatteryClassStatusNotify(PVOID ClassData)
 
 BCLASSAPI
 NTSTATUS
-NTAPI
+DDKAPI
 BatteryClassInitializeDevice(PBATTERY_MINIPORT_INFO MiniportInfo,
                              PVOID *ClassData)
 {
@@ -172,7 +172,7 @@ BatteryClassInitializeDevice(PBATTERY_MINIPORT_INFO MiniportInfo,
 
 BCLASSAPI
 NTSTATUS
-NTAPI
+DDKAPI
 BatteryClassIoctl(PVOID ClassData,
                   PIRP Irp)
 {
index 996353c..322d6d1 100644 (file)
@@ -1,10 +1,10 @@
 
 /* DDK/NDK/SDK Headers */
-#include <ntddk.h>
-#include <ntddmou.h>
-#include <ntifs.h>
-#include <tvout.h>
-#include <ntndk.h>
+#include <ddk/ntddk.h>
+#include <ddk/ntddmou.h>
+#include <ddk/ntifs.h>
+#include <ddk/tvout.h>
+#include <ndk/ntndk.h>
 
 #include <stdarg.h>
 #include <windef.h>
@@ -16,7 +16,7 @@
 #include <dde.h>
 
 
-#include <ddkmapi.h>
+#include <ddk/ddkmapi.h>
 
 /* Prototypes */
 VOID DxGetVersionNumber(PVOID lpvInBuffer, LPDDGETVERSIONNUMBER lpvOutBuffer);
index ccb2204..b457e6d 100644 (file)
@@ -1,9 +1,9 @@
 /* DDK/NDK/SDK Headers */
-#include <ntddk.h>
-#include <ntddmou.h>
-#include <ntifs.h>
-#include <tvout.h>
-#include <ntndk.h>
+#include <ddk/ntddk.h>
+#include <ddk/ntddmou.h>
+#include <ddk/ntifs.h>
+#include <ddk/tvout.h>
+#include <ndk/ntndk.h>
 
 /* Win32 Headers */
 #define WINBASEAPI
index dcf35d9..bf2b784 100644 (file)
@@ -42,11 +42,8 @@ typedef unsigned char   BYTE;
 /* REACTOS FIXME */
 #undef DeleteFile
 /* This is deprecated and should be changed in the EXT2FS driver. */
-
-/* FIXME : Those two definitions already exist in wdm.h
 #define RtlLargeIntegerLessThan(a, b) (a).QuadPart < (b).QuadPart
 #define RtlLargeIntegerGreaterThan(a, b) (a).QuadPart > (b).QuadPart
-*/
 
 
 // the following include files should be in the inc sub-dir associated with this driver
index b6ed661..de94b29 100644 (file)
 #define PST_RS232 1
 #define COMMPROP_INITIALIZED 0xE73CF52E
 
+#ifndef _NTIFS_
+/* Why is it only defined in ntifs.h file? */
+NTSTATUS NTAPI
+IoAttachDeviceToDeviceStackSafe(
+  IN PDEVICE_OBJECT SourceDevice,
+  IN PDEVICE_OBJECT TargetDevice,
+  OUT PDEVICE_OBJECT *AttachedToDeviceObject);
+#endif
+
 typedef enum
 {
   dsStopped,
index 2648d4b..9974b51 100644 (file)
@@ -77,7 +77,7 @@ extern "C" {
 
 SCSIPORT_API
 VOID
-__cdecl
+DDKCDECLAPI
 ScsiDebugPrint(
     ULONG DebugPrintLevel,
     PCCHAR DebugMessage,
@@ -1066,7 +1066,7 @@ IdeMediaStatus(
     IN UCHAR Channel
     );
 
-ULONG NTAPI
+ULONG DDKAPI
 AtapiFindController(
     IN PVOID HwDeviceExtension,
     IN PVOID Context,
index 6d2adab..cfb1539 100644 (file)
@@ -1015,7 +1015,7 @@ UniataEnumBusMasterController(
     PVOID Argument2
     );
 
-extern ULONG NTAPI
+extern ULONG DDKAPI
 UniataFindCompatBusMasterController1(
     IN PVOID HwDeviceExtension,
     IN PVOID Context,
@@ -1025,7 +1025,7 @@ UniataFindCompatBusMasterController1(
     OUT PBOOLEAN Again
     );
 
-extern ULONG NTAPI
+extern ULONG DDKAPI
 UniataFindCompatBusMasterController2(
     IN PVOID HwDeviceExtension,
     IN PVOID Context,
@@ -1044,7 +1044,7 @@ UniataAllocateLunExt(
     ULONG NewNumberChannels
     );
 
-extern ULONG NTAPI
+extern ULONG DDKAPI
 UniataFindBusMasterController(
     IN PVOID HwDeviceExtension,
     IN PVOID Context,
@@ -1054,7 +1054,7 @@ UniataFindBusMasterController(
     OUT PBOOLEAN Again
     );
 
-extern ULONG NTAPI
+extern ULONG DDKAPI
 UniataFindFakeBusMasterController(
     IN PVOID HwDeviceExtension,
     IN PVOID Context,
index c0b9f4f..e17416f 100644 (file)
@@ -86,7 +86,9 @@
 /*  Compiler dependencies                          */
 /***************************************************/
 
+#define DDKAPI          __stdcall
 #define DDKFASTAPI      __fastcall
+#define DDKCDECLAPI     __cdecl
 
 /* Are we under GNU C (mingw) ??? */
 #ifdef __GNUC__
index 1cace8b..5bb5cf7 100644 (file)
@@ -94,7 +94,7 @@ BOOLEAN WinVer_WDM_Model = FALSE;
 UCHAR g_foo = 0;
 
 BOOLEAN
-NTAPI
+DDKAPI
 AtapiResetController__(
     IN PVOID HwDeviceExtension,
     IN ULONG PathId,
@@ -115,7 +115,7 @@ AtapiHwInitialize__(
 #ifndef UNIATA_CORE
 
 VOID
-NTAPI
+DDKAPI
 AtapiCallBack_X(
     IN PVOID HwDeviceExtension
     );
@@ -129,13 +129,13 @@ AtapiCallBack_X(
 #endif
 
 RETTYPE_XXableInterrupts
-NTAPI
+DDKAPI
 AtapiInterruptDpc(
     IN PVOID HwDeviceExtension
     );
 
 RETTYPE_XXableInterrupts
-NTAPI
+DDKAPI
 AtapiEnableInterrupts__(
     IN PVOID HwDeviceExtension
     );
@@ -150,7 +150,7 @@ AtapiQueueTimerDpc(
     );
 
 SCSI_ADAPTER_CONTROL_STATUS
-NTAPI
+DDKAPI
 AtapiAdapterControl(
     IN PVOID HwDeviceExtension,
     IN SCSI_ADAPTER_CONTROL_TYPE ControlType,
@@ -1005,7 +1005,7 @@ AtaUmode(PIDENTIFY_DATA2 ident)
 #ifndef UNIATA_CORE
 
 VOID
-NTAPI
+DDKAPI
 AtapiTimerDpc(
     IN PVOID HwDeviceExtension
     )
@@ -1856,7 +1856,7 @@ Return Value:
 
 --*/
 BOOLEAN
-NTAPI
+DDKAPI
 AtapiResetController(
     IN PVOID HwDeviceExtension,
     IN ULONG PathId
@@ -2598,7 +2598,7 @@ Return Value:
 
 --*/
 BOOLEAN
-NTAPI
+DDKAPI
 AtapiHwInitialize(
     IN PVOID HwDeviceExtension
     )
@@ -3210,7 +3210,7 @@ Return Value:
 
 --*/
 BOOLEAN
-NTAPI
+DDKAPI
 AtapiInterrupt(
     IN PVOID HwDeviceExtension
     )
@@ -3400,7 +3400,7 @@ AtapiInterrupt2(
 } // end AtapiInterrupt2()
 
 RETTYPE_XXableInterrupts
-NTAPI
+DDKAPI
 AtapiInterruptDpc(
     IN PVOID HwDeviceExtension
     )
@@ -3437,7 +3437,7 @@ AtapiInterruptDpc(
 
 
 RETTYPE_XXableInterrupts
-NTAPI
+DDKAPI
 AtapiEnableInterrupts__(
     IN PVOID HwDeviceExtension
     )
@@ -7251,7 +7251,7 @@ Return Value:
 
 --*/
 BOOLEAN
-NTAPI
+DDKAPI
 AtapiStartIo(
     IN PVOID HwDeviceExtension,
     IN PSCSI_REQUEST_BLOCK Srb
@@ -8343,7 +8343,7 @@ Return Value:
 --*/
 extern "C"
 ULONG
-NTAPI
+DDKAPI
 DriverEntry(
     IN PVOID DriverObject,
     IN PVOID Argument2
@@ -9059,7 +9059,7 @@ AtapiRegCheckParameterValue(
 
 
 SCSI_ADAPTER_CONTROL_STATUS
-NTAPI
+DDKAPI
 AtapiAdapterControl(
     IN PVOID HwDeviceExtension,
     IN SCSI_ADAPTER_CONTROL_TYPE ControlType,
@@ -9152,7 +9152,7 @@ AtapiAdapterControl(
 extern "C"
 NTHALAPI
 VOID
-NTAPI
+DDKAPI
 HalDisplayString (
     PUCHAR String
     );
index b3795b2..aa4f7f1 100644 (file)
@@ -424,38 +424,38 @@ typedef struct _SCSI_WMI_REQUEST_BLOCK {
 
 typedef
 BOOLEAN
-(NTAPI *PHW_INITIALIZE) (
+(DDKAPI *PHW_INITIALIZE) (
     IN PVOID DeviceExtension
     );
 
 typedef
 BOOLEAN
-(NTAPI *PHW_STARTIO) (
+(DDKAPI *PHW_STARTIO) (
     IN PVOID DeviceExtension,
     IN PSCSI_REQUEST_BLOCK Srb
     );
 
 typedef
 BOOLEAN
-(NTAPI *PHW_INTERRUPT) (
+(DDKAPI *PHW_INTERRUPT) (
     IN PVOID DeviceExtension
     );
 
 typedef
 VOID
-(NTAPI *PHW_TIMER) (
+(DDKAPI *PHW_TIMER) (
     IN PVOID DeviceExtension
     );
 
 typedef
 VOID
-(NTAPI *PHW_DMA_STARTED) (
+(DDKAPI *PHW_DMA_STARTED) (
     IN PVOID DeviceExtension
     );
 
 typedef
 ULONG
-(NTAPI *PHW_FIND_ADAPTER) (
+(DDKAPI *PHW_FIND_ADAPTER) (
     IN PVOID DeviceExtension,
     IN PVOID HwContext,
     IN PVOID BusInformation,
@@ -466,14 +466,14 @@ ULONG
 
 typedef
 BOOLEAN
-(NTAPI *PHW_RESET_BUS) (
+(DDKAPI *PHW_RESET_BUS) (
     IN PVOID DeviceExtension,
     IN ULONG PathId
     );
 
 typedef
 BOOLEAN
-(NTAPI *PHW_ADAPTER_STATE) (
+(DDKAPI *PHW_ADAPTER_STATE) (
     IN PVOID DeviceExtension,
     IN PVOID Context,
     IN BOOLEAN SaveState
@@ -481,7 +481,7 @@ BOOLEAN
 
 typedef
 SCSI_ADAPTER_CONTROL_STATUS
-(NTAPI *PHW_ADAPTER_CONTROL) (
+(DDKAPI *PHW_ADAPTER_CONTROL) (
     IN PVOID DeviceExtension,
     IN SCSI_ADAPTER_CONTROL_TYPE ControlType,
     IN PVOID Parameters
@@ -607,7 +607,7 @@ typedef struct _HW_INITIALIZATION_DATA_COMMON {
 //
 
 SCSIPORT_API
-ULONG NTAPI
+ULONG DDKAPI
 ScsiPortInitialize(
     IN PVOID Argument1,
     IN PVOID Argument2,
@@ -616,14 +616,14 @@ ScsiPortInitialize(
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortFreeDeviceBase(
     IN PVOID HwDeviceExtension,
     IN PVOID MappedAddress
     );
 
 SCSIPORT_API
-ULONG NTAPI
+ULONG DDKAPI
 ScsiPortGetBusData(
     IN PVOID DeviceExtension,
     IN ULONG BusDataType,
@@ -634,7 +634,7 @@ ScsiPortGetBusData(
     );
 
 SCSIPORT_API
-ULONG NTAPI
+ULONG DDKAPI
 ScsiPortSetBusDataByOffset(
     IN PVOID DeviceExtension,
     IN ULONG BusDataType,
@@ -646,7 +646,7 @@ ScsiPortSetBusDataByOffset(
     );
 
 SCSIPORT_API
-PVOID NTAPI
+PVOID DDKAPI
 ScsiPortGetDeviceBase(
     IN PVOID HwDeviceExtension,
     IN INTERFACE_TYPE BusType,
@@ -657,7 +657,7 @@ ScsiPortGetDeviceBase(
     );
 
 SCSIPORT_API
-PVOID NTAPI
+PVOID DDKAPI
 ScsiPortGetLogicalUnit(
     IN PVOID HwDeviceExtension,
     IN UCHAR PathId,
@@ -666,7 +666,7 @@ ScsiPortGetLogicalUnit(
     );
 
 SCSIPORT_API
-PSCSI_REQUEST_BLOCK NTAPI
+PSCSI_REQUEST_BLOCK DDKAPI
 ScsiPortGetSrb(
     IN PVOID DeviceExtension,
     IN UCHAR PathId,
@@ -676,7 +676,7 @@ ScsiPortGetSrb(
     );
 
 SCSIPORT_API
-SCSI_PHYSICAL_ADDRESS NTAPI
+SCSI_PHYSICAL_ADDRESS DDKAPI
 ScsiPortGetPhysicalAddress(
     IN PVOID HwDeviceExtension,
     IN PSCSI_REQUEST_BLOCK Srb,
@@ -685,14 +685,14 @@ ScsiPortGetPhysicalAddress(
     );
 
 SCSIPORT_API
-PVOID NTAPI
+PVOID DDKAPI
 ScsiPortGetVirtualAddress(
     IN PVOID HwDeviceExtension,
     IN SCSI_PHYSICAL_ADDRESS PhysicalAddress
     );
 
 SCSIPORT_API
-PVOID NTAPI
+PVOID DDKAPI
 ScsiPortGetUncachedExtension(
     IN PVOID HwDeviceExtension,
     IN PPORT_CONFIGURATION_INFORMATION ConfigInfo,
@@ -700,13 +700,13 @@ ScsiPortGetUncachedExtension(
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortFlushDma(
     IN PVOID DeviceExtension
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortIoMapTransfer(
     IN PVOID HwDeviceExtension,
     IN PSCSI_REQUEST_BLOCK Srb,
@@ -715,7 +715,7 @@ ScsiPortIoMapTransfer(
     );
 
 SCSIPORT_API
-VOID __cdecl
+VOID DDKCDECLAPI
 ScsiPortNotification(
     IN SCSI_NOTIFICATION_TYPE NotificationType,
     IN PVOID HwDeviceExtension,
@@ -723,7 +723,7 @@ ScsiPortNotification(
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortLogError(
     IN PVOID HwDeviceExtension,
     IN PSCSI_REQUEST_BLOCK Srb OPTIONAL,
@@ -735,7 +735,7 @@ ScsiPortLogError(
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortCompleteRequest(
     IN PVOID HwDeviceExtension,
     IN UCHAR PathId,
@@ -745,7 +745,7 @@ ScsiPortCompleteRequest(
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortMoveMemory(
     IN PVOID WriteBuffer,
     IN PVOID ReadBuffer,
@@ -753,25 +753,25 @@ ScsiPortMoveMemory(
     );
 
 SCSIPORT_API
-UCHAR NTAPI
+UCHAR DDKAPI
 ScsiPortReadPortUchar(
     IN PUCHAR Port
     );
 
 SCSIPORT_API
-USHORT NTAPI
+USHORT DDKAPI
 ScsiPortReadPortUshort(
     IN PUSHORT Port
     );
 
 SCSIPORT_API
-ULONG NTAPI
+ULONG DDKAPI
 ScsiPortReadPortUlong(
     IN PULONG Port
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortReadPortBufferUchar(
     IN PUCHAR Port,
     IN PUCHAR Buffer,
@@ -779,7 +779,7 @@ ScsiPortReadPortBufferUchar(
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortReadPortBufferUshort(
     IN PUSHORT Port,
     IN PUSHORT Buffer,
@@ -787,7 +787,7 @@ ScsiPortReadPortBufferUshort(
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortReadPortBufferUlong(
     IN PULONG Port,
     IN PULONG Buffer,
@@ -795,25 +795,25 @@ ScsiPortReadPortBufferUlong(
     );
 
 SCSIPORT_API
-UCHAR NTAPI
+UCHAR DDKAPI
 ScsiPortReadRegisterUchar(
     IN PUCHAR Register
     );
 
 SCSIPORT_API
-USHORT NTAPI
+USHORT DDKAPI
 ScsiPortReadRegisterUshort(
     IN PUSHORT Register
     );
 
 SCSIPORT_API
-ULONG NTAPI
+ULONG DDKAPI
 ScsiPortReadRegisterUlong(
     IN PULONG Register
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortReadRegisterBufferUchar(
     IN PUCHAR Register,
     IN PUCHAR Buffer,
@@ -821,7 +821,7 @@ ScsiPortReadRegisterBufferUchar(
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortReadRegisterBufferUshort(
     IN PUSHORT Register,
     IN PUSHORT Buffer,
@@ -829,7 +829,7 @@ ScsiPortReadRegisterBufferUshort(
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortReadRegisterBufferUlong(
     IN PULONG Register,
     IN PULONG Buffer,
@@ -837,34 +837,34 @@ ScsiPortReadRegisterBufferUlong(
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortStallExecution(
     IN ULONG Delay
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortWritePortUchar(
     IN PUCHAR Port,
     IN UCHAR Value
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortWritePortUshort(
     IN PUSHORT Port,
     IN USHORT Value
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortWritePortUlong(
     IN PULONG Port,
     IN ULONG Value
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortWritePortBufferUchar(
     IN PUCHAR Port,
     IN PUCHAR Buffer,
@@ -872,7 +872,7 @@ ScsiPortWritePortBufferUchar(
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortWritePortBufferUshort(
     IN PUSHORT Port,
     IN PUSHORT Buffer,
@@ -880,7 +880,7 @@ ScsiPortWritePortBufferUshort(
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortWritePortBufferUlong(
     IN PULONG Port,
     IN PULONG Buffer,
@@ -888,28 +888,28 @@ ScsiPortWritePortBufferUlong(
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortWriteRegisterUchar(
     IN PUCHAR Register,
     IN UCHAR Value
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortWriteRegisterUshort(
     IN PUSHORT Register,
     IN USHORT Value
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortWriteRegisterUlong(
     IN PULONG Register,
     IN ULONG Value
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortWriteRegisterBufferUchar(
     IN PUCHAR Register,
     IN PUCHAR Buffer,
@@ -917,7 +917,7 @@ ScsiPortWriteRegisterBufferUchar(
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortWriteRegisterBufferUshort(
     IN PUSHORT Register,
     IN PUSHORT Buffer,
@@ -925,7 +925,7 @@ ScsiPortWriteRegisterBufferUshort(
     );
 
 SCSIPORT_API
-VOID NTAPI
+VOID DDKAPI
 ScsiPortWriteRegisterBufferUlong(
     IN PULONG Register,
     IN PULONG Buffer,
@@ -933,13 +933,13 @@ ScsiPortWriteRegisterBufferUlong(
     );
 
 SCSIPORT_API
-SCSI_PHYSICAL_ADDRESS NTAPI
+SCSI_PHYSICAL_ADDRESS DDKAPI
 ScsiPortConvertUlongToPhysicalAddress(
     ULONG UlongAddress
     );
 
 SCSIPORT_API
-ULONG NTAPI
+ULONG DDKAPI
 ScsiPortConvertPhysicalAddressToUlong(
     SCSI_PHYSICAL_ADDRESS Address
     );
@@ -947,7 +947,7 @@ ScsiPortConvertPhysicalAddressToUlong(
 #define ScsiPortConvertPhysicalAddressToUlong(Address) ((Address).LowPart)
 
 SCSIPORT_API
-BOOLEAN NTAPI
+BOOLEAN DDKAPI
 ScsiPortValidateRange(
     IN PVOID HwDeviceExtension,
     IN INTERFACE_TYPE BusType,
@@ -960,7 +960,7 @@ ScsiPortValidateRange(
 // begin_ntminitape
 
 SCSIPORT_API
-VOID __cdecl
+VOID DDKCDECLAPI
 ScsiDebugPrint(
     ULONG DebugPrintLevel,
     PCCHAR DebugMessage,
index 478c35b..9e286d1 100644 (file)
 #define NDEBUG
 #include <debug.h>
 
+#ifdef _MSC_VER
+  #define DDKAPI
+#endif
+
 SCSI_PHYSICAL_ADDRESS
-NTAPI
+DDKAPI
 ScsiPortConvertUlongToPhysicalAddress(
     IN ULONG  UlongAddress)
 {
@@ -23,7 +27,7 @@ ScsiPortConvertUlongToPhysicalAddress(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortReadPortBufferUchar(
     IN PUCHAR Port,
     IN PUCHAR Buffer,
@@ -33,7 +37,7 @@ ScsiPortReadPortBufferUchar(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortReadPortBufferUshort(
     IN PUSHORT Port,
     IN PUSHORT Buffer,
@@ -43,7 +47,7 @@ ScsiPortReadPortBufferUshort(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortReadPortBufferUlong(
     IN PULONG Port,
     IN PULONG Buffer,
@@ -53,7 +57,7 @@ ScsiPortReadPortBufferUlong(
 }
 
 UCHAR
-NTAPI
+DDKAPI
 ScsiPortReadPortUchar(
     IN PUCHAR Port)
 {
@@ -61,7 +65,7 @@ ScsiPortReadPortUchar(
 }
 
 USHORT
-NTAPI
+DDKAPI
 ScsiPortReadPortUshort(
     IN PUSHORT Port)
 {
@@ -69,7 +73,7 @@ ScsiPortReadPortUshort(
 }
 
 ULONG
-NTAPI
+DDKAPI
 ScsiPortReadPortUlong(
     IN PULONG Port)
 {
@@ -77,7 +81,7 @@ ScsiPortReadPortUlong(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortReadRegisterBufferUchar(
     IN PUCHAR Register,
     IN PUCHAR Buffer,
@@ -87,7 +91,7 @@ ScsiPortReadRegisterBufferUchar(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortReadRegisterBufferUshort(
     IN PUSHORT Register,
     IN PUSHORT Buffer,
@@ -97,7 +101,7 @@ ScsiPortReadRegisterBufferUshort(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortReadRegisterBufferUlong(
     IN PULONG Register,
     IN PULONG Buffer,
@@ -107,7 +111,7 @@ ScsiPortReadRegisterBufferUlong(
 }
 
 UCHAR
-NTAPI
+DDKAPI
 ScsiPortReadRegisterUchar(
     IN PUCHAR Register)
 {
@@ -115,7 +119,7 @@ ScsiPortReadRegisterUchar(
 }
 
 USHORT
-NTAPI
+DDKAPI
 ScsiPortReadRegisterUshort(
     IN PUSHORT Register)
 {
@@ -123,7 +127,7 @@ ScsiPortReadRegisterUshort(
 }
 
 ULONG
-NTAPI
+DDKAPI
 ScsiPortReadRegisterUlong(
     IN PULONG Register)
 {
@@ -131,7 +135,7 @@ ScsiPortReadRegisterUlong(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWritePortBufferUchar(
     IN PUCHAR Port,
     IN PUCHAR Buffer,
@@ -141,7 +145,7 @@ ScsiPortWritePortBufferUchar(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWritePortBufferUshort(
     IN PUSHORT Port,
     IN PUSHORT Buffer,
@@ -151,7 +155,7 @@ ScsiPortWritePortBufferUshort(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWritePortBufferUlong(
     IN PULONG Port,
     IN PULONG Buffer,
@@ -161,7 +165,7 @@ ScsiPortWritePortBufferUlong(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWritePortUchar(
     IN PUCHAR Port,
     IN UCHAR Value)
@@ -170,7 +174,7 @@ ScsiPortWritePortUchar(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWritePortUshort(
     IN PUSHORT Port,
     IN USHORT Value)
@@ -179,7 +183,7 @@ ScsiPortWritePortUshort(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWritePortUlong(
     IN PULONG Port,
     IN ULONG Value)
@@ -188,7 +192,7 @@ ScsiPortWritePortUlong(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWriteRegisterBufferUchar(
     IN PUCHAR Register,
     IN PUCHAR Buffer,
@@ -198,7 +202,7 @@ ScsiPortWriteRegisterBufferUchar(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWriteRegisterBufferUshort(
     IN PUSHORT Register,
     IN PUSHORT Buffer,
@@ -208,7 +212,7 @@ ScsiPortWriteRegisterBufferUshort(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWriteRegisterBufferUlong(
     IN PULONG Register,
     IN PULONG Buffer,
@@ -218,7 +222,7 @@ ScsiPortWriteRegisterBufferUlong(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWriteRegisterUchar(
     IN PUCHAR  Register,
     IN ULONG  Value)
@@ -227,7 +231,7 @@ ScsiPortWriteRegisterUchar(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWriteRegisterUshort(
     IN PUSHORT Register,
     IN USHORT Value)
@@ -236,7 +240,7 @@ ScsiPortWriteRegisterUshort(
 }
 
 VOID
-NTAPI
+DDKAPI
 ScsiPortWriteRegisterUlong(
     IN PULONG Register,
     IN ULONG Value)
index 980965d..97282f8 100644 (file)
@@ -26,6 +26,7 @@
 
 #define DDKFASTAPI __fastcall
 #define FASTCALL __fastcall
+#define DDKCDECLAPI __cdecl
 
 ULONG DbgPrint(PCCH Format,...);
 
index 53900bf..7997a7c 100644 (file)
@@ -104,33 +104,33 @@ typedef struct _ARC_FILTER
 } ARC_FILTER,*PARC_FILTER;
 
 BOOLEAN
-NTAPI
+DDKAPI
 ArcCreateFilter(
   IN struct _NDIS_MINIPORT_BLOCK  *Miniport,
   IN UCHAR  AdapterAddress,
   OUT PARC_FILTER  *Filter);
 
 VOID
-NTAPI
+DDKAPI
 ArcDeleteFilter(
   IN PARC_FILTER Filter);
 
 BOOLEAN
-NTAPI
+DDKAPI
 ArcNoteFilterOpenAdapter(
   IN PARC_FILTER  Filter,
   IN NDIS_HANDLE  NdisBindingHandle,
   OUT PNDIS_HANDLE  NdisFilterHandle);
 
 NDIS_STATUS
-NTAPI
+DDKAPI
 ArcDeleteFilterOpenAdapter(
   IN PARC_FILTER  Filter,
   IN NDIS_HANDLE  NdisFilterHandle,
   IN PNDIS_REQUEST  NdisRequest);
 
 NDIS_STATUS
-NTAPI
+DDKAPI
 ArcFilterAdjust(
   IN PARC_FILTER  Filter,
   IN NDIS_HANDLE  NdisFilterHandle,
@@ -139,12 +139,12 @@ ArcFilterAdjust(
   IN BOOLEAN  Set);
 
 VOID
-NTAPI
+DDKAPI
 ArcFilterDprIndicateReceiveComplete(
   IN PARC_FILTER  Filter);
 
 VOID
-NTAPI
+DDKAPI
 ArcFilterDprIndicateReceive(
   IN PARC_FILTER  Filter,
   IN PUCHAR  pRawHeader,
@@ -152,7 +152,7 @@ ArcFilterDprIndicateReceive(
   IN UINT  Length);
 
 NDIS_STATUS
-NTAPI
+DDKAPI
 ArcFilterTransferData(
   IN PARC_FILTER  Filter,
   IN NDIS_HANDLE  MacReceiveContext,
@@ -162,18 +162,18 @@ ArcFilterTransferData(
   OUT PUINT  BytesTransfered);
 
 VOID
-NTAPI
+DDKAPI
 ArcFreeNdisPacket(
   IN PARC_PACKET  Packet);
 
 VOID
-NTAPI
+DDKAPI
 ArcFilterDoIndication(
   IN PARC_FILTER  Filter,
   IN PARC_PACKET  Packet);
 
 VOID
-NTAPI
+DDKAPI
 ArcDestroyPacket(
   IN PARC_FILTER  Filter,
   IN PARC_PACKET  Packet);
diff --git a/reactos/include/ddk/atsmedia.h b/reactos/include/ddk/atsmedia.h
new file mode 100644 (file)
index 0000000..744a465
--- /dev/null
@@ -0,0 +1,17 @@
+
+/* $Id: $
+ *
+ * COPYRIGHT:            This file is in the public domain.
+ * PROJECT:              ReactOS kernel
+ * FILE:
+ * PURPOSE:              headers
+ * PROGRAMMER:           Magnus Olsen (greatlrd)
+ *
+ */
+
+#if !defined(_ATSCMEDIA_)
+#define _ATSCMEDIA_
+#define BDANETWORKTYPE_ATSC DEFINE_GUIDNAMED(BDANETWORKTYPE_ATSC)
+#define STATIC_BDANETWORKTYPE_ATSC 0x71985F51, 0x1CA1, 0x11D3, 0x9C, 0xC8, 0x0, 0xC0, 0x4F, 0x79, 0x71, 0xE0
+DEFINE_GUIDSTRUCT("71985F51-1CA1-11D3-9CC8-00C04F7971E0", BDANETWORKTYPE_ATSC);
+#endif
index 373ccdb..0bdd590 100644 (file)
@@ -1,12 +1,8 @@
-#pragma once
-
-#if (NTDDI_VERSION >= NTDDI_WINXP)
-
 #if defined(__cplusplus)
 extern "C" {
 #endif
 
-/* Helper macro to enable gcc's extension. */
+/* Helper macro to enable gcc's extension.  */
 #ifndef __GNU_EXTENSION
 #ifdef __GNUC__
 #define __GNU_EXTENSION __extension__
@@ -16,190 +12,150 @@ extern "C" {
 #endif
 
 #define STDMETHODCALLTYPE __stdcall
-
-#ifndef _WDMDDK_
 typedef GUID *PGUID;
-#endif
 
 /* Types */
 
-typedef ULONG BDA_TOPOLOGY_JOINT, *PBDA_TOPOLOGY_JOINT;
-
-typedef struct _BDA_PIN_PAIRING {
-  ULONG ulInputPin;
-  ULONG ulOutputPin;
-  ULONG ulcMaxInputsPerOutput;
-  ULONG ulcMinInputsPerOutput;
-  ULONG ulcMaxOutputsPerInput;
-  ULONG ulcMinOutputsPerInput;
-  ULONG ulcTopologyJoints;
-  const ULONG *pTopologyJoints;
+typedef struct _BDA_PIN_PAIRING
+{
+    ULONG ulInputPin;
+    ULONG ulOutputPin;
+    ULONG ulcMaxInputsPerOutput;
+    ULONG ulcMinInputsPerOutput;
+    ULONG ulcMaxOutputsPerInput;
+    ULONG ulcMinOutputsPerInput;
+    ULONG ulcTopologyJoints;
+    const ULONG *pTopologyJoints;
 } BDA_PIN_PAIRING, *PBDA_PIN_PAIRING;
 
-typedef struct _BDA_FILTER_TEMPLATE {
-  const KSFILTER_DESCRIPTOR *pFilterDescriptor;
-  ULONG ulcPinPairs;
-  const BDA_PIN_PAIRING *pPinPairs;
+typedef struct _BDA_FILTER_TEMPLATE
+{
+    const KSFILTER_DESCRIPTOR *pFilterDescriptor;
+    ULONG ulcPinPairs;
+    const BDA_PIN_PAIRING *pPinPairs;
 } BDA_FILTER_TEMPLATE, *PBDA_FILTER_TEMPLATE;
 
-typedef struct _KSM_PIN_PAIR {
-  KSMETHOD Method;
-  ULONG InputPinId;
-  ULONG OutputPinId;
-  ULONG Reserved;
-} KSM_PIN_PAIR, * PKSM_PIN_PAIR;
-
-typedef struct _KSM_PIN {
-  KSMETHOD Method;
-  __GNU_EXTENSION union {
-    ULONG PinId;
-    ULONG PinType;
-  };
-  ULONG Reserved;
+
+typedef struct _KSM_PIN
+{
+    KSMETHOD    Method;
+    __GNU_EXTENSION union
+    {
+        ULONG       PinId;
+        ULONG       PinType;
+    };
+    ULONG       Reserved;
 } KSM_PIN, * PKSM_PIN;
 
 /* Functions */
 
-STDMETHODIMP_(NTSTATUS)
-BdaCheckChanges(
-  IN PIRP Irp);
-
-STDMETHODIMP_(NTSTATUS)
-BdaCommitChanges(
-  IN PIRP Irp);
-
-STDMETHODIMP_(NTSTATUS)
-BdaCreateFilterFactory(
-  IN PKSDEVICE pKSDevice,
-  IN const KSFILTER_DESCRIPTOR *pFilterDescriptor,
-  IN const BDA_FILTER_TEMPLATE *pBdaFilterTemplate);
-
-STDMETHODIMP_(NTSTATUS)
-BdaCreateFilterFactoryEx(
-  IN PKSDEVICE pKSDevice,
-  IN const KSFILTER_DESCRIPTOR *pFilterDescriptor,
-  IN const BDA_FILTER_TEMPLATE *pBdaFilterTemplate,
-  OUT PKSFILTERFACTORY  *ppKSFilterFactory);
-
-STDMETHODIMP_(NTSTATUS)
-BdaCreatePin(
-  IN PKSFILTER pKSFilter,
-  IN ULONG ulPinType,
-  OUT ULONG *pulPinId);
-
-STDMETHODIMP_(NTSTATUS)
-BdaCreateTopology(
-  IN PKSFILTER pKSFilter,
-  IN ULONG InputPinId,
-  IN ULONG OutputPinId);
-
-STDMETHODIMP_(NTSTATUS)
-BdaDeletePin(
-  IN PKSFILTER pKSFilter,
-  IN ULONG *pulPinId);
-
-STDMETHODIMP_(NTSTATUS)
-BdaFilterFactoryUpdateCacheData(
-  IN PKSFILTERFACTORY pFilterFactory,
-  IN const KSFILTER_DESCRIPTOR *pFilterDescriptor OPTIONAL);
-
-STDMETHODIMP_(NTSTATUS)
-BdaGetChangeState(
-  IN PIRP Irp,
-  OUT BDA_CHANGE_STATE *pChangeState);
-
-STDMETHODIMP_(NTSTATUS)
-BdaInitFilter(
-  IN PKSFILTER pKSFilter,
-  IN const BDA_FILTER_TEMPLATE *pBdaFilterTemplate);
-
-STDMETHODIMP_(NTSTATUS)
-BdaMethodCreatePin(
-  IN PIRP Irp,
-  IN KSMETHOD *pKSMethod,
-  OUT ULONG *pulPinFactoryID);
-
-STDMETHODIMP_(NTSTATUS)
-BdaMethodCreateTopology(
-  IN PIRP Irp,
-  IN KSMETHOD *pKSMethod,
-  OPTIONAL PVOID pvIgnored);
-
-STDMETHODIMP_(NTSTATUS)
-BdaMethodDeletePin(
-  IN PIRP Irp,
-  IN KSMETHOD *pKSMethod,
-  OPTIONAL PVOID pvIgnored);
-
-STDMETHODIMP_(NTSTATUS)
-BdaPropertyGetControllingPinId(
-  IN PIRP Irp,
-  IN KSP_BDA_NODE_PIN *pProperty,
-  OUT ULONG *pulControllingPinId);
-
-STDMETHODIMP_(NTSTATUS)
-BdaPropertyGetPinControl(
-  IN PIRP Irp,
-  IN KSPROPERTY *pKSProperty,
-  OUT ULONG *pulProperty);
-
-STDMETHODIMP_(NTSTATUS)
-BdaPropertyNodeDescriptors(
-  IN PIRP Irp,
-  IN KSPROPERTY *pKSProperty,
-  OUT BDANODE_DESCRIPTOR *pNodeDescriptorProperty);
-
-STDMETHODIMP_(NTSTATUS)
-BdaPropertyNodeEvents(
-  IN PIRP Irp,
-  IN KSP_NODE *pKSProperty,
-  OUT GUID *pguidProperty);
-
-STDMETHODIMP_(NTSTATUS)
-BdaPropertyNodeMethods(
-  IN PIRP Irp,
-  IN KSP_NODE *pKSProperty,
-  OUT GUID *pguidProperty);
-
-STDMETHODIMP_(NTSTATUS)
-BdaPropertyNodeProperties(
-  IN PIRP Irp,
-  IN KSP_NODE *pKSProperty,
-  OUT GUID *pguidProperty);
-
-STDMETHODIMP_(NTSTATUS)
-BdaPropertyNodeTypes(
-  IN PIRP Irp,
-  IN KSPROPERTY *pKSProperty,
-  OUT ULONG *pulProperty);
-
-STDMETHODIMP_(NTSTATUS)
-BdaPropertyPinTypes(
-  IN PIRP Irp,
-  IN KSPROPERTY *pKSProperty,
-  OUT ULONG *pulProperty);
-
-STDMETHODIMP_(NTSTATUS)
-BdaPropertyTemplateConnections(
-  IN PIRP Irp,
-  IN KSPROPERTY *pKSProperty,
-  OUT KSTOPOLOGY_CONNECTION *pConnectionProperty);
-
-STDMETHODIMP_(NTSTATUS)
-BdaStartChanges(
-  IN PIRP Irp);
-
-STDMETHODIMP_(NTSTATUS)
-BdaUninitFilter(
-  IN PKSFILTER pKSFilter);
-
-STDMETHODIMP_(NTSTATUS)
-BdaValidateNodeProperty(
-  IN PIRP Irp,
-  IN KSPROPERTY *pKSProperty);
+STDMETHODIMP_(NTSTATUS) BdaCheckChanges(IN PIRP  Irp);
+STDMETHODIMP_(NTSTATUS) BdaCommitChanges(IN PIRP  Irp);
+
+STDMETHODIMP_(NTSTATUS) BdaCreateFilterFactory(
+    IN PKSDEVICE  pKSDevice,
+    IN const KSFILTER_DESCRIPTOR *pFilterDescriptor,
+    IN const BDA_FILTER_TEMPLATE *pBdaFilterTemplate);
+
+STDMETHODIMP_(NTSTATUS) BdaCreateFilterFactoryEx(
+    IN  PKSDEVICE pKSDevice,
+    IN  const KSFILTER_DESCRIPTOR *pFilterDescriptor,
+    IN  const BDA_FILTER_TEMPLATE *pBdaFilterTemplate,
+    OUT PKSFILTERFACTORY  *ppKSFilterFactory);
+
+STDMETHODIMP_(NTSTATUS) BdaCreatePin(
+    IN PKSFILTER pKSFilter,
+    IN ULONG ulPinType,
+    OUT ULONG *pulPinId);
+
+STDMETHODIMP_(NTSTATUS) BdaCreateTopology(
+    IN PKSFILTER pKSFilter,
+    IN ULONG InputPinId,
+    IN ULONG OutputPinId);
+
+STDMETHODIMP_(NTSTATUS) BdaDeletePin(
+    IN PKSFILTER pKSFilter,
+    IN ULONG *pulPinId);
+
+STDMETHODIMP_(NTSTATUS) BdaFilterFactoryUpdateCacheData(
+    IN PKSFILTERFACTORY pFilterFactory,
+    IN const KSFILTER_DESCRIPTOR *pFilterDescriptor OPTIONAL);
+
+STDMETHODIMP_(NTSTATUS) BdaGetChangeState(
+    IN PIRP Irp,
+    OUT BDA_CHANGE_STATE *pChangeState);
+
+STDMETHODIMP_(NTSTATUS) BdaInitFilter(
+    IN PKSFILTER pKSFilter,
+    IN const BDA_FILTER_TEMPLATE *pBdaFilterTemplate);
+
+STDMETHODIMP_(NTSTATUS) BdaMethodCreatePin(
+    IN PIRP Irp,
+    IN KSMETHOD *pKSMethod,
+    OUT ULONG *pulPinFactoryID);
+
+STDMETHODIMP_(NTSTATUS) BdaMethodCreateTopology(
+    IN PIRP Irp,
+    IN KSMETHOD *pKSMethod,
+    OPTIONAL PVOID pvIgnored);
+
+STDMETHODIMP_(NTSTATUS) BdaMethodDeletePin(
+    IN PIRP Irp,
+    IN KSMETHOD *pKSMethod,
+    OPTIONAL PVOID pvIgnored);
+
+STDMETHODIMP_(NTSTATUS) BdaPropertyGetControllingPinId(
+    IN PIRP Irp,
+    IN KSP_BDA_NODE_PIN *pProperty,
+    OUT ULONG *pulControllingPinId);
+
+STDMETHODIMP_(NTSTATUS) BdaPropertyGetPinControl(
+    IN PIRP Irp,
+    IN KSPROPERTY *pKSProperty,
+    OUT ULONG *pulProperty);
+
+STDMETHODIMP_(NTSTATUS) BdaPropertyNodeDescriptors(
+    IN PIRP Irp,
+    IN KSPROPERTY *pKSProperty,
+    OUT BDANODE_DESCRIPTOR *pNodeDescriptorProperty);
+
+STDMETHODIMP_(NTSTATUS) BdaPropertyNodeEvents(
+    IN PIRP Irp,
+    IN KSP_NODE *pKSProperty,
+    OUT GUID *pguidProperty);
+
+STDMETHODIMP_(NTSTATUS) BdaPropertyNodeMethods(
+    IN PIRP Irp,
+    IN KSP_NODE *pKSProperty,
+    OUT GUID *pguidProperty);
+
+STDMETHODIMP_(NTSTATUS) BdaPropertyNodeProperties(
+    IN PIRP Irp,
+    IN KSP_NODE *pKSProperty,
+    OUT GUID *pguidProperty);
+
+STDMETHODIMP_(NTSTATUS) BdaPropertyNodeTypes(
+    IN PIRP Irp,
+    IN KSPROPERTY *pKSProperty,
+    OUT ULONG *pulProperty);
+
+STDMETHODIMP_(NTSTATUS) BdaPropertyPinTypes(
+    IN PIRP Irp,
+    IN KSPROPERTY *pKSProperty,
+    OUT ULONG *pulProperty);
+
+STDMETHODIMP_(NTSTATUS) BdaPropertyTemplateConnections(
+    IN PIRP Irp,
+    IN KSPROPERTY *pKSProperty,
+    OUT KSTOPOLOGY_CONNECTION *pConnectionProperty);
+
+STDMETHODIMP_(NTSTATUS) BdaStartChanges(IN PIRP Irp);
+STDMETHODIMP_(NTSTATUS) BdaUninitFilter(IN PKSFILTER pKSFilter);
+
+STDMETHODIMP_(NTSTATUS) BdaValidateNodeProperty(
+    IN PIRP Irp,
+    IN KSPROPERTY *pKSProperty);
 
 #if defined(__cplusplus)
 }
 #endif
-
-#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
similarity index 65%
rename from reactos/include/psdk/cfg.h
rename to reactos/include/ddk/cfg.h
index 3653dec..d9a4802 100644 (file)
@@ -20,8 +20,7 @@
  *
  */
 
-#pragma once
-
+#ifndef _CFG_INCLUDED_
 #define _CFG_INCLUDED_
 
 #ifdef __cplusplus
@@ -78,26 +77,7 @@ extern "C" {
 #define CM_PROB_DRIVER_BLOCKED              0x00000030
 #define CM_PROB_REGISTRY_TOO_LARGE          0x00000031
 #define CM_PROB_SETPROPERTIES_FAILED        0x00000032
-#define CM_PROB_WAITING_ON_DEPENDENCY       0x00000033
-#define CM_PROB_UNSIGNED_DRIVER             0x00000034
-
-#define NUM_CM_PROB_V1                      0x00000025
-#define NUM_CM_PROB_V2                      0x00000032
-#define NUM_CM_PROB_V3                      0x00000033
-#define NUM_CM_PROB_V4                      0x00000034
-#define NUM_CM_PROB_V5                      0x00000035
-
-#if (NTDDI_VERSION >= NTDDI_WIN7)
-#define NUM_CM_PROB NUM_CM_PROB_V5
-#elif (NTDDI_VERSION >= NTDDI_WS08)
-#define NUM_CM_PROB NUM_CM_PROB_V4
-#elif (NTDDI_VERSION >= NTDDI_WS03)
-#define NUM_CM_PROB NUM_CM_PROB_V3
-#elif (NTDDI_VERSION >= NTDDI_WINXP)
-#define NUM_CM_PROB NUM_CM_PROB_V2
-#elif (NTDDI_VERSION >= WIN2K)
-#define NUM_CM_PROB NUM_CM_PROB_V1
-#endif
+#define NUM_CM_PROB                         0x00000033
 
 #define LCPRI_FORCECONFIG                 0x00000000
 #define LCPRI_BOOTCONFIG                  0x00000001
@@ -115,24 +95,24 @@ extern "C" {
 #define LCPRI_DISABLED                    0x0000FFFF
 #define MAX_LCPRI                         0x0000FFFF
 
-#define DN_ROOT_ENUMERATED  0x00000001 /* Was enumerated by ROOT */
-#define DN_DRIVER_LOADED    0x00000002 /* Has Register_Device_Driver */
-#define DN_ENUM_LOADED      0x00000004 /* Has Register_Enumerator */
-#define DN_STARTED          0x00000008 /* Is currently configured */
-#define DN_MANUAL           0x00000010 /* Manually installed */
-#define DN_NEED_TO_ENUM     0x00000020 /* May need reenumeration */
-#define DN_NOT_FIRST_TIME   0x00000040 /* Has received a config (Win9x only) */
-#define DN_HARDWARE_ENUM    0x00000080 /* Enum generates hardware ID */
-#define DN_LIAR             0x00000100 /* Lied about can reconfig once (Win9x only) */
-#define DN_HAS_MARK         0x00000200 /* Not CM_Create_DevNode lately (Win9x only) */
-#define DN_HAS_PROBLEM      0x00000400 /* Need device installer */
-#define DN_FILTERED         0x00000800 /* Is filtered */
-#define DN_MOVED            0x00001000 /* Has been moved (Win9x only) */
-#define DN_DISABLEABLE      0x00002000 /* Can be rebalanced */
-#define DN_REMOVABLE        0x00004000 /* Can be removed */
-#define DN_PRIVATE_PROBLEM  0x00008000 /* Has a private problem */
-#define DN_MF_PARENT        0x00010000 /* Multi function parent */
-#define DN_MF_CHILD         0x00020000 /* Multi function child */
+#define DN_ROOT_ENUMERATED  0x00000001 /* Was enumerated by ROOT */
+#define DN_DRIVER_LOADED    0x00000002 /* Has Register_Device_Driver */
+#define DN_ENUM_LOADED      0x00000004 /* Has Register_Enumerator */
+#define DN_STARTED          0x00000008 /* Is currently configured */
+#define DN_MANUAL           0x00000010 /* Manually installed */
+#define DN_NEED_TO_ENUM     0x00000020 /* May need reenumeration */
+#define DN_NOT_FIRST_TIME   0x00000040 /* Has received a config (Win9x only) */
+#define DN_HARDWARE_ENUM    0x00000080 /* Enum generates hardware ID */
+#define DN_LIAR             0x00000100 /* Lied about can reconfig once (Win9x only) */
+#define DN_HAS_MARK         0x00000200 /* Not CM_Create_DevNode lately (Win9x only) */
+#define DN_HAS_PROBLEM      0x00000400 /* Need device installer */
+#define DN_FILTERED         0x00000800 /* Is filtered */
+#define DN_MOVED            0x00001000 /* Has been moved (Win9x only) */
+#define DN_DISABLEABLE      0x00002000 /* Can be rebalanced */
+#define DN_REMOVABLE        0x00004000 /* Can be removed */
+#define DN_PRIVATE_PROBLEM  0x00008000 /* Has a private problem */
+#define DN_MF_PARENT        0x00010000 /* Multi function parent */
+#define DN_MF_CHILD         0x00020000 /* Multi function child */
 #define DN_WILL_BE_REMOVED  0x00040000
 #define DN_NOT_FIRST_TIMEE  0x00080000
 #define DN_STOP_FREE_RES    0x00100000
@@ -148,33 +128,11 @@ extern "C" {
 #define DN_NO_SHOW_IN_DM    0x40000000
 #define DN_BOOT_LOG_PROB    0x80000000
 
-#if (NTDDI_VERSION >= NTDDI_WINXP)
-
-#define DN_NEED_RESTART DN_LIAR
-#define DN_DRIVER_BLOCKED DN_NOT_FIRST_TIME
-#define DN_LEGACY_DRIVER DN_MOVED
+#define DN_NEED_RESTART          DN_LIAR
+#define DN_DRIVER_BLOCKED        DN_NOT_FIRST_TIME
+#define DN_LEGACY_DRIVER         DN_MOVED
 #define DN_CHILD_WITH_INVALID_ID DN_HAS_MARK
 
-#elif (NTDDI_VERSION >= NTDDI_WIN2K)
-
-#define DN_NEED_RESTART 0x00000100
-
-#endif
-
-#define DN_CHANGEABLE_FLAGS (DN_NOT_FIRST_TIME + \
-                             DN_HARDWARE_ENUM + \
-                             DN_HAS_MARK + \
-                             DN_DISABLEABLE + \
-                             DN_REMOVABLE + \
-                             DN_MF_CHILD + \
-                             DN_MF_PARENT + \
-                             DN_NOT_FIRST_TIMEE + \
-                             DN_STOP_FREE_RES + \
-                             DN_REBAL_CANDIDATE + \
-                             DN_NT_ENUMERATOR + \
-                             DN_NT_DRIVER + \
-                             DN_SILENT_INSTALL + \
-                             DN_NO_SHOW_IN_DM)
 
 typedef enum _PNP_VETO_TYPE {
   PNP_VetoTypeUnknown,
@@ -191,7 +149,14 @@ typedef enum _PNP_VETO_TYPE {
   PNP_VetoLegacyDriver
 } PNP_VETO_TYPE, *PPNP_VETO_TYPE;
 
+#define CM_GLOBAL_STATE_CAN_DO_UI           0x00000001
+#define CM_GLOBAL_STATE_ON_BIG_STACK        0x00000002
+#define CM_GLOBAL_STATE_SERVICES_AVAILABLE  0x00000004
+#define CM_GLOBAL_STATE_SHUTTING_DOWN       0x00000008
+#define CM_GLOBAL_STATE_DETECTION_PENDING   0x00000010
+
 #ifdef __cplusplus
 }
 #endif
 
+#endif /* _CFG_INCLUDED_ */
diff --git a/reactos/include/ddk/cfgmgr32.h b/reactos/include/ddk/cfgmgr32.h
new file mode 100644 (file)
index 0000000..5ca47bd
--- /dev/null
@@ -0,0 +1,2244 @@
+/*
+ * cfgmgr32.h
+ *
+ * PnP configuration manager
+ *
+ * This file is part of the w32api package.
+ *
+ * Contributors:
+ *   Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
+ *
+ * THIS SOFTWARE IS NOT COPYRIGHTED
+ *
+ * This source code is offered for use in the public domain. You may
+ * use, modify or distribute it freely.
+ *
+ * This code is distributed in the hope that it will be useful but
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
+ * DISCLAIMED. This includes but is not limited to warranties of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ */
+
+#ifndef _CFGMGR32_H_
+#define _CFGMGR32_H_
+
+#include "cfg.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(_CFGMGR32_)
+#define CMAPI
+#else
+#define CMAPI DECLSPEC_IMPORT
+#endif
+
+#include <pshpack1.h>
+
+#define CR_SUCCESS                        0x00000000
+#define CR_DEFAULT                        0x00000001
+#define CR_OUT_OF_MEMORY                  0x00000002
+#define CR_INVALID_POINTER                0x00000003
+#define CR_INVALID_FLAG                   0x00000004
+#define CR_INVALID_DEVNODE                0x00000005
+#define CR_INVALID_DEVINST                CR_INVALID_DEVNODE
+#define CR_INVALID_RES_DES                0x00000006
+#define CR_INVALID_LOG_CONF               0x00000007
+#define CR_INVALID_ARBITRATOR             0x00000008
+#define CR_INVALID_NODELIST               0x00000009
+#define CR_DEVNODE_HAS_REQS               0x0000000A
+#define CR_DEVINST_HAS_REQS               CR_DEVNODE_HAS_REQS
+#define CR_INVALID_RESOURCEID             0x0000000B
+#define CR_DLVXD_NOT_FOUND                0x0000000C
+#define CR_NO_SUCH_DEVNODE                0x0000000D
+#define CR_NO_SUCH_DEVINST                CR_NO_SUCH_DEVNODE
+#define CR_NO_MORE_LOG_CONF               0x0000000E
+#define CR_NO_MORE_RES_DES                0x0000000F
+#define CR_ALREADY_SUCH_DEVNODE           0x00000010
+#define CR_ALREADY_SUCH_DEVINST           CR_ALREADY_SUCH_DEVNODE
+#define CR_INVALID_RANGE_LIST             0x00000011
+#define CR_INVALID_RANGE                  0x00000012
+#define CR_FAILURE                        0x00000013
+#define CR_NO_SUCH_LOGICAL_DEV            0x00000014
+#define CR_CREATE_BLOCKED                 0x00000015
+#define CR_NOT_SYSTEM_VM                  0x00000016
+#define CR_REMOVE_VETOED                  0x00000017
+#define CR_APM_VETOED                     0x00000018
+#define CR_INVALID_LOAD_TYPE              0x00000019
+#define CR_BUFFER_SMALL                   0x0000001A
+#define CR_NO_ARBITRATOR                  0x0000001B
+#define CR_NO_REGISTRY_HANDLE             0x0000001C
+#define CR_REGISTRY_ERROR                 0x0000001D
+#define CR_INVALID_DEVICE_ID              0x0000001E
+#define CR_INVALID_DATA                   0x0000001F
+#define CR_INVALID_API                    0x00000020
+#define CR_DEVLOADER_NOT_READY            0x00000021
+#define CR_NEED_RESTART                   0x00000022
+#define CR_NO_MORE_HW_PROFILES            0x00000023
+#define CR_DEVICE_NOT_THERE               0x00000024
+#define CR_NO_SUCH_VALUE                  0x00000025
+#define CR_WRONG_TYPE                     0x00000026
+#define CR_INVALID_PRIORITY               0x00000027
+#define CR_NOT_DISABLEABLE                0x00000028
+#define CR_FREE_RESOURCES                 0x00000029
+#define CR_QUERY_VETOED                   0x0000002A
+#define CR_CANT_SHARE_IRQ                 0x0000002B
+#define CR_NO_DEPENDENT                   0x0000002C
+#define CR_SAME_RESOURCES                 0x0000002D
+#define CR_NO_SUCH_REGISTRY_KEY           0x0000002E
+#define CR_INVALID_MACHINENAME            0x0000002F
+#define CR_REMOTE_COMM_FAILURE            0x00000030
+#define CR_MACHINE_UNAVAILABLE            0x00000031
+#define CR_NO_CM_SERVICES                 0x00000032
+#define CR_ACCESS_DENIED                  0x00000033
+#define CR_CALL_NOT_IMPLEMENTED           0x00000034
+#define CR_INVALID_PROPERTY               0x00000035
+#define CR_DEVICE_INTERFACE_ACTIVE        0x00000036
+#define CR_NO_SUCH_DEVICE_INTERFACE       0x00000037
+#define CR_INVALID_REFERENCE_STRING       0x00000038
+#define CR_INVALID_CONFLICT_LIST          0x00000039
+#define CR_INVALID_INDEX                  0x0000003A
+#define CR_INVALID_STRUCTURE_SIZE         0x0000003B
+
+#define RegDisposition_OpenAlways         0x00000000
+#define RegDisposition_OpenExisting       0x00000001
+#define RegDisposition_Bits               0x00000001
+
+
+typedef DWORD RETURN_TYPE;
+typedef RETURN_TYPE CONFIGRET;
+
+typedef HANDLE HMACHINE;
+typedef HMACHINE *PHMACHINE;
+
+typedef DWORD_PTR RES_DES;
+typedef RES_DES *PRES_DES;
+
+typedef DWORD_PTR RANGE_ELEMENT;
+typedef RANGE_ELEMENT *PRANGE_ELEMENT;
+
+typedef ULONG_PTR CONFLICT_LIST;
+typedef CONFLICT_LIST *PCONFLICT_LIST;
+
+typedef DWORD_PTR LOG_CONF;
+typedef LOG_CONF *PLOG_CONF;
+
+typedef ULONG PRIORITY;
+typedef PRIORITY *PPRIORITY;
+
+typedef DWORD_PTR RANGE_LIST;
+typedef RANGE_LIST *PRANGE_LIST;
+
+typedef DWORD DEVNODE, DEVINST;
+typedef DEVNODE *PDEVNODE, *PDEVINST;
+
+typedef CHAR *DEVNODEID_A, *DEVINSTID_A;
+typedef WCHAR *DEVNODEID_W, *DEVINSTID_W;
+
+#ifdef UNICODE
+typedef DEVNODEID_W DEVNODEID;
+typedef DEVINSTID_W DEVINSTID;
+#else
+typedef DEVNODEID_A DEVNODEID;
+typedef DEVINSTID_A DEVINSTID;
+#endif
+
+typedef ULONG REGDISPOSITION;
+
+typedef ULONG RESOURCEID;
+typedef RESOURCEID *PRESOURCEID;
+
+#define CM_RESDES_WIDTH_DEFAULT  0x00000000
+#define CM_RESDES_WIDTH_32       0x00000001
+#define CM_RESDES_WIDTH_64       0x00000002
+#define CM_RESDES_WIDTH_BITS     0x00000003
+
+
+#define MAX_CONFIG_VALUE         9999
+#define MAX_INSTANCE_VALUE       9999
+
+#define MAX_DEVICE_ID_LEN        200
+#define MAX_DEVNODE_ID_LEN       MAX_DEVICE_ID_LEN
+
+#define MAX_CLASS_NAME_LEN       32
+#define MAX_GUID_STRING_LEN      39
+#define MAX_PROFILE_LEN          80
+
+
+#define ResType_All                       0x00000000
+#define ResType_None                      0x00000000
+#define ResType_Mem                       0x00000001
+#define ResType_IO                        0x00000002
+#define ResType_DMA                       0x00000003
+#define ResType_IRQ                       0x00000004
+#define ResType_DoNotUse                  0x00000005
+#define ResType_BusNumber                 0x00000006
+#define ResType_MAX                       0x00000006
+#define ResType_Ignored_Bit               0x00008000
+#define ResType_ClassSpecific             0x0000FFFF
+#define ResType_Reserved                  0x00008000
+#define ResType_DevicePrivate             0x00008001
+#define ResType_PcCardConfig              0x00008002
+#define ResType_MfCardConfig              0x00008003
+
+#define CM_GETIDLIST_FILTER_NONE              0x00000000
+#define CM_GETIDLIST_FILTER_ENUMERATOR        0x00000001
+#define CM_GETIDLIST_FILTER_SERVICE           0x00000002
+#define CM_GETIDLIST_FILTER_EJECTRELATIONS    0x00000004
+#define CM_GETIDLIST_FILTER_REMOVALRELATIONS  0x00000008
+#define CM_GETIDLIST_FILTER_POWERRELATIONS    0x00000010
+#define CM_GETIDLIST_FILTER_BUSRELATIONS      0x00000020
+#define CM_GETIDLIST_DONOTGENERATE            0x10000040
+#define CM_GETIDLIST_FILTER_BITS              0x1000007F
+
+#define CM_GET_DEVICE_INTERFACE_LIST_PRESENT      0x00000000
+#define CM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES  0x00000001
+#define CM_GET_DEVICE_INTERFACE_LIST_BITS         0x00000001
+
+#define CM_DRP_DEVICEDESC                  0x00000001
+#define CM_DRP_HARDWAREID                  0x00000002
+#define CM_DRP_COMPATIBLEIDS               0x00000003
+#define CM_DRP_UNUSED0                     0x00000004
+#define CM_DRP_SERVICE                     0x00000005
+#define CM_DRP_UNUSED1                     0x00000006
+#define CM_DRP_UNUSED2                     0x00000007
+#define CM_DRP_CLASS                       0x00000008
+#define CM_DRP_CLASSGUID                   0x00000009
+#define CM_DRP_DRIVER                      0x0000000A
+#define CM_DRP_CONFIGFLAGS                 0x0000000B
+#define CM_DRP_MFG                         0x0000000C
+#define CM_DRP_FRIENDLYNAME                0x0000000D
+#define CM_DRP_LOCATION_INFORMATION        0x0000000E
+#define CM_DRP_PHYSICAL_DEVICE_OBJECT_NAME 0x0000000F
+#define CM_DRP_CAPABILITIES                0x00000010
+#define CM_DRP_UI_NUMBER                   0x00000011
+#define CM_DRP_UPPERFILTERS                0x00000012
+#define CM_DRP_LOWERFILTERS                0x00000013
+#define CM_DRP_BUSTYPEGUID                 0x00000014
+#define CM_DRP_LEGACYBUSTYPE               0x00000015
+#define CM_DRP_BUSNUMBER                   0x00000016
+#define CM_DRP_ENUMERATOR_NAME             0x00000017
+
+#define CM_DRP_MIN                         0x00000001
+#define CM_DRP_MAX                         0x00000017
+
+#define CM_REGISTRY_HARDWARE               0x00000000
+#define CM_REGISTRY_SOFTWARE               0x00000001
+#define CM_REGISTRY_USER                   0x00000100
+#define CM_REGISTRY_CONFIG                 0x00000200
+#define CM_REGISTRY_BITS                   0x00000301
+
+#define CM_DEVCAP_LOCKSUPPORTED            0x00000001
+#define CM_DEVCAP_EJECTSUPPORTED           0x00000002
+#define CM_DEVCAP_REMOVABLE                0x00000004
+#define CM_DEVCAP_DOCKDEVICE               0x00000008
+#define CM_DEVCAP_UNIQUEID                 0x00000010
+#define CM_DEVCAP_SILENTINSTALL            0x00000020
+#define CM_DEVCAP_RAWDEVICEOK              0x00000040
+#define CM_DEVCAP_SURPRISEREMOVALOK        0x00000080
+#define CM_DEVCAP_HARDWAREDISABLED         0x00000100
+#define CM_DEVCAP_NONDYNAMIC               0x00000200
+
+typedef struct BusNumber_Des_s {
+  DWORD  BUSD_Count;
+  DWORD  BUSD_Type;
+  DWORD  BUSD_Flags;
+  ULONG  BUSD_Alloc_Base;
+  ULONG  BUSD_Alloc_End;
+} BUSNUMBER_DES, *PBUSNUMBER_DES;
+
+typedef struct BusNumber_Range_s {
+  ULONG  BUSR_Min;
+  ULONG  BUSR_Max;
+  ULONG  BUSR_nBusNumbers;
+  ULONG  BUSR_Flags;
+} BUSNUMBER_RANGE, *PBUSNUMBER_RANGE;
+
+#define BusNumberType_Range sizeof(BUSNUMBER_RANGE)
+
+typedef struct BusNumber_Resource_s {
+  BUSNUMBER_DES  BusNumber_Header;
+  BUSNUMBER_RANGE  BusNumber_Data[ANYSIZE_ARRAY];
+} BUSNUMBER_RESOURCE, *PBUSNUMBER_RESOURCE;
+
+typedef struct CS_Des_s {
+  DWORD  CSD_SignatureLength;
+  DWORD  CSD_LegacyDataOffset;
+  DWORD  CSD_LegacyDataSize;
+  DWORD  CSD_Flags;
+  GUID  CSD_ClassGuid;
+  BYTE  CSD_Signature[ANYSIZE_ARRAY];
+} CS_DES, *PCS_DES;
+
+typedef struct CS_Resource_s {
+  CS_DES  CS_Header;
+} CS_RESOURCE, *PCS_RESOURCE;
+
+typedef struct DevPrivate_Des_s {
+  DWORD  PD_Count;
+  DWORD  PD_Type;
+  DWORD  PD_Data1;
+  DWORD  PD_Data2;
+  DWORD  PD_Data3;
+  DWORD  PD_Flags;
+} DEVPRIVATE_DES, *PDEVPRIVATE_DES;
+
+typedef struct DevPrivate_Range_s {
+  DWORD  PR_Data1;
+  DWORD  PR_Data2;
+  DWORD  PR_Data3;
+} DEVPRIVATE_RANGE, *PDEVPRIVATE_RANGE;
+
+#define PType_Range sizeof(DEVPRIVATE_RANGE)
+
+typedef struct DevPrivate_Resource_s {
+  DEVPRIVATE_DES  PRV_Header;
+  DEVPRIVATE_RANGE  PRV_Data[ANYSIZE_ARRAY];
+} DEVPRIVATE_RESOURCE, *PDEVPRIVATE_RESOURCE;
+
+/* DMA_DES.DD_Flags constants and masks */
+#define mDD_Width                         0x3
+#define fDD_BYTE                          0x0
+#define fDD_WORD                          0x1
+#define fDD_DWORD                         0x2
+#define fDD_BYTE_AND_WORD                 0x3
+
+#define mDD_BusMaster                     0x4
+#define fDD_NoBusMaster                   0x0
+#define fDD_BusMaster                     0x4
+
+#define mDD_Type                          0x18
+#define fDD_TypeStandard                  0x00
+#define fDD_TypeA                         0x08
+#define fDD_TypeB                         0x10
+#define fDD_TypeF                         0x18
+
+typedef struct DMA_Des_s {
+  DWORD  DD_Count;
+  DWORD  DD_Type;
+  DWORD  DD_Flags;
+  ULONG  DD_Alloc_Chan;
+} DMA_DES, *PDMA_DES;
+
+typedef struct DMA_Range_s {
+  ULONG  DR_Min;
+  ULONG  DR_Max;
+  ULONG  DR_Flags;
+} DMA_RANGE, *PDMA_RANGE;
+
+#define DType_Range sizeof(DMA_RANGE)
+
+typedef struct DMA_Resource_s {
+  DMA_DES  DMA_Header;
+  DMA_RANGE  DMA_Data[ANYSIZE_ARRAY];
+} DMA_RESOURCE, *PDMA_RESOURCE;
+
+/* IO_DES.Type constants and masks */
+#define fIOD_PortType                     0x1
+#define fIOD_Memory                       0x0
+#define fIOD_IO                           0x1
+#define fIOD_DECODE                       0x00fc
+#define fIOD_10_BIT_DECODE                0x0004
+#define fIOD_12_BIT_DECODE                0x0008
+#define fIOD_16_BIT_DECODE                0x0010
+#define fIOD_POSITIVE_DECODE              0x0020
+#define fIOD_PASSIVE_DECODE               0x0040
+#define fIOD_WINDOW_DECODE                0x0080
+
+typedef struct IO_Des_s {
+  DWORD  IOD_Count;
+  DWORD  IOD_Type;
+  DWORDLONG  IOD_Alloc_Base;
+  DWORDLONG  IOD_Alloc_End;
+  DWORD  IOD_DesFlags;
+} IO_DES, *PIO_DES;
+
+/* IO_RANGE.IOR_Alias constants */
+#define IO_ALIAS_10_BIT_DECODE            0x00000004
+#define IO_ALIAS_12_BIT_DECODE            0x00000010
+#define IO_ALIAS_16_BIT_DECODE            0x00000000
+#define IO_ALIAS_POSITIVE_DECODE          0x000000FF
+
+typedef struct IO_Range_s {
+  DWORDLONG  IOR_Align;
+  DWORD  IOR_nPorts;
+  DWORDLONG  IOR_Min;
+  DWORDLONG  IOR_Max;
+  DWORD  IOR_RangeFlags;
+  DWORDLONG  IOR_Alias;
+} IO_RANGE, *PIO_RANGE;
+
+#define IOType_Range sizeof(IO_RANGE)
+
+typedef struct IO_Resource_s {
+  IO_DES  IO_Header;
+  IO_RANGE  IO_Data[ANYSIZE_ARRAY];
+} IO_RESOURCE, *PIO_RESOURCE;
+
+/* IRQ_DES.IRQD_flags constants */
+#define mIRQD_Share                       0x1
+#define fIRQD_Exclusive                   0x0
+#define fIRQD_Share                       0x1
+
+#define fIRQD_Share_Bit                   0
+#define fIRQD_Level_Bit                   1
+
+#define mIRQD_Edge_Level                  0x2
+#define fIRQD_Level                       0x0
+#define fIRQD_Edge                        0x2
+
+typedef struct IRQ_Des_32_s {
+  DWORD  IRQD_Count;
+  DWORD  IRQD_Type;
+  DWORD  IRQD_Flags;
+  ULONG  IRQD_Alloc_Num;
+  ULONG32  IRQD_Affinity;
+} IRQ_DES_32, *PIRQ_DES_32;
+
+typedef struct IRQ_Des_64_s {
+  DWORD  IRQD_Count;
+  DWORD  IRQD_Type;
+  DWORD  IRQD_Flags;
+  ULONG  IRQD_Alloc_Num;
+  ULONG64  IRQD_Affinity;
+} IRQ_DES_64, *PIRQ_DES_64;
+
+#ifdef _WIN64
+typedef IRQ_DES_64 IRQ_DES;
+typedef PIRQ_DES_64 PIRQ_DES;
+#else
+typedef IRQ_DES_32 IRQ_DES;
+typedef PIRQ_DES_32 PIRQ_DES;
+#endif
+
+typedef struct IRQ_Range_s {
+  ULONG  IRQR_Min;
+  ULONG  IRQR_Max;
+  ULONG  IRQR_Flags;
+} IRQ_RANGE, *PIRQ_RANGE;
+
+#define IRQType_Range sizeof(IRQ_RANGE)
+
+typedef struct IRQ_Resource_s {
+  IRQ_DES  IRQ_Header;
+  IRQ_RANGE  IRQ_Data[ANYSIZE_ARRAY];
+} IRQ_RESOURCE, *PIRQ_RESOURCE;
+
+/* MEM_DES.MD_Flags constants */
+#define mMD_MemoryType              0x1
+#define fMD_MemoryType              mMD_MemoryType
+#define fMD_ROM                     0x0
+#define fMD_RAM                     0x1
+
+#define mMD_32_24                   0x2
+#define fMD_32_24                   mMD_32_24
+#define fMD_24                      0x0
+#define fMD_32                      0x2
+
+#define mMD_Prefetchable            0x4
+#define fMD_Prefetchable            mMD_Prefetchable
+#define fMD_Pref                    mMD_Prefetchable
+#define fMD_PrefetchDisallowed      0x0
+#define fMD_PrefetchAllowed         0x4
+
+#define mMD_Readable                0x8
+#define fMD_Readable                mMD_Readable
+#define fMD_ReadAllowed             0x0
+#define fMD_ReadDisallowed          0x8
+
+#define mMD_CombinedWrite           0x10
+#define fMD_CombinedWrite           mMD_CombinedWrite
+#define fMD_CombinedWriteDisallowed 0x0
+#define fMD_CombinedWriteAllowed    0x10
+
+#define mMD_Cacheable               0x20
+#define fMD_NonCacheable            0x0
+#define fMD_Cacheable               0x20
+
+typedef struct Mem_Des_s {
+  DWORD  MD_Count;
+  DWORD  MD_Type;
+  DWORDLONG  MD_Alloc_Base;
+  DWORDLONG  MD_Alloc_End;
+  DWORD  MD_Flags;
+  DWORD  MD_Reserved;
+} MEM_DES, *PMEM_DES;
+
+typedef struct Mem_Range_s {
+  DWORDLONG  MR_Align;
+  ULONG  MR_nBytes;
+  DWORDLONG  MR_Min;
+  DWORDLONG  MR_Max;
+  DWORD  MR_Flags;
+  DWORD  MR_Reserved;
+} MEM_RANGE, *PMEM_RANGE;
+
+#define MType_Range sizeof(MEM_RANGE)
+
+typedef struct Mem_Resource_s {
+  MEM_DES  MEM_Header;
+  MEM_RANGE  MEM_Data[ANYSIZE_ARRAY];
+} MEM_RESOURCE, *PMEM_RESOURCE;
+
+/* MFCARD_DES.PMF_Flags constants */
+#define fPMF_AUDIO_ENABLE                 0x8
+#define mPMF_AUDIO_ENABLE                 fPMF_AUDIO_ENABLE
+
+typedef struct MfCard_Des_s {
+  DWORD  PMF_Count;
+  DWORD  PMF_Type;
+  DWORD  PMF_Flags;
+  BYTE  PMF_ConfigOptions;
+  BYTE  PMF_IoResourceIndex;
+  BYTE  PMF_Reserved[2];
+  DWORD  PMF_ConfigRegisterBase;
+} MFCARD_DES, *PMFCARD_DES;
+
+typedef struct MfCard_Resource_s {
+  MFCARD_DES  MfCard_Header;
+} MFCARD_RESOURCE, *PMFCARD_RESOURCE;
+
+/* PCCARD_DES.PCD_Flags constants */
+
+typedef struct PcCard_Des_s {
+  DWORD  PCD_Count;
+  DWORD  PCD_Type;
+  DWORD  PCD_Flags;
+  BYTE  PCD_ConfigIndex;
+  BYTE  PCD_Reserved[3];
+  DWORD  PCD_MemoryCardBase1;
+  DWORD  PCD_MemoryCardBase2;
+} PCCARD_DES, *PPCCARD_DES;
+
+#define mPCD_IO_8_16                      0x1
+#define fPCD_IO_8                         0x0
+#define fPCD_IO_16                        0x1
+#define mPCD_MEM_8_16                     0x2
+#define fPCD_MEM_8                        0x0
+#define fPCD_MEM_16                       0x2
+#define mPCD_MEM_A_C                      0xC
+#define fPCD_MEM1_A                       0x4
+#define fPCD_MEM2_A                       0x8
+#define fPCD_IO_ZW_8                      0x10
+#define fPCD_IO_SRC_16                    0x20
+#define fPCD_IO_WS_16                     0x40
+#define mPCD_MEM_WS                       0x300
+#define fPCD_MEM_WS_ONE                   0x100
+#define fPCD_MEM_WS_TWO                   0x200
+#define fPCD_MEM_WS_THREE                 0x300
+
+#define fPCD_MEM_A                        0x4
+
+#define fPCD_ATTRIBUTES_PER_WINDOW        0x8000
+
+#define fPCD_IO1_16                       0x00010000
+#define fPCD_IO1_ZW_8                     0x00020000
+#define fPCD_IO1_SRC_16                   0x00040000
+#define fPCD_IO1_WS_16                    0x00080000
+
+#define fPCD_IO2_16                       0x00100000
+#define fPCD_IO2_ZW_8                     0x00200000
+#define fPCD_IO2_SRC_16                   0x00400000
+#define fPCD_IO2_WS_16                    0x00800000
+
+#define mPCD_MEM1_WS                      0x03000000
+#define fPCD_MEM1_WS_ONE                  0x01000000
+#define fPCD_MEM1_WS_TWO                  0x02000000
+#define fPCD_MEM1_WS_THREE                0x03000000
+#define fPCD_MEM1_16                      0x04000000
+
+#define mPCD_MEM2_WS                      0x30000000
+#define fPCD_MEM2_WS_ONE                  0x10000000
+#define fPCD_MEM2_WS_TWO                  0x20000000
+#define fPCD_MEM2_WS_THREE                0x30000000
+#define fPCD_MEM2_16                      0x40000000
+
+#define PCD_MAX_MEMORY                    2
+#define PCD_MAX_IO                        2
+
+typedef struct PcCard_Resource_s {
+  PCCARD_DES  PcCard_Header;
+} PCCARD_RESOURCE, *PPCCARD_RESOURCE;
+
+
+/* CONFLICT_DETAILS.CD.ulMask constants */
+#define CM_CDMASK_DEVINST                 0x00000001
+#define CM_CDMASK_RESDES                  0x00000002
+#define CM_CDMASK_FLAGS                   0x00000004
+#define CM_CDMASK_DESCRIPTION             0x00000008
+#define CM_CDMASK_VALID                   0x0000000F
+
+/* CONFLICT_DETAILS.CD.ulFlags constants */
+#define CM_CDFLAGS_DRIVER                 0x00000001
+#define CM_CDFLAGS_ROOT_OWNED             0x00000002
+#define CM_CDFLAGS_RESERVED               0x00000004
+
+typedef struct _CONFLICT_DETAILS_A {
+  ULONG  CD_ulSize;
+  ULONG  CD_ulMask;
+  DEVINST  CD_dnDevInst;
+  RES_DES  CD_rdResDes;
+  ULONG  CD_ulFlags;
+  CHAR  CD_szDescription[MAX_PATH];
+} CONFLICT_DETAILS_A , *PCONFLICT_DETAILS_A;
+
+typedef struct _CONFLICT_DETAILS_W {
+  ULONG  CD_ulSize;
+  ULONG  CD_ulMask;
+  DEVINST  CD_dnDevInst;
+  RES_DES  CD_rdResDes;
+  ULONG  CD_ulFlags;
+  WCHAR  CD_szDescription[MAX_PATH];
+} CONFLICT_DETAILS_W , *PCONFLICT_DETAILS_W;
+
+#ifdef UNICODE
+typedef CONFLICT_DETAILS_W CONFLICT_DETAILS;
+typedef PCONFLICT_DETAILS_W PCONFLICT_DETAILS;
+#else
+typedef CONFLICT_DETAILS_A CONFLICT_DETAILS;
+typedef PCONFLICT_DETAILS_A PCONFLICT_DETAILS;
+#endif
+
+
+#define CMP_MAGIC  0x01234567
+
+
+CMAPI
+CONFIGRET
+WINAPI
+CMP_Init_Detection(
+  IN DWORD  dwMagic);
+
+CMAPI
+CONFIGRET
+WINAPI
+CMP_RegisterNotification(
+  IN HANDLE hRecipient,
+  IN LPVOID lpvNotificationFilter,
+  IN DWORD  dwFlags,
+  OUT PULONG pluhDevNotify);
+
+CMAPI
+CONFIGRET
+WINAPI
+CMP_Report_LogOn(
+  IN DWORD dwMagic,
+  IN DWORD dwProcessId);
+
+CMAPI
+CONFIGRET
+WINAPI
+CMP_UnregisterNotification(IN ULONG luhDevNotify);
+
+/* FIXME: Missing CMP_WaitNoPendingInstallEvents */
+/* FIXME: Missing CMP_WaitServicesAvailable */
+
+/* CM_Add_Empty_Log_Conf.ulFlags constants */
+#define BASIC_LOG_CONF                    0x00000000
+#define FILTERED_LOG_CONF                 0x00000001
+#define ALLOC_LOG_CONF                    0x00000002
+#define BOOT_LOG_CONF                     0x00000003
+#define FORCED_LOG_CONF                   0x00000004
+#define OVERRIDE_LOG_CONF                 0x00000005
+#define NUM_LOG_CONF                      0x00000006
+#define LOG_CONF_BITS                     0x00000007
+
+#define PRIORITY_EQUAL_FIRST              0x00000008
+#define PRIORITY_EQUAL_LAST               0x00000000
+#define PRIORITY_BIT                      0x00000008
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Add_Empty_Log_Conf(
+  OUT PLOG_CONF  plcLogConf,
+  IN DEVINST  dnDevInst,
+  IN PRIORITY  Priority,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Add_Empty_Log_Conf_Ex(
+  OUT PLOG_CONF  plcLogConf,
+  IN DEVINST  dnDevInst,
+  IN PRIORITY  Priority,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+/* CM_Add_ID.ulFlags constants */
+#define CM_ADD_ID_HARDWARE                0x00000000
+#define CM_ADD_ID_COMPATIBLE              0x00000001
+#define CM_ADD_ID_BITS                    0x00000001
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Add_IDA(
+  IN DEVINST  dnDevInst,
+  IN PSTR  pszID,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Add_ID_ExA(
+  IN DEVINST  dnDevInst,
+  IN PSTR  pszID,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Add_ID_ExW(
+  IN DEVINST  dnDevInst,
+  IN PWSTR  pszID,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Add_IDW(
+  IN DEVINST  dnDevInst,
+  IN PWSTR  pszID,
+  IN ULONG  ulFlags);
+
+#ifdef UNICODE
+#define CM_Add_ID CM_Add_IDW
+#define CM_Add_ID_Ex CM_Add_ID_ExW
+#else
+#define CM_Add_ID CM_Add_IDA
+#define CM_Add_ID_Ex CM_Add_ID_ExA
+#endif /* UNICODE */
+
+/* FIXME: Obsolete CM_Add_Range */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Add_Res_Des(
+  OUT PRES_DES  prdResDes,
+  IN LOG_CONF  lcLogConf,
+  IN RESOURCEID  ResourceID,
+  IN PCVOID  ResourceData,
+  IN ULONG  ResourceLen,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Add_Res_Des_Ex(
+  OUT PRES_DES  prdResDes,
+  IN LOG_CONF  lcLogConf,
+  IN RESOURCEID  ResourceID,
+  IN PCVOID  ResourceData,
+  IN ULONG  ResourceLen,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Connect_MachineA(
+  IN PCSTR  UNCServerName,
+  OUT PHMACHINE  phMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Connect_MachineW(
+  IN PCWSTR  UNCServerName,
+  OUT PHMACHINE  phMachine);
+
+#ifdef UNICODE
+#define CM_Connect_Machine CM_Connect_MachineW
+#else
+#define CM_Connect_Machine CM_Connect_MachineA
+#endif /* UNICODE */
+
+/* Flags for CM_Create_DevNode[_Ex].ulFlags constants */
+#define CM_CREATE_DEVNODE_NORMAL          0x00000000
+#define CM_CREATE_DEVNODE_NO_WAIT_INSTALL 0x00000001
+#define CM_CREATE_DEVNODE_PHANTOM         0x00000002
+#define CM_CREATE_DEVNODE_GENERATE_ID     0x00000004
+#define CM_CREATE_DEVNODE_DO_NOT_INSTALL  0x00000008
+#define CM_CREATE_DEVNODE_BITS            0x0000000F
+
+#define CM_CREATE_DEVINST_NORMAL          CM_CREATE_DEVNODE_NORMAL
+#define CM_CREATE_DEVINST_NO_WAIT_INSTALL CM_CREATE_DEVNODE_NO_WAIT_INSTALL
+#define CM_CREATE_DEVINST_PHANTOM         CM_CREATE_DEVNODE_PHANTOM
+#define CM_CREATE_DEVINST_GENERATE_ID     CM_CREATE_DEVNODE_GENERATE_ID
+#define CM_CREATE_DEVINST_DO_NOT_INSTALL  CM_CREATE_DEVNODE_DO_NOT_INSTALL
+#define CM_CREATE_DEVINST_BITS            CM_CREATE_DEVNODE_BITS
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Create_DevNodeA(
+  OUT PDEVINST  pdnDevInst,
+  IN DEVINSTID_A  pDeviceID,
+  IN DEVINST  dnParent,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Create_DevNodeW(
+  OUT PDEVINST  pdnDevInst,
+  IN DEVINSTID_W  pDeviceID,
+  IN DEVINST  dnParent,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Create_DevNode_ExA(
+  OUT PDEVINST  pdnDevInst,
+  IN DEVINSTID_A  pDeviceID,
+  IN DEVINST  dnParent,
+  IN ULONG  ulFlags,
+  IN HANDLE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Create_DevNode_ExW(
+  OUT PDEVINST  pdnDevInst,
+  IN DEVINSTID_W  pDeviceID,
+  IN DEVINST  dnParent,
+  IN ULONG  ulFlags,
+  IN HANDLE  hMachine);
+
+#define CM_Create_DevInstW CM_Create_DevNodeW
+#define CM_Create_DevInstA CM_Create_DevNodeA
+#define CM_Create_DevInst_ExW CM_Create_DevNode_ExW
+#define CM_Create_DevInst_ExA CM_Create_DevNode_ExA
+#ifdef UNICODE
+#define CM_Create_DevNode CM_Create_DevNodeW
+#define CM_Create_DevInst CM_Create_DevNodeW
+#define CM_Create_DevNode_Ex CM_Create_DevNode_ExW
+#define CM_Create_DevInst_Ex CM_Create_DevInst_ExW
+#else
+#define CM_Create_DevNode CM_Create_DevNodeA
+#define CM_Create_DevInst CM_Create_DevNodeA
+#define CM_Create_DevNode_Ex CM_Create_DevNode_ExA
+#define CM_Create_DevInst_Ex CM_Create_DevNode_ExA
+#endif /* UNICODE */
+
+/* FIXME: Obsolete CM_Create_Range_List */
+
+/* Flags for CM_Delete_Class_Key.ulFlags constants */
+#define CM_DELETE_CLASS_ONLY              0x00000000
+#define CM_DELETE_CLASS_SUBKEYS           0x00000001
+#define CM_DELETE_CLASS_BITS              0x00000001
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Delete_Class_Key(
+  IN LPGUID  ClassGuid,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Delete_Class_Key_Ex(
+  IN LPGUID  ClassGuid,
+  IN ULONG  ulFlags,
+  IN HANDLE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Delete_DevNode_Key(
+  IN DEVNODE  dnDevNode,
+  IN ULONG  ulHardwareProfile,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Delete_DevNode_Key_Ex(
+  IN DEVNODE  dnDevNode,
+  IN ULONG  ulHardwareProfile,
+  IN ULONG  ulFlags,
+  IN HANDLE  hMachine);
+
+#define CM_Delete_DevInst_Key CM_Delete_DevNode_Key
+#define CM_Delete_DevInst_Key_Ex CM_Delete_DevNode_Key_Ex
+
+/* FIXME: Obsolete CM_Delete_Range */
+/* FIXME: Obsolete CM_Detected_Resource_Conflict */
+/* FIXME: Obsolete CM_Detected_Resource_Conflict_Ex */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Disable_DevNode(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Disable_DevNode_Ex(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+#define CM_Disable_DevInst CM_Disable_DevNode
+#define CM_Disable_DevInst_Ex CM_Disable_DevNode_Ex
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Disconnect_Machine(
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Enable_DevNode(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Enable_DevNode_Ex(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+#define CM_Enable_DevInst CM_Enable_DevNode
+#define CM_Enable_DevInst_Ex CM_Enable_DevNode_Ex
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Enumerate_Classes(
+  IN ULONG  ulClassIndex,
+  OUT LPGUID  ClassGuid,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Enumerate_Classes_Ex(
+  IN ULONG  ulClassIndex,
+  OUT LPGUID  ClassGuid,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Enumerate_EnumeratorsA(
+  IN ULONG  ulEnumIndex,
+  OUT PCHAR  Buffer,
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Enumerate_Enumerators_ExA(
+  IN ULONG  ulEnumIndex,
+  OUT PCHAR  Buffer,
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Enumerate_Enumerators_ExW(
+  IN ULONG  ulEnumIndex,
+  OUT PWCHAR  Buffer,
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Enumerate_EnumeratorsW(
+  IN ULONG  ulEnumIndex,
+  OUT PWCHAR  Buffer,
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags);
+
+#ifdef UNICODE
+#define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsW
+#define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExW
+#else
+#define CM_Enumerate_Enumerators CM_Enumerate_EnumeratorsA
+#define CM_Enumerate_Enumerators_Ex CM_Enumerate_Enumerators_ExA
+#endif /* UNICODE */
+
+/* FIXME: Obsolete CM_Find_Range */
+/* FIXME: Obsolete CM_First_Range */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Free_Log_Conf(
+  IN LOG_CONF  lcLogConfToBeFreed,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Free_Log_Conf_Ex(
+  IN LOG_CONF  lcLogConfToBeFreed,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Free_Log_Conf_Handle(
+  IN LOG_CONF  lcLogConf);
+
+/* FIXME: Obsolete CM_Free_Range_List */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Free_Res_Des(
+  OUT PRES_DES  prdResDes,
+  IN RES_DES  rdResDes,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Free_Res_Des_Ex(
+  OUT PRES_DES  prdResDes,
+  IN RES_DES  rdResDes,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Free_Res_Des_Handle(
+  IN RES_DES  rdResDes);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Free_Resource_Conflict_Handle(
+  IN CONFLICT_LIST  clConflictList);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Child(
+  OUT PDEVINST  pdnDevInst,
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Child_Ex(
+  OUT PDEVINST  pdnDevInst,
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Class_NameA(
+  IN LPGUID  ClassGuid,
+  OUT PCHAR  Buffer,
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Class_NameW(
+  IN LPGUID  ClassGuid,
+  OUT PWCHAR  Buffer,
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Class_Name_ExA(
+  IN LPGUID  ClassGuid,
+  OUT PCHAR  Buffer,
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Class_Name_ExW(
+  IN LPGUID  ClassGuid,
+  OUT PWCHAR  Buffer,
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+#ifdef UNICODE
+#define CM_Get_Class_Name CM_Get_Class_NameW
+#define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExW
+#else
+#define CM_Get_Class_Name CM_Get_Class_NameA
+#define CM_Get_Class_Name_Ex CM_Get_Class_Name_ExA
+#endif /* UNICODE */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Class_Key_NameA(
+  IN LPGUID  ClassGuid,
+  OUT LPSTR  pszKeyName,
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Class_Key_NameW(
+  IN LPGUID  ClassGuid,
+  OUT LPWSTR  pszKeyName,
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Class_Key_Name_ExA(
+  IN LPGUID  ClassGuid,
+  OUT LPSTR  pszKeyName,
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Class_Key_Name_ExW(
+  IN LPGUID  ClassGuid,
+  OUT LPWSTR  pszKeyName,
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+#ifdef UNICODE
+#define CM_Get_Class_Key_Name CM_Get_Class_Key_NameW
+#define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExW
+#else
+#define CM_Get_Class_Key_Name CM_Get_Class_Key_NameA
+#define CM_Get_Class_Key_Name_Ex CM_Get_Class_Key_Name_ExA
+#endif /* UNICODE */
+
+/* FIXME: Obsolete CM_Get_Class_Registry_Property */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Depth(
+  OUT PULONG  pulDepth,
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Depth_Ex(
+  OUT PULONG  pulDepth,
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Device_IDA(
+  IN DEVINST  dnDevInst,
+  OUT PCHAR  Buffer,
+  IN ULONG  BufferLen,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Device_ID_ExA(
+  IN DEVINST  dnDevInst,
+  OUT PCHAR  Buffer,
+  IN ULONG  BufferLen,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Device_ID_ExW(
+  IN DEVINST  dnDevInst,
+  OUT PWCHAR  Buffer,
+  IN ULONG  BufferLen,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Device_IDW(
+  IN DEVINST  dnDevInst,
+  OUT PWCHAR  Buffer,
+  IN ULONG  BufferLen,
+  IN ULONG  ulFlags);
+
+#ifdef UNICODE
+#define CM_Get_Device_ID CM_Get_Device_IDW
+#define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExW
+#else
+#define CM_Get_Device_ID CM_Get_Device_IDA
+#define CM_Get_Device_ID_Ex CM_Get_Device_ID_ExA
+#endif /* UNICODE */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Device_ID_ListA(
+  IN PCSTR  pszFilter,  OPTIONAL
+  OUT PCHAR  Buffer,
+  IN ULONG  BufferLen,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Device_ID_List_ExA(
+  IN PCSTR  pszFilter,  OPTIONAL
+  OUT PCHAR  Buffer,
+  IN ULONG  BufferLen,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Device_ID_List_ExW(
+  IN PCWSTR  pszFilter,  OPTIONAL
+  OUT PWCHAR  Buffer,
+  IN ULONG  BufferLen,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Device_ID_ListW(
+  IN PCWSTR  pszFilter,  OPTIONAL
+  OUT PWCHAR  Buffer,
+  IN ULONG  BufferLen,
+  IN ULONG  ulFlags);
+
+#ifdef UNICODE
+#define CM_Get_Device_ID_List CM_Get_Device_ID_ListW
+#define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExW
+#else
+#define CM_Get_Device_ID_List CM_Get_Device_ID_ListA
+#define CM_Get_Device_ID_List_Ex CM_Get_Device_ID_List_ExA
+#endif /* UNICODE */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Device_ID_List_SizeA(
+  OUT PULONG  pulLen,
+  IN PCSTR  pszFilter,  OPTIONAL
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Device_ID_List_Size_ExA(
+  OUT PULONG  pulLen,
+  IN PCSTR  pszFilter,  OPTIONAL
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Device_ID_List_Size_ExW(
+  OUT PULONG  pulLen,
+  IN PCWSTR  pszFilter,  OPTIONAL
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Device_ID_List_SizeW(
+  OUT PULONG  pulLen,
+  IN PCWSTR  pszFilter,  OPTIONAL
+  IN ULONG  ulFlags);
+
+#ifdef UNICODE
+#define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeW
+#define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExW
+#else
+#define CM_Get_Device_ID_List_Size CM_Get_Device_ID_List_SizeA
+#define CM_Get_Device_ID_List_Size_Ex CM_Get_Device_ID_List_Size_ExA
+#endif /* UNICODE */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Device_ID_Size(
+  OUT PULONG  pulLen,
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Device_ID_Size_Ex(
+  OUT PULONG  pulLen,
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+/* FIXME: Obsolete CM_Get_Device_Interface_Alias */
+/* FIXME: Obsolete CM_Get_Device_Interface_Alias_Ex */
+/* FIXME: Obsolete CM_Get_Device_Interface_List */
+/* FIXME: Obsolete CM_Get_Device_Interface_List_Ex */
+/* FIXME: Obsolete CM_Get_Device_Interface_List_Size */
+/* FIXME: Obsolete CM_Get_Device_Interface_List_Size_Ex */
+/* FIXME: Obsolete CM_Get_DevNode_Custom_Property */
+/* FIXME: Obsolete CM_Get_DevNode_Custom_Property_Ex */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_DevNode_Registry_PropertyA(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulProperty,
+  OUT PULONG  pulRegDataType,  OPTIONAL
+  OUT PVOID  Buffer,  OPTIONAL
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_DevNode_Registry_PropertyW(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulProperty,
+  OUT PULONG  pulRegDataType,  OPTIONAL
+  OUT PVOID  Buffer,  OPTIONAL
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_DevNode_Registry_Property_ExA(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulProperty,
+  OUT PULONG  pulRegDataType,  OPTIONAL
+  OUT PVOID  Buffer,  OPTIONAL
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_DevNode_Registry_Property_ExW(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulProperty,
+  OUT PULONG  pulRegDataType,  OPTIONAL
+  OUT PVOID  Buffer,  OPTIONAL
+  IN OUT PULONG  pulLength,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+#define CM_Get_DevInst_Registry_PropertyW CM_Get_DevNode_Registry_PropertyW
+#define CM_Get_DevInst_Registry_PropertyA CM_Get_DevNode_Registry_PropertyA
+#define CM_Get_DevInst_Registry_Property_ExW CM_Get_DevNode_Registry_Property_ExW
+#define CM_Get_DevInst_Registry_Property_ExA CM_Get_DevNode_Registry_Property_ExA
+
+#ifdef UNICODE
+#define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyW
+#define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
+#define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyW
+#define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExW
+#else
+#define CM_Get_DevInst_Registry_Property CM_Get_DevNode_Registry_PropertyA
+#define CM_Get_DevInst_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
+#define CM_Get_DevNode_Registry_Property CM_Get_DevNode_Registry_PropertyA
+#define CM_Get_DevNode_Registry_Property_Ex CM_Get_DevNode_Registry_Property_ExA
+#endif /* UNICODE */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_DevNode_Status(
+  OUT PULONG  pulStatus,
+  OUT PULONG  pulProblemNumber,
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_DevNode_Status_Ex(
+  OUT PULONG  pulStatus,
+  OUT PULONG  pulProblemNumber,
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+#define CM_Get_DevInst_Status CM_Get_DevNode_Status
+#define CM_Get_DevInst_Status_Ex CM_Get_DevNode_Status_Ex
+
+/* CM_Get_First_Log_Conf.ulFlags constants */
+#define BASIC_LOG_CONF    0x00000000  /* Specifies the req list. */
+#define FILTERED_LOG_CONF 0x00000001  /* Specifies the filtered req list. */
+#define ALLOC_LOG_CONF    0x00000002  /* Specifies the Alloc Element. */
+#define BOOT_LOG_CONF     0x00000003  /* Specifies the RM Alloc Element. */
+#define FORCED_LOG_CONF   0x00000004  /* Specifies the Forced Log Conf */
+#define OVERRIDE_LOG_CONF 0x00000005  /* Specifies the Override req list. */
+#define NUM_LOG_CONF      0x00000006  /* Number of Log Conf type */
+#define LOG_CONF_BITS     0x00000007  /* The bits of the log conf type. */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_First_Log_Conf(
+  OUT PLOG_CONF  plcLogConf,  OPTIONAL
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_First_Log_Conf_Ex(
+  OUT PLOG_CONF  plcLogConf,  OPTIONAL
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Global_State(
+  OUT PULONG  pulState,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Global_State_Ex(
+  OUT PULONG  pulState,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+/* FIXME: Obsolete CM_Get_Hardware_Profile_Info */
+/* FIXME: Obsolete CM_Get_Hardware_Profile_Info_Ex */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_HW_Prof_FlagsA(
+  IN DEVINSTID_A  szDevInstName,
+  IN ULONG  ulHardwareProfile,
+  OUT PULONG  pulValue,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_HW_Prof_FlagsW(
+  IN DEVINSTID_W  szDevInstName,
+  IN ULONG  ulHardwareProfile,
+  OUT PULONG  pulValue,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_HW_Prof_Flags_ExA(
+  IN DEVINSTID_A  szDevInstName,
+  IN ULONG  ulHardwareProfile,
+  OUT PULONG  pulValue,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_HW_Prof_Flags_ExW(
+  IN DEVINSTID_W  szDevInstName,
+  IN ULONG  ulHardwareProfile,
+  OUT PULONG  pulValue,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+#ifdef UNICODE
+#define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsW
+#define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExW
+#else
+#define CM_Get_HW_Prof_Flags CM_Get_HW_Prof_FlagsA
+#define CM_Get_HW_Prof_Flags_Ex CM_Get_HW_Prof_Flags_ExA
+#endif /* UNICODE */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Log_Conf_Priority(
+  IN LOG_CONF  lcLogConf,
+  OUT PPRIORITY  pPriority,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Log_Conf_Priority_Ex(
+  IN LOG_CONF  lcLogConf,
+  OUT PPRIORITY  pPriority,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Next_Log_Conf(
+  OUT PLOG_CONF  plcLogConf,  OPTIONAL
+  IN LOG_CONF  lcLogConf,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Next_Log_Conf_Ex(
+  OUT PLOG_CONF  plcLogConf,  OPTIONAL
+  IN LOG_CONF  lcLogConf,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Next_Res_Des(
+  OUT PRES_DES  prdResDes,
+  IN RES_DES  rdResDes,
+  IN RESOURCEID  ForResource,
+  OUT PRESOURCEID  pResourceID,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Next_Res_Des_Ex(
+  OUT PRES_DES  prdResDes,
+  IN RES_DES  rdResDes,
+  IN RESOURCEID  ForResource,
+  OUT PRESOURCEID  pResourceID,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Parent(
+  OUT PDEVINST  pdnDevInst,
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Parent_Ex(
+  OUT PDEVINST  pdnDevInst,
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Res_Des_Data(
+  IN RES_DES  rdResDes,
+  OUT PVOID  Buffer,
+  IN ULONG  BufferLen,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Res_Des_Data_Ex(
+  IN RES_DES  rdResDes,
+  OUT PVOID  Buffer,
+  IN ULONG  BufferLen,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Res_Des_Data_Size(
+  OUT PULONG  pulSize,
+  IN RES_DES  rdResDes,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Res_Des_Data_Size_Ex(
+  OUT PULONG  pulSize,
+  IN RES_DES  rdResDes,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Resource_Conflict_Count(
+  IN CONFLICT_LIST  clConflictList,
+  OUT PULONG  pulCount);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Resource_Conflict_DetailsA(
+  IN CONFLICT_LIST  clConflictList,
+  IN ULONG  ulIndex,
+  IN OUT PCONFLICT_DETAILS_A  pConflictDetails);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Resource_Conflict_DetailsW(
+  IN CONFLICT_LIST  clConflictList,
+  IN ULONG  ulIndex,
+  IN OUT PCONFLICT_DETAILS_W  pConflictDetails);
+
+#ifdef UNICODE
+#define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsW
+#else
+#define CM_Get_Resource_Conflict_Details CM_Get_Resource_Conflict_DetailsA
+#endif /* UNICODE */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Sibling(
+  OUT PDEVINST  pdnDevInst,
+  IN DEVINST  DevInst,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Get_Sibling_Ex(
+  OUT PDEVINST  pdnDevInst,
+  IN DEVINST  DevInst,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+WORD
+WINAPI
+CM_Get_Version(
+  VOID);
+
+CMAPI
+WORD
+WINAPI
+CM_Get_Version_Ex(
+  IN HMACHINE  hMachine);
+
+/* FIXME: Obsolete CM_Intersect_Range_List */
+/* FIXME: Obsolete CM_Invert_Range_List */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Is_Dock_Station_Present(
+  OUT PBOOL  pbPresent);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Is_Dock_Station_Present_Ex(
+  OUT PBOOL  pbPresent,
+  IN HMACHINE  hMachine);
+
+/* CM_Locate_DevNode.ulFlags constants */
+#define CM_LOCATE_DEVNODE_NORMAL         0x00000000
+#define CM_LOCATE_DEVNODE_PHANTOM        0x00000001
+#define CM_LOCATE_DEVNODE_CANCELREMOVE   0x00000002
+#define CM_LOCATE_DEVNODE_NOVALIDATION   0x00000004
+#define CM_LOCATE_DEVNODE_BITS           0x00000007
+
+#define CM_LOCATE_DEVINST_NORMAL         CM_LOCATE_DEVNODE_NORMAL
+#define CM_LOCATE_DEVINST_PHANTOM        CM_LOCATE_DEVNODE_PHANTOM
+#define CM_LOCATE_DEVINST_CANCELREMOVE   CM_LOCATE_DEVNODE_CANCELREMOVE
+#define CM_LOCATE_DEVINST_NOVALIDATION   CM_LOCATE_DEVNODE_NOVALIDATION
+#define CM_LOCATE_DEVINST_BITS           CM_LOCATE_DEVNODE_BITS
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Locate_DevNodeA(
+  OUT PDEVINST  pdnDevInst,
+  IN DEVINSTID_A  pDeviceID,  OPTIONAL
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Locate_DevNode_ExA(
+  OUT PDEVINST  pdnDevInst,
+  IN DEVINSTID_A  pDeviceID,  OPTIONAL
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Locate_DevNode_ExW(
+  OUT PDEVINST  pdnDevInst,
+  IN DEVINSTID_W  pDeviceID,  OPTIONAL
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Locate_DevNodeW(
+  OUT PDEVINST  pdnDevInst,
+  IN DEVINSTID_W  pDeviceID,  OPTIONAL
+  IN ULONG  ulFlags);
+
+#define CM_Locate_DevInstA CM_Locate_DevNodeA
+#define CM_Locate_DevInstW CM_Locate_DevNodeW
+#define CM_Locate_DevInst_ExA CM_Locate_DevNode_ExA
+#define CM_Locate_DevInst_ExW CM_Locate_DevNode_ExW
+
+#ifdef UNICODE
+#define CM_Locate_DevNode CM_Locate_DevNodeW
+#define CM_Locate_DevInst CM_Locate_DevNodeW
+#define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExW
+#define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExW
+#else
+#define CM_Locate_DevNode CM_Locate_DevNodeA
+#define CM_Locate_DevInst CM_Locate_DevNodeA
+#define CM_Locate_DevNode_Ex CM_Locate_DevNode_ExA
+#define CM_Locate_DevInst_Ex CM_Locate_DevNode_ExA
+#endif /* UNICODE */
+
+/* FIXME: Obsolete CM_Merge_Range_List */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Modify_Res_Des(
+  OUT PRES_DES  prdResDes,
+  IN RES_DES  rdResDes,
+  IN RESOURCEID  ResourceID,
+  IN PCVOID  ResourceData,
+  IN ULONG  ResourceLen,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Modify_Res_Des_Ex(
+  OUT PRES_DES  prdResDes,
+  IN RES_DES  rdResDes,
+  IN RESOURCEID  ResourceID,
+  IN PCVOID  ResourceData,
+  IN ULONG  ResourceLen,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+/* FIXME: Obsolete CM_Move_DevNode */
+/* FIXME: Obsolete CM_Move_DevNode_Ex */
+/* FIXME: Obsolete CM_Next_Range */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Open_Class_KeyA(
+  IN LPGUID  ClassGuid, OPTIONAL
+  IN LPCSTR  pszClassName, OPTIONAL
+  IN REGSAM  samDesired,
+  IN REGDISPOSITION  Disposition,
+  OUT PHKEY  phkClass,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Open_Class_KeyW(
+  IN LPGUID  ClassGuid, OPTIONAL
+  IN LPCWSTR  pszClassName, OPTIONAL
+  IN REGSAM  samDesired,
+  IN REGDISPOSITION  Disposition,
+  OUT PHKEY  phkClass,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Open_Class_Key_ExA(
+  IN LPGUID  pszClassGuid, OPTIONAL
+  IN LPCSTR  pszClassName, OPTIONAL
+  IN REGSAM  samDesired,
+  IN REGDISPOSITION  Disposition,
+  OUT PHKEY  phkClass,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Open_Class_Key_ExW(
+  IN LPGUID  pszClassGuid, OPTIONAL
+  IN LPCWSTR  pszClassName, OPTIONAL
+  IN REGSAM  samDesired,
+  IN REGDISPOSITION Disposition,
+  OUT PHKEY  phkClass,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+#ifdef UNICODE
+#define CM_Open_Class_Key CM_Open_Class_KeyW
+#define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExW
+#else
+#define CM_Open_Class_Key CM_Open_Class_KeyA
+#define CM_Open_Class_Key_Ex CM_Open_Class_Key_ExA
+#endif /* UNICODE */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Open_DevNode_Key(
+  IN DEVINST  dnDevNode,
+  IN REGSAM  samDesired,
+  IN ULONG  ulHardwareProfile,
+  IN REGDISPOSITION  Disposition,
+  OUT PHKEY  phkDevice,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Open_DevNode_Key_Ex(
+  IN DEVINST  dnDevNode,
+  IN REGSAM  samDesired,
+  IN ULONG  ulHardwareProfile,
+  IN REGDISPOSITION  Disposition,
+  OUT PHKEY  phkDevice,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+#define CM_Open_DevInst_Key CM_Open_DevNode_Key
+#define CM_Open_DevInst_Key_Ex CM_Open_DevNode_Key_Ex
+
+/* CM_Query_And_Remove_SubTree.ulFlags constants */
+#define CM_REMOVE_UI_OK                                0x00000000
+#define CM_REMOVE_UI_NOT_OK                            0x00000001
+#define CM_REMOVE_NO_RESTART                           0x00000002
+#define CM_REMOVE_BITS                                 0x00000003
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Query_And_Remove_SubTreeA(
+  IN  DEVINST dnAncestor,
+  OUT PPNP_VETO_TYPE pVetoType,
+  OUT LPSTR pszVetoName,
+  IN  ULONG ulNameLength,
+  IN  ULONG ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Query_And_Remove_SubTreeW(
+  IN  DEVINST dnAncestor,
+  OUT PPNP_VETO_TYPE pVetoType,
+  OUT LPWSTR pszVetoName,
+  IN  ULONG ulNameLength,
+  IN  ULONG ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Query_And_Remove_SubTree_ExA(
+  IN  DEVINST dnAncestor,
+  OUT PPNP_VETO_TYPE pVetoType,
+  OUT LPSTR pszVetoName,
+  IN  ULONG ulNameLength,
+  IN  ULONG ulFlags,
+  IN  HMACHINE hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Query_And_Remove_SubTree_ExW(
+  IN  DEVINST dnAncestor,
+  OUT PPNP_VETO_TYPE pVetoType,
+  OUT LPWSTR pszVetoName,
+  IN  ULONG ulNameLength,
+  IN  ULONG ulFlags,
+  IN  HMACHINE hMachine);
+
+/* FIXME: Obsolete CM_Query_Arbitrator_Free_Data */
+/* FIXME: Obsolete CM_Query_Arbitrator_Free_Data_Ex */
+/* FIXME: Obsolete CM_Query_Arbitrator_Free_Size */
+/* FIXME: Obsolete CM_Query_Arbitrator_Free_Size_Ex */
+/* FIXME: Obsolete CM_Query_Arbitrator_Free_Size_Ex */
+/* FIXME: Obsolete CM_Query_Remove_SubTree */
+/* FIXME: Obsolete CM_Query_Remove_SubTree_Ex */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Query_Resource_Conflict_List(
+  OUT PCONFLICT_LIST  pclConflictList,
+  IN DEVINST  dnDevInst,
+  IN RESOURCEID  ResourceID,
+  IN PCVOID  ResourceData,
+  IN ULONG  ResourceLen,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+/* CM_Reenumerate_DevNode.ulFlags constants */
+#define CM_REENUMERATE_NORMAL             0x00000000
+#define CM_REENUMERATE_SYNCHRONOUS        0x00000001
+#define CM_REENUMERATE_RETRY_INSTALLATION 0x00000002
+#define CM_REENUMERATE_ASYNCHRONOUS       0x00000004
+#define CM_REENUMERATE_BITS               0x00000007
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Reenumerate_DevNode(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Reenumerate_DevNode_Ex(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+#define CM_Reenumerate_DevInst CM_Reenumerate_DevNode
+#define CM_Reenumerate_DevInst_Ex CM_Reenumerate_DevNode_Ex
+
+/* FIXME: Obsolete CM_Register_Device_Driver */
+/* FIXME: Obsolete CM_Register_Device_Driver_Ex */
+/* FIXME: Obsolete CM_Register_Device_Interface */
+/* FIXME: Obsolete CM_Register_Device_Interface_Ex */
+/* FIXME: Obsolete CM_Remove_SubTree */
+/* FIXME: Obsolete CM_Remove_SubTree_Ex */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Request_Device_EjectA(
+  IN DEVINST  dnDevInst,
+  OUT PPNP_VETO_TYPE  pVetoType,
+  OUT LPSTR  pszVetoName,
+  IN ULONG  ulNameLength,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Request_Device_Eject_ExW(
+  IN DEVINST  dnDevInst,
+  OUT PPNP_VETO_TYPE  pVetoType,
+  OUT LPWSTR  pszVetoName,
+  IN ULONG  ulNameLength,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Request_Device_Eject_ExA(
+  IN DEVINST  dnDevInst,
+  OUT PPNP_VETO_TYPE  pVetoType,
+  OUT LPSTR  pszVetoName,
+  IN ULONG  ulNameLength,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Request_Device_EjectW(
+  IN DEVINST  dnDevInst,
+  OUT PPNP_VETO_TYPE  pVetoType,
+  OUT LPWSTR  pszVetoName,
+  IN ULONG  ulNameLength,
+  IN ULONG  ulFlags);
+
+#ifdef UNICODE
+#define CM_Request_Device_Eject CM_Request_Device_EjectW
+#define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExW
+#else
+#define CM_Request_Device_Eject CM_Request_Device_EjectA
+#define CM_Request_Device_Eject_Ex CM_Request_Device_Eject_ExA
+#endif /* UNICODE */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Request_Eject_PC(
+  VOID);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Request_Eject_PC_Ex(
+  IN HMACHINE  hMachine);
+
+/* CM_Run_Detection[_Ex].ulFlags constants */
+#define CM_DETECT_NEW_PROFILE       0x00000001
+#define CM_DETECT_CRASHED           0x00000002
+#define CM_DETECT_HWPROF_FIRST_BOOT 0x00000004
+#define CM_DETECT_RUN               0x80000000
+#define CM_DETECT_BITS              0x80000007
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Run_Detection(
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Run_Detection_Ex(
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+/* FIXME: Obsolete CM_Set_Class_Registry_Property */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_DevNode_Problem(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulProblem,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_DevNode_Problem_Ex(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulProblem,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+#define CM_Set_DevInst_Problem CM_Set_DevNode_Problem
+#define CM_Set_DevInst_Problem_Ex CM_Set_DevNode_Problem_Ex
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_DevNode_Registry_PropertyA(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulProperty,
+  IN PCVOID  Buffer, OPTIONAL
+  IN ULONG  ulLength,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_DevNode_Registry_PropertyW(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulProperty,
+  IN PCVOID  Buffer, OPTIONAL
+  IN ULONG  ulLength,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_DevNode_Registry_Property_ExA(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulProperty,
+  IN PCVOID  Buffer, OPTIONAL
+  IN ULONG  ulLength,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_DevNode_Registry_Property_ExW(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulProperty,
+  IN PCVOID  Buffer, OPTIONAL
+  IN ULONG  ulLength,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+#define CM_Set_DevInst_Registry_PropertyW CM_Set_DevNode_Registry_PropertyW
+#define CM_Set_DevInst_Registry_PropertyA CM_Set_DevNode_Registry_PropertyA
+#define CM_Set_DevInst_Registry_Property_ExW CM_Set_DevNode_Registry_Property_ExW
+#define CM_Set_DevInst_Registry_Property_ExA CM_Set_DevNode_Registry_Property_ExA
+
+#ifdef UNICODE
+#define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyW
+#define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
+#define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyW
+#define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExW
+#else
+#define CM_Set_DevInst_Registry_Property CM_Set_DevNode_Registry_PropertyA
+#define CM_Set_DevInst_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
+#define CM_Set_DevNode_Registry_Property CM_Set_DevNode_Registry_PropertyA
+#define CM_Set_DevNode_Registry_Property_Ex CM_Set_DevNode_Registry_Property_ExA
+#endif /* UNICODE */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_HW_Prof(
+  IN ULONG  ulHardwareProfile,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_HW_Prof_Ex(
+  IN ULONG  ulHardwareProfile,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+/* CM_Set_HW_Prof_Flags[_Ex].ulFlags constants */
+#define CM_SET_HW_PROF_FLAGS_UI_NOT_OK  (0x00000001)
+#define CM_SET_HW_PROF_FLAGS_BITS       (0x00000001)
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_HW_Prof_FlagsA(
+  IN DEVINSTID_A  szDevInstName,
+  IN ULONG  ulConfig,
+  IN ULONG  ulValue,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_HW_Prof_FlagsW(
+  IN DEVINSTID_W  szDevInstName,
+  IN ULONG  ulConfig,
+  IN ULONG  ulValue,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_HW_Prof_Flags_ExA(
+  IN DEVINSTID_A  szDevInstName,
+  IN ULONG  ulConfig,
+  IN ULONG  ulValue,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Set_HW_Prof_Flags_ExW(
+  IN DEVINSTID_W  szDevInstName,
+  IN ULONG  ulConfig,
+  IN ULONG  ulValue,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+#ifdef UNICODE
+#define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsW
+#define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExW
+#else
+#define CM_Set_HW_Prof_Flags CM_Set_HW_Prof_FlagsA
+#define CM_Set_HW_Prof_Flags_Ex CM_Set_HW_Prof_Flags_ExA
+#endif /* UNICODE */
+
+/* CM_Setup_DevInst[_Ex].ulFlags constants */
+#define CM_SETUP_DEVNODE_READY   (0x00000000)
+#define CM_SETUP_DEVINST_READY   CM_SETUP_DEVNODE_READY
+#define CM_SETUP_DOWNLOAD        (0x00000001)
+#define CM_SETUP_WRITE_LOG_CONFS (0x00000002)
+#define CM_SETUP_PROP_CHANGE     (0x00000003)
+#define CM_SETUP_DEVNODE_RESET   (0x00000004)
+#define CM_SETUP_DEVINST_RESET   CM_SETUP_DEVNODE_RESET
+#define CM_SETUP_BITS            (0x00000007)
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Setup_DevNode(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Setup_DevNode_Ex(
+  IN DEVINST  dnDevInst,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+/* FIXME: Obsolete CM_Test_Range_Available */
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Uninstall_DevNode(
+  IN DEVINST  dnPhantom,
+  IN ULONG  ulFlags);
+
+CMAPI
+CONFIGRET
+WINAPI
+CM_Uninstall_DevNode_Ex(
+  IN DEVINST  dnPhantom,
+  IN ULONG  ulFlags,
+  IN HMACHINE  hMachine);
+
+/* FIXME: Obsolete CM_Unregister_Device_Interface */
+/* FIXME: Obsolete CM_Unregister_Device_Interface_Ex */
+
+#define CM_WaitNoPendingInstallEvents CMP_WaitNoPendingInstallEvents
+
+CMAPI
+DWORD
+WINAPI
+CMP_WaitNoPendingInstallEvents(
+  IN DWORD dwTimeout);
+
+#include <poppack.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _CFGMGR32_H_ */
index cf7b2c1..99056f6 100644 (file)
@@ -229,11 +229,9 @@ typedef struct _IO_CSQ_IRP_CONTEXT {
        }
  *
  */
-#ifndef IO_TYPE_CSQ_EX
 typedef NTSTATUS (NTAPI *PIO_CSQ_INSERT_IRP_EX) (struct _IO_CSQ *Csq,
                                                  PIRP Irp,
                                                  PVOID InsertContext);
-#endif
 
 /*
  * CANCEL-SAFE QUEUE DDIs
index c93bfb4..f269c03 100644 (file)
@@ -98,11 +98,11 @@ enum DeviceObjectState {
   DeviceObjectRemoved
 };
 
-typedef VOID (NTAPI *PHID_STATUS_CHANGE)(
+typedef VOID (DDKAPI *PHID_STATUS_CHANGE)(
   PVOID  Context,
   enum DeviceObjectState  State);
 
-typedef NTSTATUS (NTAPI *PHIDP_GETCAPS)(
+typedef NTSTATUS (DDKAPI *PHIDP_GETCAPS)(
   IN PHIDP_PREPARSED_DATA  PreparsedData,
   OUT PHIDP_CAPS  Capabilities);
 
index ca6d891..63d3cf1 100644 (file)
@@ -69,7 +69,7 @@ typedef struct _HIDP_KEYBOARD_MODIFIER_STATE {
   } DUMMYUNIONNAME;
 } HIDP_KEYBOARD_MODIFIER_STATE, *PHIDP_KEYBOARD_MODIFIER_STATE;
 
-typedef BOOLEAN (NTAPI *PHIDP_INSERT_SCANCODES)(
+typedef BOOLEAN (DDKAPI *PHIDP_INSERT_SCANCODES)(
   IN PVOID  Context,
   IN PCHAR  NewScanCodes,
   IN ULONG  Length);
@@ -94,7 +94,7 @@ typedef struct _HIDD_CONFIGURATION {
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_TranslateUsageAndPagesToI8042ScanCodes(
   IN PUSAGE_AND_PAGE  ChangedUsageList,
   IN ULONG  UsageListLength,
@@ -105,7 +105,7 @@ HidP_TranslateUsageAndPagesToI8042ScanCodes(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_TranslateUsagesToI8042ScanCodes(
   IN PUSAGE  ChangedUsageList,
   IN ULONG  UsageListLength,
@@ -313,14 +313,14 @@ typedef enum _HIDP_REPORT_TYPE {
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_GetCaps(
   IN PHIDP_PREPARSED_DATA  PreparsedData,
   OUT PHIDP_CAPS  Capabilities);
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_GetData(
   IN HIDP_REPORT_TYPE  ReportType,
   OUT PHIDP_DATA  DataList,
@@ -331,7 +331,7 @@ HidP_GetData(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_GetExtendedAttributes(
   IN HIDP_REPORT_TYPE  ReportType,
   IN USHORT  DataIndex,
@@ -341,7 +341,7 @@ HidP_GetExtendedAttributes(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_GetLinkCollectionNodes(
   OUT PHIDP_LINK_COLLECTION_NODE  LinkCollectionNodes,
   IN OUT PULONG  LinkCollectionNodesLength,
@@ -349,7 +349,7 @@ HidP_GetLinkCollectionNodes(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_GetScaledUsageValue(
   IN HIDP_REPORT_TYPE  ReportType,
   IN USAGE  UsagePage,
@@ -362,7 +362,7 @@ HidP_GetScaledUsageValue(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_GetSpecificButtonCaps(
   IN HIDP_REPORT_TYPE  ReportType,
   IN USAGE  UsagePage,
@@ -374,7 +374,7 @@ HidP_GetSpecificButtonCaps(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_GetSpecificValueCaps(
   IN HIDP_REPORT_TYPE  ReportType,
   IN USAGE  UsagePage,
@@ -386,7 +386,7 @@ HidP_GetSpecificValueCaps(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_GetUsages(
   IN HIDP_REPORT_TYPE  ReportType,
   IN USAGE  UsagePage,
@@ -399,7 +399,7 @@ HidP_GetUsages(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_GetUsagesEx(
   IN HIDP_REPORT_TYPE  ReportType,
   IN USHORT  LinkCollection,
@@ -411,7 +411,7 @@ HidP_GetUsagesEx(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_GetUsageValue(
   IN HIDP_REPORT_TYPE  ReportType,
   IN USAGE  UsagePage,
@@ -424,7 +424,7 @@ HidP_GetUsageValue(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_GetUsageValueArray(
   IN HIDP_REPORT_TYPE  ReportType,
   IN USAGE  UsagePage,
@@ -453,7 +453,7 @@ HidP_GetUsageValueArray(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_InitializeReportForID(
   IN HIDP_REPORT_TYPE  ReportType,
   IN UCHAR  ReportID,
@@ -475,14 +475,14 @@ HidP_InitializeReportForID(
 
 HIDAPI
 ULONG
-NTAPI
+DDKAPI
 HidP_MaxDataListLength(
   IN HIDP_REPORT_TYPE  ReportType,
   IN PHIDP_PREPARSED_DATA  PreparsedData);
 
 HIDAPI
 ULONG
-NTAPI
+DDKAPI
 HidP_MaxUsageListLength(
   IN HIDP_REPORT_TYPE  ReportType,
   IN USAGE  UsagePage  OPTIONAL,
@@ -509,7 +509,7 @@ HidP_MaxUsageListLength(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_SetData(
   IN HIDP_REPORT_TYPE  ReportType,
   IN PHIDP_DATA  DataList,
@@ -520,7 +520,7 @@ HidP_SetData(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_SetScaledUsageValue(
   IN HIDP_REPORT_TYPE  ReportType,
   IN USAGE  UsagePage,
@@ -533,7 +533,7 @@ HidP_SetScaledUsageValue(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_SetUsages(
   IN HIDP_REPORT_TYPE  ReportType,
   IN USAGE  UsagePage,
@@ -546,7 +546,7 @@ HidP_SetUsages(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_SetUsageValue(
   IN HIDP_REPORT_TYPE  ReportType,
   IN USAGE  UsagePage,
@@ -559,7 +559,7 @@ HidP_SetUsageValue(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_SetUsageValueArray(
   IN HIDP_REPORT_TYPE  ReportType,
   IN USAGE  UsagePage,
@@ -592,7 +592,7 @@ HidP_SetUsageValueArray(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_UnsetUsages(
   IN HIDP_REPORT_TYPE  ReportType,
   IN USAGE  UsagePage,
@@ -605,7 +605,7 @@ HidP_UnsetUsages(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_UsageAndPageListDifference(
   IN PUSAGE_AND_PAGE  PreviousUsageList,
   IN PUSAGE_AND_PAGE  CurrentUsageList,
@@ -615,7 +615,7 @@ HidP_UsageAndPageListDifference(
 
 HIDAPI
 NTSTATUS
-NTAPI
+DDKAPI
 HidP_UsageListDifference(
   IN PUSAGE  PreviousUsageList,
   IN PUSAGE  CurrentUsageList,
index eb3e542..cb4a1a4 100644 (file)
@@ -51,7 +51,7 @@ extern "C" {
 
 CHANGERAPI
 PVOID
-NTAPI
+DDKAPI
 ChangerClassAllocatePool(
   IN POOL_TYPE  PoolType,
   IN ULONG  NumberOfBytes);
@@ -64,13 +64,13 @@ ChangerClassDebugPrint(
 
 CHANGERAPI
 PVOID
-NTAPI
+DDKAPI
 ChangerClassFreePool(
   IN PVOID  PoolToFree);
 
 CHANGERAPI
 NTSTATUS
-NTAPI
+DDKAPI
 ChangerClassSendSrbSynchronous(
   IN PDEVICE_OBJECT  DeviceObject,
   IN PSCSI_REQUEST_BLOCK  Srb,
@@ -79,27 +79,27 @@ ChangerClassSendSrbSynchronous(
   IN BOOLEAN  WriteToDevice);
 
 
-typedef NTSTATUS NTAPI
+typedef NTSTATUS DDKAPI
 (*CHANGER_INITIALIZE)(
   IN PDEVICE_OBJECT  DeviceObject);
 
-typedef ULONG NTAPI
+typedef ULONG DDKAPI
 (*CHANGER_EXTENSION_SIZE)(
   VOID);
 
-typedef VOID NTAPI
+typedef VOID DDKAPI
 (*CHANGER_ERROR_ROUTINE)(
   PDEVICE_OBJECT  DeviceObject,
   PSCSI_REQUEST_BLOCK  Srb,
   NTSTATUS  *Status,
   BOOLEAN  *Retry);
 
-typedef NTSTATUS NTAPI
+typedef NTSTATUS DDKAPI
 (*CHANGER_COMMAND_ROUTINE)(
   IN PDEVICE_OBJECT  DeviceObject,
   IN PIRP  Irp);
 
-typedef NTSTATUS NTAPI
+typedef NTSTATUS DDKAPI
 (*CHANGER_PERFORM_DIAGNOSTICS)(
   IN PDEVICE_OBJECT  DeviceObject,
   OUT PWMI_CHANGER_PROBLEM_DEVICE_ERROR  ChangerDeviceError);
@@ -125,7 +125,7 @@ typedef struct _MCD_INIT_DATA {
 
 CHANGERAPI
 NTSTATUS
-NTAPI
+DDKAPI
 ChangerClassInitialize(
   IN PDRIVER_OBJECT  DriverObject,
   IN PUNICODE_STRING  RegistryPath,
diff --git a/reactos/include/ddk/mce.h b/reactos/include/ddk/mce.h
deleted file mode 100644 (file)
index e2d8407..0000000
+++ /dev/null
@@ -1,1074 +0,0 @@
-#pragma once
-
-#if defined(_X86_) || defined(_IA64_) || defined(_AMD64_)
-
-typedef union _MCI_ADDR {
-  struct {
-    ULONG Address;
-    ULONG Reserved;
-  } DUMMYSTRUCTNAME;
-  ULONGLONG QuadPart;
-} MCI_ADDR, *PMCI_ADDR;
-
-typedef enum {
-  HAL_MCE_RECORD,
-  HAL_MCA_RECORD
-} MCA_EXCEPTION_TYPE;
-
-#if defined(_AMD64_)
-
-#if (NTDDI_VERSION <= NTDDI_WINXP)
-
-typedef union _MCI_STATS {
-  struct {
-    USHORT McaCod;
-    USHORT ModelErrorCode;
-    ULONG OtherInfo:25;
-    ULONG Damage:1;
-    ULONG AddressValid:1;
-    ULONG MiscValid:1;
-    ULONG Enabled:1;
-    ULONG Uncorrected:1;
-    ULONG OverFlow:1;
-    ULONG Valid:1;
-  } MciStatus;
-  ULONG64 QuadPart;
-} MCI_STATS, *PMCI_STATS;
-
-#else
-
-typedef union _MCI_STATS {
-  struct {
-    USHORT McaErrorCode;
-    USHORT ModelErrorCode;
-    ULONG OtherInformation:25;
-    ULONG ContextCorrupt:1;
-    ULONG AddressValid:1;
-    ULONG MiscValid:1;
-    ULONG ErrorEnabled:1;
-    ULONG UncorrectedError:1;
-    ULONG StatusOverFlow:1;
-    ULONG Valid:1;
-  } MciStatus;
-  ULONG64 QuadPart;
-} MCI_STATS, *PMCI_STATS;
-
-#endif /* (NTDDI_VERSION <= NTDDI_WINXP) */
-
-#endif /* defined(_AMD64_) */
-
-#if defined(_X86_)
-typedef union _MCI_STATS {
-  struct {
-    USHORT McaCod;
-    USHORT MsCod;
-    ULONG OtherInfo:25;
-    ULONG Damage:1;
-    ULONG AddressValid:1;
-    ULONG MiscValid:1;
-    ULONG Enabled:1;
-    ULONG UnCorrected:1;
-    ULONG OverFlow:1;
-    ULONG Valid:1;
-  } MciStats;
-  ULONGLONG QuadPart;
-} MCI_STATS, *PMCI_STATS;
-#endif
-
-#define MCA_EXTREG_V2MAX               24
-
-#if defined(_X86_) || defined(_AMD64_)
-
-#if (NTDDI_VERSION >= NTDDI_WINXP)
-
-typedef struct _MCA_EXCEPTION {
-  ULONG VersionNumber;
-  MCA_EXCEPTION_TYPE ExceptionType;
-  LARGE_INTEGER TimeStamp;
-  ULONG ProcessorNumber;
-  ULONG Reserved1;
-  union {
-    struct {
-      UCHAR BankNumber;
-      UCHAR Reserved2[7];
-      MCI_STATS Status;
-      MCI_ADDR Address;
-      ULONGLONG Misc;
-    } Mca;
-    struct {
-      ULONGLONG Address;
-      ULONGLONG Type;
-    } Mce;
-  } u;
-  ULONG ExtCnt;
-  ULONG Reserved3;
-  ULONGLONG ExtReg[MCA_EXTREG_V2MAX];
-} MCA_EXCEPTION, *PMCA_EXCEPTION;
-
-#else
-
-typedef struct _MCA_EXCEPTION {
-  ULONG VersionNumber;
-  MCA_EXCEPTION_TYPE ExceptionType;
-  LARGE_INTEGER TimeStamp;
-  ULONG ProcessorNumber;
-  ULONG Reserved1;
-  union {
-    struct {
-      UCHAR BankNumber;
-      UCHAR Reserved2[7];
-      MCI_STATS Status;
-      MCI_ADDR Address;
-      ULONGLONG Misc;
-    } Mca;
-    struct {
-      ULONGLONG Address;
-      ULONGLONG Type;
-    } Mce;
-  } u;
-} MCA_EXCEPTION, *PMCA_EXCEPTION;
-
-#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
-
-typedef MCA_EXCEPTION CMC_EXCEPTION, *PCMC_EXCEPTION;
-typedef MCA_EXCEPTION CPE_EXCEPTION, *PCPE_EXCEPTION;
-
-#if (NTDDI_VERSION >= NTDDI_WINXP)
-#define MCA_EXCEPTION_V1_SIZE FIELD_OFFSET(MCA_EXCEPTION, ExtCnt)
-#define MCA_EXCEPTION_V2_SIZE sizeof(struct _MCA_EXCEPTION)
-#endif
-
-#endif /* defined(_X86_) || defined(_AMD64_) */
-
-#if defined(_AMD64_) || defined(_IA64_)
-
-typedef UCHAR ERROR_SEVERITY, *PERROR_SEVERITY;
-
-typedef enum _ERROR_SEVERITY_VALUE {
-  ErrorRecoverable = 0,
-  ErrorFatal = 1,
-  ErrorCorrected = 2,
-  ErrorOthers = 3,
-} ERROR_SEVERITY_VALUE;
-
-#endif
-
-#if defined(_IA64_)
-
-typedef union _ERROR_REVISION {
-  USHORT Revision;
-  struct {
-    UCHAR Minor;
-    UCHAR Major;
-  } DUMMYSTRUCTNAME;
-} ERROR_REVISION, *PERROR_REVISION;
-
-#if (NTDDI_VERSION > NTDDI_WINXP)
-#define ERROR_MAJOR_REVISION_SAL_03_00      0
-#define ERROR_MINOR_REVISION_SAL_03_00      2
-#define ERROR_REVISION_SAL_03_00 {ERROR_MINOR_REVISION_SAL_03_00,ERROR_MAJOR_REVISION_SAL_03_00}
-#define ERROR_FIXED_SECTION_REVISION {2,0}
-#else
-#define ERROR_REVISION_SAL_03_00 {2,0}
-#endif /* (NTDDI_VERSION > NTDDI_WINXP) */
-
-typedef union _ERROR_TIMESTAMP {
-  ULONGLONG TimeStamp;
-  struct {
-    UCHAR Seconds;
-    UCHAR Minutes;
-    UCHAR Hours;
-    UCHAR Reserved;
-    UCHAR Day;
-    UCHAR Month;
-    UCHAR Year;
-    UCHAR Century;
-  } DUMMYSTRUCTNAME;
-} ERROR_TIMESTAMP, *PERROR_TIMESTAMP;
-
-typedef struct _ERROR_GUID {
-  ULONG Data1;
-  USHORT Data2;
-  USHORT Data3;
-  UCHAR Data4[8];
-} ERROR_GUID, *PERROR_GUID;
-
-typedef ERROR_GUID            _ERROR_DEVICE_GUID;
-typedef _ERROR_DEVICE_GUID    ERROR_DEVICE_GUID, *PERROR_DEVICE_GUID;
-
-typedef ERROR_GUID            _ERROR_PLATFORM_GUID;
-typedef _ERROR_PLATFORM_GUID  ERROR_PLATFORM_GUID, *PERROR_PLATFORM_GUID;
-
-typedef union _ERROR_RECORD_VALID {
-  UCHAR Valid;
-  struct {
-    UCHAR OemPlatformID:1;
-    UCHAR Reserved:7;
-  } DUMMYSTRUCTNAME;
-} ERROR_RECORD_VALID, *PERROR_RECORD_VALID;
-
-typedef struct _ERROR_RECORD_HEADER {
-  ULONGLONG Id;
-  ERROR_REVISION Revision;
-  ERROR_SEVERITY ErrorSeverity;
-  ERROR_RECORD_VALID Valid;
-  ULONG Length;
-  ERROR_TIMESTAMP TimeStamp;
-  UCHAR OemPlatformId[16];
-} ERROR_RECORD_HEADER, *PERROR_RECORD_HEADER;
-
-typedef union _ERROR_RECOVERY_INFO {
-  UCHAR RecoveryInfo;
-  struct {
-    UCHAR Corrected:1;
-    UCHAR NotContained:1;
-    UCHAR Reset:1;
-    UCHAR Reserved:4;
-    UCHAR Valid:1;
-  } DUMMYSTRUCTNAME;
-} ERROR_RECOVERY_INFO, *PERROR_RECOVERY_INFO;
-
-typedef struct _ERROR_SECTION_HEADER {
-  ERROR_DEVICE_GUID Guid;
-  ERROR_REVISION Revision;
-  ERROR_RECOVERY_INFO RecoveryInfo;
-  UCHAR Reserved;
-  ULONG Length;
-} ERROR_SECTION_HEADER, *PERROR_SECTION_HEADER;
-
-#if !defined(__midl) && defined(_MSC_EXTENSIONS)
-__inline
-USHORT
-NTAPI
-GetFwMceLogProcessorNumber(
-  PERROR_RECORD_HEADER Log)
-{
-  PERROR_SECTION_HEADER section = (PERROR_SECTION_HEADER)((ULONG64)Log + sizeof(*Log));
-  USHORT lid = (USHORT)((UCHAR)(section->Reserved));
-  lid |= (USHORT)((UCHAR)(Log->TimeStamp.Reserved) << 8);
-  return( lid );
-}
-#endif
-
-#define ERROR_PROCESSOR_GUID {0xe429faf1, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81}}
-
-typedef union _ERROR_MODINFO_VALID {
-  ULONGLONG Valid;
-  struct {
-    ULONGLONG CheckInfo:1;
-    ULONGLONG RequestorIdentifier:1;
-    ULONGLONG ResponderIdentifier:1;
-    ULONGLONG TargetIdentifier:1;
-    ULONGLONG PreciseIP:1;
-    ULONGLONG Reserved:59;
-  } DUMMYSTRUCTNAME;
-} ERROR_MODINFO_VALID, *PERROR_MODINFO_VALID;
-
-typedef enum _ERROR_CHECK_IS {
-  isIA64 = 0,
-  isIA32 = 1,
-} ERROR_CHECK_IS;
-
-typedef enum _ERROR_CACHE_CHECK_OPERATION {
-  CacheUnknownOp = 0,
-  CacheLoad = 1,
-  CacheStore = 2,
-  CacheInstructionFetch = 3,
-  CacheDataPrefetch = 4,
-  CacheSnoop = 5,
-  CacheCastOut = 6,
-  CacheMoveIn = 7,
-} ERROR_CACHE_CHECK_OPERATION;
-
-typedef enum _ERROR_CACHE_CHECK_MESI {
-  CacheInvalid = 0,
-  CacheHeldShared = 1,
-  CacheHeldExclusive = 2,
-  CacheModified = 3,
-} ERROR_CACHE_CHECK_MESI;
-
-#if (NTDDI_VERSION >= NTDDI_VISTA)
-
-typedef union _ERROR_CACHE_CHECK {
-  ULONGLONG CacheCheck;
-  struct {
-    ULONGLONG Operation:4;
-    ULONGLONG Level:2;
-    ULONGLONG Reserved1:2;
-    ULONGLONG DataLine:1;
-    ULONGLONG TagLine:1;
-    ULONGLONG DataCache:1;
-    ULONGLONG InstructionCache:1;
-    ULONGLONG MESI:3;
-    ULONGLONG MESIValid:1;
-    ULONGLONG Way:5;
-    ULONGLONG WayIndexValid:1;
-    ULONGLONG Reserved2:1;
-    ULONGLONG DP:1;
-    ULONGLONG Reserved3:8;
-    ULONGLONG Index:20;
-    ULONGLONG Reserved4:2;
-    ULONGLONG InstructionSet:1;
-    ULONGLONG InstructionSetValid:1;
-    ULONGLONG PrivilegeLevel:2;
-    ULONGLONG PrivilegeLevelValid:1;
-    ULONGLONG MachineCheckCorrected:1;
-    ULONGLONG TargetAddressValid:1;
-    ULONGLONG RequestIdValid:1;
-    ULONGLONG ResponderIdValid:1;
-    ULONGLONG PreciseIPValid:1;
-  } DUMMYSTRUCTNAME;
-} ERROR_CACHE_CHECK, *PERROR_CACHE_CHECK;
-
-# else
-
-typedef union _ERROR_CACHE_CHECK {
-  ULONGLONG CacheCheck;
-  struct {
-    ULONGLONG Operation:4;
-    ULONGLONG Level:2;
-    ULONGLONG Reserved1:2;
-    ULONGLONG DataLine:1;
-    ULONGLONG TagLine:1;
-    ULONGLONG DataCache:1;
-    ULONGLONG InstructionCache:1;
-    ULONGLONG MESI:3;
-    ULONGLONG MESIValid:1;
-    ULONGLONG Way:5;
-    ULONGLONG WayIndexValid:1;
-    ULONGLONG Reserved2:10;
-    ULONGLONG Index:20;
-    ULONGLONG Reserved3:2;
-    ULONGLONG InstructionSet:1;
-    ULONGLONG InstructionSetValid:1;
-    ULONGLONG PrivilegeLevel:2;
-    ULONGLONG PrivilegeLevelValid:1;
-    ULONGLONG MachineCheckCorrected:1;
-    ULONGLONG TargetAddressValid:1;
-    ULONGLONG RequestIdValid:1;
-    ULONGLONG ResponderIdValid:1;
-    ULONGLONG PreciseIPValid:1;
-  } DUMMYSTRUCTNAME;
-} ERROR_CACHE_CHECK, *PERROR_CACHE_CHECK;
-
-#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
-
-typedef enum _ERROR_TLB_CHECK_OPERATION {
-  TlbUnknownOp = 0,
-  TlbAccessWithLoad = 1,
-  TlbAccessWithStore = 2,
-  TlbAccessWithInstructionFetch = 3,
-  TlbAccessWithDataPrefetch = 4,
-  TlbShootDown = 5,
-  TlbProbe = 6,
-  TlbVhptFill = 7,
-  TlbPurge = 8,
-} ERROR_TLB_CHECK_OPERATION;
-
-typedef union _ERROR_TLB_CHECK {
-  ULONGLONG TlbCheck;
-  struct {
-    ULONGLONG TRSlot:8;
-    ULONGLONG TRSlotValid:1;
-    ULONGLONG Reserved1:1;
-    ULONGLONG Level:2;
-    ULONGLONG Reserved2:4;
-    ULONGLONG DataTransReg:1;
-    ULONGLONG InstructionTransReg:1;
-    ULONGLONG DataTransCache:1;
-    ULONGLONG InstructionTransCache:1;
-    ULONGLONG Operation:4;
-    ULONGLONG Reserved3:30;
-    ULONGLONG InstructionSet:1;
-    ULONGLONG InstructionSetValid:1;
-    ULONGLONG PrivilegeLevel:2;
-    ULONGLONG PrivilegeLevelValid:1;
-    ULONGLONG MachineCheckCorrected:1;
-    ULONGLONG TargetAddressValid:1;
-    ULONGLONG RequestIdValid:1;
-    ULONGLONG ResponderIdValid:1;
-    ULONGLONG PreciseIPValid:1;
-  } DUMMYSTRUCTNAME;
-} ERROR_TLB_CHECK, *PERROR_TLB_CHECK;
-
-typedef enum _ERROR_BUS_CHECK_OPERATION {
-  BusUnknownOp = 0,
-  BusPartialRead = 1,
-  BusPartialWrite = 2,
-  BusFullLineRead = 3,
-  BusFullLineWrite = 4,
-  BusWriteBack = 5,
-  BusSnoopProbe = 6,
-  BusIncomingPtcG = 7,
-  BusWriteCoalescing = 8,
-} ERROR_BUS_CHECK_OPERATION;
-
-#if (NTDDI_VERSION >= NTDDI_VISTA)
-
-typedef union _ERROR_BUS_CHECK {
-  ULONGLONG BusCheck;
-  struct {
-    ULONGLONG Size:5;
-    ULONGLONG Internal:1;
-    ULONGLONG External:1;
-    ULONGLONG CacheTransfer:1;
-    ULONGLONG Type:8;
-    ULONGLONG Severity:5;
-    ULONGLONG Hierarchy:2;
-    ULONGLONG DP:1;
-    ULONGLONG Status:8;
-    ULONGLONG Reserved1:22;
-    ULONGLONG InstructionSet:1;
-    ULONGLONG InstructionSetValid:1;
-    ULONGLONG PrivilegeLevel:2;
-    ULONGLONG PrivilegeLevelValid:1;
-    ULONGLONG MachineCheckCorrected:1;
-    ULONGLONG TargetAddressValid:1;
-    ULONGLONG RequestIdValid:1;
-    ULONGLONG ResponderIdValid:1;
-    ULONGLONG PreciseIPValid:1;
-  } DUMMYSTRUCTNAME;
-} ERROR_BUS_CHECK, *PERROR_BUS_CHECK;
-
-#else
-
-typedef union _ERROR_BUS_CHECK {
-  ULONGLONG BusCheck;
-  struct {
-    ULONGLONG Size:5;
-    ULONGLONG Internal:1;
-    ULONGLONG External:1;
-    ULONGLONG CacheTransfer:1;
-    ULONGLONG Type:8;
-    ULONGLONG Severity:5;
-    ULONGLONG Hierarchy:2;
-    ULONGLONG Reserved1:1;
-    ULONGLONG Status:8;
-    ULONGLONG Reserved2:22;
-    ULONGLONG InstructionSet:1;
-    ULONGLONG InstructionSetValid:1;
-    ULONGLONG PrivilegeLevel:2;
-    ULONGLONG PrivilegeLevelValid:1;
-    ULONGLONG MachineCheckCorrected:1;
-    ULONGLONG TargetAddressValid:1;
-    ULONGLONG RequestIdValid:1;
-    ULONGLONG ResponderIdValid:1;
-    ULONGLONG PreciseIPValid:1;
-  } DUMMYSTRUCTNAME;
-} ERROR_BUS_CHECK, *PERROR_BUS_CHECK;
-
-#endif
-
-typedef enum _ERROR_REGFILE_CHECK_IDENTIFIER {
-  RegFileUnknownId = 0,
-  GeneralRegisterBank1 = 1,
-  GeneralRegisterBank0 = 2,
-  FloatingPointRegister = 3,
-  BranchRegister = 4,
-  PredicateRegister = 5,
-  ApplicationRegister = 6,
-  ControlRegister = 7,
-  RegionRegister = 8,
-  ProtectionKeyRegister = 9,
-  DataBreakPointRegister = 10,
-  InstructionBreakPointRegister = 11,
-  PerformanceMonitorControlRegister = 12,
-  PerformanceMonitorDataRegister = 13,
-} ERROR_REGFILE_CHECK_IDENTIFIER;
-
-typedef enum _ERROR_REGFILE_CHECK_OPERATION {
-  RegFileUnknownOp = 0,
-  RegFileRead = 1,
-  RegFileWrite = 2,
-} ERROR_REGFILE_CHECK_OPERATION;
-
-typedef union _ERROR_REGFILE_CHECK {
-  ULONGLONG RegFileCheck;
-  struct {
-    ULONGLONG Identifier:4;
-    ULONGLONG Operation:4;
-    ULONGLONG RegisterNumber:7;
-    ULONGLONG RegisterNumberValid:1;
-    ULONGLONG Reserved1:38;
-    ULONGLONG InstructionSet:1;
-    ULONGLONG InstructionSetValid:1;
-    ULONGLONG PrivilegeLevel:2;
-    ULONGLONG PrivilegeLevelValid:1;
-    ULONGLONG MachineCheckCorrected:1;
-    ULONGLONG Reserved2:3;
-    ULONGLONG PreciseIPValid:1;
-  } DUMMYSTRUCTNAME;
-} ERROR_REGFILE_CHECK, *PERROR_REGFILE_CHECK;
-
-#if (NTDDK_VERSION <= WINXP)
-typedef enum _ERROR_MS_CHECK_OPERATION {
-  MsUnknownOp = 0,
-  MsReadOrLoad = 1,
-  MsWriteOrStore = 2
-} ERROR_MS_CHECK_OPERATION;
-#else
-typedef enum _ERROR_MS_CHECK_OPERATION {
-  MsUnknownOp = 0,
-  MsReadOrLoad = 1,
-  MsWriteOrStore = 2,
-  MsOverTemperature = 3,
-  MsNormalTemperature = 4
-} ERROR_MS_CHECK_OPERATION;
-#endif
-
-typedef union _ERROR_MS_CHECK {
-  ULONGLONG MsCheck;
-  struct {
-    ULONGLONG StructureIdentifier:5;
-    ULONGLONG Level:3;
-    ULONGLONG ArrayId:4;
-    ULONGLONG Operation:4;
-    ULONGLONG Way:6;
-    ULONGLONG WayValid:1;
-    ULONGLONG IndexValid:1;
-    ULONGLONG Reserved1:8;
-    ULONGLONG Index:8;
-    ULONGLONG Reserved2:14;
-    ULONGLONG InstructionSet:1;
-    ULONGLONG InstructionSetValid:1;
-    ULONGLONG PrivilegeLevel:2;
-    ULONGLONG PrivilegeLevelValid:1;
-    ULONGLONG MachineCheckCorrected:1;
-    ULONGLONG TargetAddressValid:1;
-    ULONGLONG RequestIdValid:1;
-    ULONGLONG ResponderIdValid:1;
-    ULONGLONG PreciseIPValid:1;
-  } DUMMYSTRUCTNAME;
-} ERROR_MS_CHECK, *PERROR_MS_CHECK;
-
-typedef union _ERROR_CHECK_INFO {
-  ULONGLONG CheckInfo;
-  ERROR_CACHE_CHECK CacheCheck;
-  ERROR_TLB_CHECK TlbCheck;
-  ERROR_BUS_CHECK BusCheck;
-  ERROR_REGFILE_CHECK RegFileCheck;
-  ERROR_MS_CHECK MsCheck;
-} ERROR_CHECK_INFO, *PERROR_CHECK_INFO;
-
-typedef struct _ERROR_MODINFO {
-  ERROR_MODINFO_VALID Valid;
-  ERROR_CHECK_INFO CheckInfo;
-  ULONGLONG RequestorId;
-  ULONGLONG ResponderId;
-  ULONGLONG TargetId;
-  ULONGLONG PreciseIP;
-} ERROR_MODINFO, *PERROR_MODINFO;
-
-typedef union _ERROR_PROCESSOR_VALID {
-  ULONGLONG Valid;
-  struct {
-    ULONGLONG ErrorMap:1;
-    ULONGLONG StateParameter:1;
-    ULONGLONG CRLid:1;
-    ULONGLONG StaticStruct:1;
-    ULONGLONG CacheCheckNum:4;
-    ULONGLONG TlbCheckNum:4;
-    ULONGLONG BusCheckNum:4;
-    ULONGLONG RegFileCheckNum:4;
-    ULONGLONG MsCheckNum:4;
-    ULONGLONG CpuIdInfo:1;
-    ULONGLONG Reserved:39;
-  } DUMMYSTRUCTNAME;
-} ERROR_PROCESSOR_VALID, *PERROR_PROCESSOR_VALID;
-
-typedef union _ERROR_PROCESSOR_ERROR_MAP {
-  ULONGLONG ErrorMap;
-  struct {
-    ULONGLONG   Cid:4;
-    ULONGLONG   Tid:4;
-    ULONGLONG   Eic:4;
-    ULONGLONG   Edc:4;
-    ULONGLONG   Eit:4;
-    ULONGLONG   Edt:4;
-    ULONGLONG   Ebh:4;
-    ULONGLONG   Erf:4;
-    ULONGLONG   Ems:16;
-    ULONGLONG   Reserved:16;
-  } DUMMYSTRUCTNAME;
-} ERROR_PROCESSOR_ERROR_MAP, *PERROR_PROCESSOR_ERROR_MAP;
-
-typedef ERROR_PROCESSOR_ERROR_MAP    _ERROR_PROCESSOR_LEVEL_INDEX;
-typedef _ERROR_PROCESSOR_LEVEL_INDEX ERROR_PROCESSOR_LEVEL_INDEX, *PERROR_PROCESSOR_LEVEL_INDEX;
-
-typedef union _ERROR_PROCESSOR_STATE_PARAMETER {
-  ULONGLONG   StateParameter;
-  struct {
-    ULONGLONG reserved0:2;
-    ULONGLONG rz:1;
-    ULONGLONG ra:1;
-    ULONGLONG me:1;
-    ULONGLONG mn:1;
-    ULONGLONG sy:1;
-    ULONGLONG co:1;
-    ULONGLONG ci:1;
-    ULONGLONG us:1;
-    ULONGLONG hd:1;
-    ULONGLONG tl:1;
-    ULONGLONG mi:1;
-    ULONGLONG pi:1;
-    ULONGLONG pm:1;
-    ULONGLONG dy:1;
-    ULONGLONG in:1;
-    ULONGLONG rs:1;
-    ULONGLONG cm:1;
-    ULONGLONG ex:1;
-    ULONGLONG cr:1;
-    ULONGLONG pc:1;
-    ULONGLONG dr:1;
-    ULONGLONG tr:1;
-    ULONGLONG rr:1;
-    ULONGLONG ar:1;
-    ULONGLONG br:1;
-    ULONGLONG pr:1;
-    ULONGLONG fp:1;
-    ULONGLONG b1:1;
-    ULONGLONG b0:1;
-    ULONGLONG gr:1;
-    ULONGLONG dsize:16;
-    ULONGLONG reserved1:11;
-    ULONGLONG cc:1;
-    ULONGLONG tc:1;
-    ULONGLONG bc:1;
-    ULONGLONG rc:1;
-    ULONGLONG uc:1;
-  } DUMMYSTRUCTNAME;
-} ERROR_PROCESSOR_STATE_PARAMETER, *PERROR_PROCESSOR_STATE_PARAMETER;
-
-typedef union _PROCESSOR_LOCAL_ID {
-  ULONGLONG LocalId;
-  struct {
-    ULONGLONG reserved:16;
-    ULONGLONG eid:8;
-    ULONGLONG id:8;
-    ULONGLONG ignored:32;
-  } DUMMYSTRUCTNAME;
-} PROCESSOR_LOCAL_ID, *PPROCESSOR_LOCAL_ID;
-
-typedef struct _ERROR_PROCESSOR_MS {
-  ULONGLONG MsError[1];
-} ERROR_PROCESSOR_MS, *PERROR_PROCESSOR_MS;
-
-typedef struct _ERROR_PROCESSOR_CPUID_INFO {
-  ULONGLONG CpuId0;
-  ULONGLONG CpuId1;
-  ULONGLONG CpuId2;
-  ULONGLONG CpuId3;
-  ULONGLONG CpuId4;
-  ULONGLONG Reserved;
-} ERROR_PROCESSOR_CPUID_INFO, *PERROR_PROCESSOR_CPUID_INFO;
-
-typedef union _ERROR_PROCESSOR_STATIC_INFO_VALID {
-  ULONGLONG Valid;
-  struct {
-    ULONGLONG MinState:1;
-    ULONGLONG BR:1;
-    ULONGLONG CR:1;
-    ULONGLONG AR:1;
-    ULONGLONG RR:1;
-    ULONGLONG FR:1;
-    ULONGLONG Reserved:58;
-  } DUMMYSTRUCTNAME;
-} ERROR_PROCESSOR_STATIC_INFO_VALID, *PERROR_PROCESSOR_STATIC_INFO_VALID;
-
-typedef struct _ERROR_PROCESSOR_STATIC_INFO {
-  ERROR_PROCESSOR_STATIC_INFO_VALID Valid;
-  UCHAR MinState[1024];
-  ULONGLONG BR[8];
-  ULONGLONG CR[128];
-  ULONGLONG AR[128];
-  ULONGLONG RR[8];
-  ULONGLONG FR[2 * 128];
-} ERROR_PROCESSOR_STATIC_INFO, *PERROR_PROCESSOR_STATIC_INFO;
-
-typedef struct _ERROR_PROCESSOR {
-  ERROR_SECTION_HEADER Header;
-  ERROR_PROCESSOR_VALID Valid;
-  ERROR_PROCESSOR_ERROR_MAP ErrorMap;
-  ERROR_PROCESSOR_STATE_PARAMETER StateParameter;
-  PROCESSOR_LOCAL_ID CRLid;
-} ERROR_PROCESSOR, *PERROR_PROCESSOR;
-
-#define ERROR_PROCESSOR_STATE_PARAMETER_CACHE_CHECK_SHIFT         59
-#define ERROR_PROCESSOR_STATE_PARAMETER_CACHE_CHECK_MASK          0x1
-#define ERROR_PROCESSOR_STATE_PARAMETER_TLB_CHECK_SHIFT           60
-#define ERROR_PROCESSOR_STATE_PARAMETER_TLB_CHECK_MASK            0x1
-#define ERROR_PROCESSOR_STATE_PARAMETER_BUS_CHECK_SHIFT           61
-#define ERROR_PROCESSOR_STATE_PARAMETER_BUS_CHECK_MASK            0x1
-#define ERROR_PROCESSOR_STATE_PARAMETER_REG_CHECK_SHIFT           62
-#define ERROR_PROCESSOR_STATE_PARAMETER_REG_CHECK_MASK            0x1
-#define ERROR_PROCESSOR_STATE_PARAMETER_MICROARCH_CHECK_SHIFT     63
-#define ERROR_PROCESSOR_STATE_PARAMETER_MICROARCH_CHECK_MASK      0x1
-
-#define ERROR_PROCESSOR_STATE_PARAMETER_UNKNOWN_CHECK_SHIFT       ERROR_PROCESSOR_STATE_PARAMETER_MICROARCH_CHECK_SHIFT
-#define ERROR_PROCESSOR_STATE_PARAMETER_UNKNOWN_CHECK_MASK        ERROR_PROCESSOR_STATE_PARAMETER_MICROARCH_CHECK_MASK
-
-typedef enum _ERR_TYPES {
-  ERR_INTERNAL = 1,
-  ERR_BUS = 16,
-  ERR_MEM = 4,
-  ERR_TLB = 5,
-  ERR_CACHE = 6,
-  ERR_FUNCTION = 7,
-  ERR_SELFTEST = 8,
-  ERR_FLOW = 9,
-  ERR_MAP = 17,
-  ERR_IMPROPER = 18,
-  ERR_UNIMPL = 19,
-  ERR_LOL = 20,
-  ERR_RESPONSE = 21,
-  ERR_PARITY = 22,
-  ERR_PROTOCOL = 23,
-  ERR_ERROR = 24,
-  ERR_TIMEOUT = 25,
-  ERR_POISONED = 26,
-} _ERR_TYPE;
-
-typedef union _ERROR_STATUS {
-  ULONGLONG Status;
-  struct {
-    ULONGLONG Reserved0:8;
-    ULONGLONG Type:8;
-    ULONGLONG Address:1;
-    ULONGLONG Control:1;
-    ULONGLONG Data:1;
-    ULONGLONG Responder:1;
-    ULONGLONG Requestor:1;
-    ULONGLONG FirstError:1;
-    ULONGLONG Overflow:1;
-    ULONGLONG Reserved1:41;
-  } DUMMYSTRUCTNAME;
-} ERROR_STATUS, *PERROR_STATUS;
-
-typedef struct _ERROR_OEM_DATA {
-  USHORT Length;
-} ERROR_OEM_DATA, *PERROR_OEM_DATA;
-
-typedef union _ERROR_BUS_SPECIFIC_DATA {
-  ULONGLONG BusSpecificData;
-  struct {
-    ULONGLONG LockAsserted:1;
-    ULONGLONG DeferLogged:1;
-    ULONGLONG IOQEmpty:1;
-    ULONGLONG DeferredTransaction:1;
-    ULONGLONG RetriedTransaction:1;
-    ULONGLONG MemoryClaimedTransaction:1;
-    ULONGLONG IOClaimedTransaction:1;
-    ULONGLONG ResponseParitySignal:1;
-    ULONGLONG DeferSignal:1;
-    ULONGLONG HitMSignal:1;
-    ULONGLONG HitSignal:1;
-    ULONGLONG RequestBusFirstCycle:6;
-    ULONGLONG RequestBusSecondCycle:6;
-    ULONGLONG AddressParityBusFirstCycle:2;
-    ULONGLONG AddressParityBusSecondCycle:2;
-    ULONGLONG ResponseBus:3;
-    ULONGLONG RequestParitySignalFirstCycle:1;
-    ULONGLONG RequestParitySignalSecondCycle:1;
-    ULONGLONG Reserved:32;
-  } DUMMYSTRUCTNAME;
-} ERROR_BUS_SPECIFIC_DATA, *PERROR_BUS_SPECIFIC_DATA;
-
-#define ERROR_MEMORY_GUID {0xe429faf2, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81}}
-
-typedef union _ERROR_MEMORY_VALID {
-  ULONGLONG Valid;
-  struct {
-    ULONGLONG ErrorStatus:1;
-    ULONGLONG PhysicalAddress:1;
-    ULONGLONG AddressMask:1;
-    ULONGLONG Node:1;
-    ULONGLONG Card:1;
-    ULONGLONG Module:1;
-    ULONGLONG Bank:1;
-    ULONGLONG Device:1;
-    ULONGLONG Row:1;
-    ULONGLONG Column:1;
-    ULONGLONG BitPosition:1;
-    ULONGLONG RequestorId:1;
-    ULONGLONG ResponderId:1;
-    ULONGLONG TargetId:1;
-    ULONGLONG BusSpecificData:1;
-    ULONGLONG OemId:1;
-    ULONGLONG OemData:1;
-    ULONGLONG Reserved:47;
-  } DUMMYSTRUCTNAME;
-} ERROR_MEMORY_VALID, *PERROR_MEMORY_VALID;
-
-typedef struct _ERROR_MEMORY {
-  ERROR_SECTION_HEADER Header;
-  ERROR_MEMORY_VALID Valid;
-  ERROR_STATUS ErrorStatus;
-  ULONGLONG PhysicalAddress;
-  ULONGLONG PhysicalAddressMask;
-  USHORT Node;
-  USHORT Card;
-  USHORT Module;
-  USHORT Bank;
-  USHORT Device;
-  USHORT Row;
-  USHORT Column;
-  USHORT BitPosition;
-  ULONGLONG RequestorId;
-  ULONGLONG ResponderId;
-  ULONGLONG TargetId;
-  ULONGLONG BusSpecificData;
-  UCHAR OemId[16];
-  ERROR_OEM_DATA OemData;
-} ERROR_MEMORY, *PERROR_MEMORY;
-
-#define ERROR_PCI_BUS_GUID {0xe429faf4, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81}}
-
-typedef union _ERROR_PCI_BUS_VALID {
-  ULONGLONG Valid;
-  struct {
-    ULONGLONG ErrorStatus:1;
-    ULONGLONG ErrorType:1;
-    ULONGLONG Id:1;
-    ULONGLONG Address:1;
-    ULONGLONG Data:1;
-    ULONGLONG CmdType:1;
-    ULONGLONG RequestorId:1;
-    ULONGLONG ResponderId:1;
-    ULONGLONG TargetId:1;
-    ULONGLONG OemId:1;
-    ULONGLONG OemData:1;
-    ULONGLONG Reserved:53;
-  } DUMMYSTRUCTNAME;
-} ERROR_PCI_BUS_VALID, *PERROR_PCI_BUS_VALID;
-
-typedef struct _ERROR_PCI_BUS_TYPE {
-  UCHAR Type;
-  UCHAR Reserved;
-} ERROR_PCI_BUS_TYPE, *PERROR_PCI_BUS_TYPE;
-
-#define PciBusUnknownError       ((UCHAR)0)
-#define PciBusDataParityError    ((UCHAR)1)
-#define PciBusSystemError        ((UCHAR)2)
-#define PciBusMasterAbort        ((UCHAR)3)
-#define PciBusTimeOut            ((UCHAR)4)
-#define PciMasterDataParityError ((UCHAR)5)
-#define PciAddressParityError    ((UCHAR)6)
-#define PciCommandParityError    ((UCHAR)7)
-
-typedef struct _ERROR_PCI_BUS_ID {
-  UCHAR BusNumber;
-  UCHAR SegmentNumber;
-} ERROR_PCI_BUS_ID, *PERROR_PCI_BUS_ID;
-
-typedef struct _ERROR_PCI_BUS {
-  ERROR_SECTION_HEADER Header;
-  ERROR_PCI_BUS_VALID Valid;
-  ERROR_STATUS ErrorStatus;
-  ERROR_PCI_BUS_TYPE Type;
-  ERROR_PCI_BUS_ID Id;
-  UCHAR Reserved[4];
-  ULONGLONG Address;
-  ULONGLONG Data;
-  ULONGLONG CmdType;
-  ULONGLONG RequestorId;
-  ULONGLONG ResponderId;
-  ULONGLONG TargetId;
-  UCHAR OemId[16];
-  ERROR_OEM_DATA OemData;
-} ERROR_PCI_BUS, *PERROR_PCI_BUS;
-
-#define ERROR_PCI_COMPONENT_GUID {0xe429faf6, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81}}
-
-typedef union _ERROR_PCI_COMPONENT_VALID {
-  ULONGLONG Valid;
-  struct {
-    ULONGLONG ErrorStatus:1;
-    ULONGLONG Info:1;
-    ULONGLONG MemoryMappedRegistersPairs:1;
-    ULONGLONG ProgrammedIORegistersPairs:1;
-    ULONGLONG RegistersDataPairs:1;
-    ULONGLONG OemData:1;
-    ULONGLONG Reserved:58;
-  } DUMMYSTRUCTNAME;
-} ERROR_PCI_COMPONENT_VALID, *PERROR_PCI_COMPONENT_VALID;
-
-typedef struct _ERROR_PCI_COMPONENT_INFO {
-  USHORT VendorId;
-  USHORT DeviceId;
-  UCHAR ClassCodeInterface;
-  UCHAR ClassCodeSubClass;
-  UCHAR ClassCodeBaseClass;
-  UCHAR FunctionNumber;
-  UCHAR DeviceNumber;
-  UCHAR BusNumber;
-  UCHAR SegmentNumber;
-  UCHAR Reserved0;
-  ULONG Reserved1;
-} ERROR_PCI_COMPONENT_INFO, *PERROR_PCI_COMPONENT_INFO;
-
-typedef struct _ERROR_PCI_COMPONENT {
-  ERROR_SECTION_HEADER Header;
-  ERROR_PCI_COMPONENT_VALID Valid;
-  ERROR_STATUS ErrorStatus;
-  ERROR_PCI_COMPONENT_INFO Info;
-  ULONG MemoryMappedRegistersPairs;
-  ULONG ProgrammedIORegistersPairs;
-} ERROR_PCI_COMPONENT, *PERROR_PCI_COMPONENT;
-
-#define ERROR_SYSTEM_EVENT_LOG_GUID {0xe429faf3, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81}}
-
-typedef union _ERROR_SYSTEM_EVENT_LOG_VALID {
-  ULONGLONG Valid;
-  struct {
-    ULONGLONG RecordId:1;
-    ULONGLONG RecordType:1;
-    ULONGLONG GeneratorId:1;
-    ULONGLONG EVMRev:1;
-    ULONGLONG SensorType:1;
-    ULONGLONG SensorNum:1;
-    ULONGLONG EventDirType:1;
-    ULONGLONG EventData1:1;
-    ULONGLONG EventData2:1;
-    ULONGLONG EventData3:1;
-    ULONGLONG Reserved:54;
-  } DUMMYSTRUCTNAME;
-} ERROR_SYSTEM_EVENT_LOG_VALID, *PSYSTEM_EVENT_LOG_VALID;
-
-typedef struct _ERROR_SYSTEM_EVENT_LOG {
-  ERROR_SECTION_HEADER Header;
-  ERROR_SYSTEM_EVENT_LOG_VALID Valid;
-  USHORT RecordId;
-  UCHAR RecordType;
-  ULONG TimeStamp;
-  USHORT GeneratorId;
-  UCHAR EVMRevision;
-  UCHAR SensorType;
-  UCHAR SensorNumber;
-  UCHAR EventDir;
-  UCHAR Data1;
-  UCHAR Data2;
-  UCHAR Data3;
-} ERROR_SYSTEM_EVENT_LOG, *PERROR_SYSTEM_EVENT_LOG;
-
-#define ERROR_SMBIOS_GUID {0xe429faf5, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81}}
-
-typedef union _ERROR_SMBIOS_VALID {
-  ULONGLONG Valid;
-  struct {
-    ULONGLONG EventType:1;
-    ULONGLONG Length:1;
-    ULONGLONG TimeStamp:1;
-    ULONGLONG OemData:1;
-    ULONGLONG Reserved:60;
-  } DUMMYSTRUCTNAME;
-} ERROR_SMBIOS_VALID, *PERROR_SMBIOS_VALID;
-
-typedef UCHAR ERROR_SMBIOS_EVENT_TYPE, *PERROR_SMBIOS_EVENT_TYPE;
-
-typedef struct _ERROR_SMBIOS {
-  ERROR_SECTION_HEADER Header;
-  ERROR_SMBIOS_VALID Valid;
-  ERROR_SMBIOS_EVENT_TYPE EventType;
-  UCHAR Length;
-  ERROR_TIMESTAMP TimeStamp;
-  ERROR_OEM_DATA OemData;
-} ERROR_SMBIOS, *PERROR_SMBIOS;
-
-#define ERROR_PLATFORM_SPECIFIC_GUID {0xe429faf7, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81}}
-
-typedef union _ERROR_PLATFORM_SPECIFIC_VALID {
-  ULONGLONG Valid;
-  struct {
-    ULONGLONG ErrorStatus:1;
-    ULONGLONG RequestorId:1;
-    ULONGLONG ResponderId:1;
-    ULONGLONG TargetId:1;
-    ULONGLONG BusSpecificData:1;
-    ULONGLONG OemId:1;
-    ULONGLONG OemData:1;
-    ULONGLONG OemDevicePath:1;
-    ULONGLONG Reserved:56;
-  } DUMMYSTRUCTNAME;
-} ERROR_PLATFORM_SPECIFIC_VALID, *PERROR_PLATFORM_SPECIFIC_VALID;
-
-typedef struct _ERROR_PLATFORM_SPECIFIC {
-  ERROR_SECTION_HEADER Header;
-  ERROR_PLATFORM_SPECIFIC_VALID Valid;
-  ERROR_STATUS ErrorStatus;
-  ULONGLONG RequestorId;
-  ULONGLONG ResponderId;
-  ULONGLONG TargetId;
-  ERROR_BUS_SPECIFIC_DATA BusSpecificData;
-  UCHAR OemId[16];
-  ERROR_OEM_DATA OemData;
-} ERROR_PLATFORM_SPECIFIC, *PERROR_PLATFORM_SPECIFIC;
-
-#define ERROR_PLATFORM_BUS_GUID {0xe429faf9, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81}}
-
-typedef union _ERROR_PLATFORM_BUS_VALID {
-  ULONGLONG Valid;
-  struct {
-    ULONGLONG ErrorStatus:1;
-    ULONGLONG RequestorId:1;
-    ULONGLONG ResponderId:1;
-    ULONGLONG TargetId:1;
-    ULONGLONG BusSpecificData:1;
-    ULONGLONG OemId:1;
-    ULONGLONG OemData:1;
-    ULONGLONG OemDevicePath:1;
-    ULONGLONG Reserved:56;
-  } DUMMYSTRUCTNAME;
-} ERROR_PLATFORM_BUS_VALID, *PERROR_PLATFORM_BUS_VALID;
-
-typedef struct _ERROR_PLATFORM_BUS {
-  ERROR_SECTION_HEADER Header;
-  ERROR_PLATFORM_BUS_VALID Valid;
-  ERROR_STATUS ErrorStatus;
-  ULONGLONG RequestorId;
-  ULONGLONG ResponderId;
-  ULONGLONG TargetId;
-  ERROR_BUS_SPECIFIC_DATA BusSpecificData;
-  UCHAR OemId[16];
-  ERROR_OEM_DATA OemData;
-} ERROR_PLATFORM_BUS, *PERROR_PLATFORM_BUS;
-
-#define ERROR_PLATFORM_HOST_CONTROLLER_GUID {0xe429faf8, 0x3cb7, 0x11d4, {0xbc, 0xa7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81}}
-
-typedef union _ERROR_PLATFORM_HOST_CONTROLLER_VALID {
-  ULONGLONG Valid;
-  struct {
-    ULONGLONG ErrorStatus:1;
-    ULONGLONG RequestorId:1;
-    ULONGLONG ResponderId:1;
-    ULONGLONG TargetId:1;
-    ULONGLONG BusSpecificData:1;
-    ULONGLONG OemId:1;
-    ULONGLONG OemData:1;
-    ULONGLONG OemDevicePath:1;
-    ULONGLONG Reserved:56;
-  } DUMMYSTRUCTNAME;
-} ERROR_PLATFORM_HOST_CONTROLLER_VALID, *PERROR_PLATFORM_HOST_CONTROLLER_VALID;
-
-typedef struct _ERROR_PLATFORM_HOST_CONTROLLER {
-  ERROR_SECTION_HEADER Header;
-  ERROR_PCI_COMPONENT_VALID Valid;
-  ERROR_STATUS ErrorStatus;
-  ULONGLONG RequestorId;
-  ULONGLONG ResponderId;
-  ULONGLONG TargetId;
-  ERROR_BUS_SPECIFIC_DATA BusSpecificData;
-  UCHAR OemId[16];
-  ERROR_OEM_DATA OemData;
-} ERROR_PLATFORM_HOST_CONTROLLER, *PERROR_PLATFORM_HOST_CONTROLLER;
-
-typedef ERROR_RECORD_HEADER ERROR_LOGRECORD, *PERROR_LOGRECORD;
-typedef ERROR_RECORD_HEADER MCA_EXCEPTION, *PMCA_EXCEPTION;
-typedef ERROR_RECORD_HEADER CMC_EXCEPTION, *PCMC_EXCEPTION;
-typedef ERROR_RECORD_HEADER CPE_EXCEPTION, *PCPE_EXCEPTION;
-#if (NTDDI_VERSION > NTDDI_WINXP)
-typedef ERROR_RECORD_HEADER INIT_EXCEPTION, *PINIT_EXCEPTION;
-#endif
-
-#endif /* defined(_IA64_) */
-
-#endif /* defined(_X86_) || defined(_IA64_) || defined(_AMD64_) */
index 0191e60..59fcc52 100644 (file)
@@ -59,7 +59,7 @@ typedef struct _VIDEO_ACCESS_RANGE {
 #endif
 
 typedef VOID
-(NTAPI *PBANKED_SECTION_ROUTINE)(
+(DDKAPI *PBANKED_SECTION_ROUTINE)(
   IN ULONG  ReadBank,
   IN ULONG  WriteBank,
   IN PVOID  Context);
index 43b1b03..d8f7532 100644 (file)
@@ -159,24 +159,24 @@ typedef struct _MODE_CAPABILITIES_PAGE {
        UCHAR Reserved11[2];
 } MODE_CAPABILITIES_PAGE, *PMODE_CAPABILITIES_PAGE;
 
-typedef BOOLEAN NTAPI
+typedef BOOLEAN DDKAPI
 (*TAPE_VERIFY_INQUIRY_ROUTINE)(
        IN PINQUIRYDATA  InquiryData,
        IN PMODE_CAPABILITIES_PAGE ModeCapabilitiesPage);
 
-typedef VOID NTAPI
+typedef VOID DDKAPI
 (*TAPE_EXTENSION_INIT_ROUTINE)(
   IN PVOID  MinitapeExtension,
   IN PINQUIRYDATA  InquiryData,
   IN PMODE_CAPABILITIES_PAGE  ModeCapabilitiesPage);
 
-typedef VOID NTAPI
+typedef VOID DDKAPI
 (*TAPE_ERROR_ROUTINE)(
     IN PVOID  MinitapeExtension,
     IN PSCSI_REQUEST_BLOCK  Srb,
     IN OUT PTAPE_STATUS  TapeStatus);
 
-typedef TAPE_STATUS NTAPI
+typedef TAPE_STATUS DDKAPI
 (*TAPE_PROCESS_COMMAND_ROUTINE)(
   IN OUT PVOID  MinitapeExtension,
   IN OUT PVOID  CommandExtension,
index da301b1..b08fb68 100644 (file)
@@ -268,7 +268,7 @@ typedef struct _LOCK_STATE {
 /* Timer */
 
 typedef VOID
-(NTAPI *PNDIS_TIMER_FUNCTION)(
+(DDKAPI *PNDIS_TIMER_FUNCTION)(
        IN PVOID  SystemSpecific1,
        IN PVOID  FunctionContext,
        IN PVOID  SystemSpecific2,
@@ -626,16 +626,16 @@ typedef struct _NDIS_WAN_LINE_UP {
 
 
 typedef VOID
-(NTAPI *ADAPTER_SHUTDOWN_HANDLER)(
+(DDKAPI *ADAPTER_SHUTDOWN_HANDLER)(
   IN PVOID  ShutdownContext);
 
 typedef NTSTATUS
-(NTAPI *TDI_REGISTER_CALLBACK)(
+(DDKAPI *TDI_REGISTER_CALLBACK)(
     IN  PUNICODE_STRING         DeviceName,
     OUT HANDLE*                 TdiHandle);
 
 typedef NTSTATUS
-(NTAPI *TDI_PNP_HANDLER)(
+(DDKAPI *TDI_PNP_HANDLER)(
     IN  PUNICODE_STRING         UpperComponent,
     IN  PUNICODE_STRING         LowerComponent,
     IN  PUNICODE_STRING         BindList,
@@ -1057,88 +1057,88 @@ typedef struct _WAN_CO_LINKPARAMS {
 /* Call Manager */
 
 typedef VOID
-(NTAPI *CM_ACTIVATE_VC_COMPLETE_HANDLER)(
+(DDKAPI *CM_ACTIVATE_VC_COMPLETE_HANDLER)(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  CallMgrVcContext,
   IN PCO_CALL_PARAMETERS  CallParameters);
 
 typedef NDIS_STATUS
-(NTAPI *CM_ADD_PARTY_HANDLER)(
+(DDKAPI *CM_ADD_PARTY_HANDLER)(
   IN NDIS_HANDLE  CallMgrVcContext,
   IN OUT PCO_CALL_PARAMETERS  CallParameters,
   IN NDIS_HANDLE  NdisPartyHandle,
   OUT PNDIS_HANDLE  CallMgrPartyContext);
 
 typedef NDIS_STATUS
-(NTAPI *CM_CLOSE_AF_HANDLER)(
+(DDKAPI *CM_CLOSE_AF_HANDLER)(
   IN NDIS_HANDLE  CallMgrAfContext);
 
 typedef NDIS_STATUS
-(NTAPI *CM_CLOSE_CALL_HANDLER)(
+(DDKAPI *CM_CLOSE_CALL_HANDLER)(
   IN NDIS_HANDLE  CallMgrVcContext,
   IN NDIS_HANDLE  CallMgrPartyContext  OPTIONAL,
   IN PVOID  CloseData  OPTIONAL,
   IN UINT  Size  OPTIONAL);
 
 typedef NDIS_STATUS
-(NTAPI *CM_DEREG_SAP_HANDLER)(
+(DDKAPI *CM_DEREG_SAP_HANDLER)(
   IN NDIS_HANDLE  CallMgrSapContext);
 
 typedef VOID
-(NTAPI *CM_DEACTIVATE_VC_COMPLETE_HANDLER)(
+(DDKAPI *CM_DEACTIVATE_VC_COMPLETE_HANDLER)(
        IN NDIS_STATUS  Status,
        IN NDIS_HANDLE  CallMgrVcContext);
 
 typedef NDIS_STATUS
-(NTAPI *CM_DROP_PARTY_HANDLER)(
+(DDKAPI *CM_DROP_PARTY_HANDLER)(
   IN NDIS_HANDLE  CallMgrPartyContext,
   IN PVOID  CloseData  OPTIONAL,
   IN UINT  Size  OPTIONAL);
 
 typedef VOID
-(NTAPI *CM_INCOMING_CALL_COMPLETE_HANDLER)(
+(DDKAPI *CM_INCOMING_CALL_COMPLETE_HANDLER)(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  CallMgrVcContext,
   IN PCO_CALL_PARAMETERS  CallParameters);
 
 typedef NDIS_STATUS
-(NTAPI *CM_MAKE_CALL_HANDLER)(
+(DDKAPI *CM_MAKE_CALL_HANDLER)(
   IN NDIS_HANDLE  CallMgrVcContext,
   IN OUT PCO_CALL_PARAMETERS  CallParameters,
   IN NDIS_HANDLE  NdisPartyHandle      OPTIONAL,
   OUT PNDIS_HANDLE  CallMgrPartyContext  OPTIONAL);
 
 typedef NDIS_STATUS
-(NTAPI *CM_MODIFY_CALL_QOS_HANDLER)(
+(DDKAPI *CM_MODIFY_CALL_QOS_HANDLER)(
   IN NDIS_HANDLE  CallMgrVcContext,
   IN PCO_CALL_PARAMETERS  CallParameters);
 
 typedef NDIS_STATUS
-(NTAPI *CM_OPEN_AF_HANDLER)(
+(DDKAPI *CM_OPEN_AF_HANDLER)(
        IN NDIS_HANDLE  CallMgrBindingContext,
        IN PCO_ADDRESS_FAMILY  AddressFamily,
        IN NDIS_HANDLE  NdisAfHandle,
        OUT PNDIS_HANDLE  CallMgrAfContext);
 
 typedef NDIS_STATUS
-(NTAPI *CM_REG_SAP_HANDLER)(
+(DDKAPI *CM_REG_SAP_HANDLER)(
   IN NDIS_HANDLE  CallMgrAfContext,
   IN PCO_SAP  Sap,
   IN NDIS_HANDLE  NdisSapHandle,
   OUT  PNDIS_HANDLE  CallMgrSapContext);
 
 typedef NDIS_STATUS
-(NTAPI *CO_CREATE_VC_HANDLER)(
+(DDKAPI *CO_CREATE_VC_HANDLER)(
   IN NDIS_HANDLE  ProtocolAfContext,
   IN NDIS_HANDLE  NdisVcHandle,
   OUT PNDIS_HANDLE  ProtocolVcContext);
 
 typedef NDIS_STATUS
-(NTAPI *CO_DELETE_VC_HANDLER)(
+(DDKAPI *CO_DELETE_VC_HANDLER)(
   IN NDIS_HANDLE  ProtocolVcContext);
 
 typedef VOID
-(NTAPI *CO_REQUEST_COMPLETE_HANDLER)(
+(DDKAPI *CO_REQUEST_COMPLETE_HANDLER)(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  ProtocolAfContext  OPTIONAL,
   IN NDIS_HANDLE  ProtocolVcContext  OPTIONAL,
@@ -1146,7 +1146,7 @@ typedef VOID
   IN PNDIS_REQUEST  NdisRequest);
 
 typedef NDIS_STATUS
-(NTAPI *CO_REQUEST_HANDLER)(
+(DDKAPI *CO_REQUEST_HANDLER)(
   IN NDIS_HANDLE  ProtocolAfContext,
   IN NDIS_HANDLE  ProtocolVcContext  OPTIONAL,
   IN NDIS_HANDLE       ProtocolPartyContext  OPTIONAL,
@@ -1185,80 +1185,80 @@ typedef VOID (*CL_OPEN_AF_COMPLETE_HANDLER)(
   IN NDIS_HANDLE NdisAfHandle);
 
 typedef VOID
-(NTAPI *CL_CLOSE_AF_COMPLETE_HANDLER)(
+(DDKAPI *CL_CLOSE_AF_COMPLETE_HANDLER)(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  ProtocolAfContext);
 
 typedef VOID
-(NTAPI *CL_REG_SAP_COMPLETE_HANDLER)(
+(DDKAPI *CL_REG_SAP_COMPLETE_HANDLER)(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  ProtocolSapContext,
   IN PCO_SAP  Sap,
   IN NDIS_HANDLE  NdisSapHandle);
 
 typedef VOID
-(NTAPI *CL_DEREG_SAP_COMPLETE_HANDLER)(
+(DDKAPI *CL_DEREG_SAP_COMPLETE_HANDLER)(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  ProtocolSapContext);
 
 typedef VOID
-(NTAPI *CL_MAKE_CALL_COMPLETE_HANDLER)(
+(DDKAPI *CL_MAKE_CALL_COMPLETE_HANDLER)(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  ProtocolVcContext,
   IN NDIS_HANDLE  NdisPartyHandle  OPTIONAL,
   IN PCO_CALL_PARAMETERS  CallParameters);
 
 typedef VOID
-(NTAPI *CL_MODIFY_CALL_QOS_COMPLETE_HANDLER)(
+(DDKAPI *CL_MODIFY_CALL_QOS_COMPLETE_HANDLER)(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  ProtocolVcContext,
   IN PCO_CALL_PARAMETERS  CallParameters);
 
 typedef VOID
-(NTAPI *CL_CLOSE_CALL_COMPLETE_HANDLER)(
+(DDKAPI *CL_CLOSE_CALL_COMPLETE_HANDLER)(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  ProtocolVcContext,
   IN NDIS_HANDLE  ProtocolPartyContext  OPTIONAL);
 
 typedef VOID
-(NTAPI *CL_ADD_PARTY_COMPLETE_HANDLER)(
+(DDKAPI *CL_ADD_PARTY_COMPLETE_HANDLER)(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  ProtocolPartyContext,
   IN NDIS_HANDLE  NdisPartyHandle,
   IN PCO_CALL_PARAMETERS  CallParameters);
 
 typedef VOID
-(NTAPI *CL_DROP_PARTY_COMPLETE_HANDLER)(
+(DDKAPI *CL_DROP_PARTY_COMPLETE_HANDLER)(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  ProtocolPartyContext);
 
 typedef NDIS_STATUS
-(NTAPI *CL_INCOMING_CALL_HANDLER)(
+(DDKAPI *CL_INCOMING_CALL_HANDLER)(
   IN NDIS_HANDLE  ProtocolSapContext,
   IN NDIS_HANDLE  ProtocolVcContext,
   IN OUT PCO_CALL_PARAMETERS  CallParameters);
 
 typedef VOID
-(NTAPI *CL_INCOMING_CALL_QOS_CHANGE_HANDLER)(
+(DDKAPI *CL_INCOMING_CALL_QOS_CHANGE_HANDLER)(
   IN NDIS_HANDLE  ProtocolVcContext,
   IN PCO_CALL_PARAMETERS  CallParameters);
 
 typedef VOID
-(NTAPI *CL_INCOMING_CLOSE_CALL_HANDLER)(
+(DDKAPI *CL_INCOMING_CLOSE_CALL_HANDLER)(
   IN NDIS_STATUS  CloseStatus,
   IN NDIS_HANDLE  ProtocolVcContext,
   IN PVOID  CloseData  OPTIONAL,
   IN UINT  Size  OPTIONAL);
 
 typedef VOID
-(NTAPI *CL_INCOMING_DROP_PARTY_HANDLER)(
+(DDKAPI *CL_INCOMING_DROP_PARTY_HANDLER)(
   IN NDIS_STATUS  DropStatus,
   IN NDIS_HANDLE  ProtocolPartyContext,
   IN PVOID  CloseData  OPTIONAL,
   IN UINT  Size  OPTIONAL);
 
 typedef VOID
-(NTAPI *CL_CALL_CONNECTED_HANDLER)(
+(DDKAPI *CL_CALL_CONNECTED_HANDLER)(
   IN NDIS_HANDLE  ProtocolVcContext);
 
 
@@ -1293,64 +1293,64 @@ typedef struct _NDIS_CLIENT_CHARACTERISTICS {
 /* Prototypes for NDIS 3.0 protocol characteristics */
 
 typedef VOID
-(NTAPI *OPEN_ADAPTER_COMPLETE_HANDLER)(
+(DDKAPI *OPEN_ADAPTER_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  ProtocolBindingContext,
   IN NDIS_STATUS  Status,
   IN NDIS_STATUS  OpenErrorStatus);
 
 typedef VOID
-(NTAPI *CLOSE_ADAPTER_COMPLETE_HANDLER)(
+(DDKAPI *CLOSE_ADAPTER_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  ProtocolBindingContext,
   IN NDIS_STATUS  Status);
 
 typedef VOID
-(NTAPI *RESET_COMPLETE_HANDLER)(
+(DDKAPI *RESET_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  ProtocolBindingContext,
   IN NDIS_STATUS  Status);
 
 typedef VOID
-(NTAPI *REQUEST_COMPLETE_HANDLER)(
+(DDKAPI *REQUEST_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  ProtocolBindingContext,
   IN PNDIS_REQUEST  NdisRequest,
   IN NDIS_STATUS  Status);
 
 typedef VOID
-(NTAPI *STATUS_HANDLER)(
+(DDKAPI *STATUS_HANDLER)(
   IN NDIS_HANDLE  ProtocolBindingContext,
   IN NDIS_STATUS  GeneralStatus,
   IN PVOID  StatusBuffer,
   IN UINT  StatusBufferSize);
 
 typedef VOID
-(NTAPI *STATUS_COMPLETE_HANDLER)(
+(DDKAPI *STATUS_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  ProtocolBindingContext);
 
 typedef VOID
-(NTAPI *SEND_COMPLETE_HANDLER)(
+(DDKAPI *SEND_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  ProtocolBindingContext,
   IN PNDIS_PACKET  Packet,
   IN NDIS_STATUS  Status);
 
 typedef VOID
-(NTAPI *WAN_SEND_COMPLETE_HANDLER)(
+(DDKAPI *WAN_SEND_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  ProtocolBindingContext,
   IN PNDIS_WAN_PACKET  Packet,
   IN NDIS_STATUS  Status);
 
 typedef VOID
-(NTAPI *TRANSFER_DATA_COMPLETE_HANDLER)(
+(DDKAPI *TRANSFER_DATA_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  ProtocolBindingContext,
   IN PNDIS_PACKET  Packet,
   IN NDIS_STATUS  Status,
   IN UINT  BytesTransferred);
 
 typedef VOID
-(NTAPI *WAN_TRANSFER_DATA_COMPLETE_HANDLER)(
+(DDKAPI *WAN_TRANSFER_DATA_COMPLETE_HANDLER)(
     VOID);
 
 
 typedef NDIS_STATUS
-(NTAPI *RECEIVE_HANDLER)(
+(DDKAPI *RECEIVE_HANDLER)(
   IN NDIS_HANDLE  ProtocolBindingContext,
   IN NDIS_HANDLE  MacReceiveContext,
   IN PVOID  HeaderBuffer,
@@ -1360,13 +1360,13 @@ typedef NDIS_STATUS
   IN UINT  PacketSize);
 
 typedef NDIS_STATUS
-(NTAPI *WAN_RECEIVE_HANDLER)(
+(DDKAPI *WAN_RECEIVE_HANDLER)(
   IN NDIS_HANDLE  NdisLinkHandle,
   IN PUCHAR  Packet,
   IN ULONG  PacketSize);
 
 typedef VOID
-(NTAPI *RECEIVE_COMPLETE_HANDLER)(
+(DDKAPI *RECEIVE_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  ProtocolBindingContext);
 
 
@@ -1409,12 +1409,12 @@ typedef struct _NDIS30_PROTOCOL_CHARACTERISTICS {
 /* Prototypes for NDIS 4.0 protocol characteristics */
 
 typedef INT
-(NTAPI *RECEIVE_PACKET_HANDLER)(
+(DDKAPI *RECEIVE_PACKET_HANDLER)(
   IN NDIS_HANDLE  ProtocolBindingContext,
   IN PNDIS_PACKET  Packet);
 
 typedef VOID
-(NTAPI *BIND_HANDLER)(
+(DDKAPI *BIND_HANDLER)(
   OUT PNDIS_STATUS  Status,
   IN NDIS_HANDLE  BindContext,
   IN PNDIS_STRING  DeviceName,
@@ -1422,18 +1422,18 @@ typedef VOID
   IN PVOID  SystemSpecific2);
 
 typedef VOID
-(NTAPI *UNBIND_HANDLER)(
+(DDKAPI *UNBIND_HANDLER)(
   OUT PNDIS_STATUS  Status,
   IN NDIS_HANDLE  ProtocolBindingContext,
   IN NDIS_HANDLE  UnbindContext);
 
 typedef NDIS_STATUS
-(NTAPI *PNP_EVENT_HANDLER)(
+(DDKAPI *PNP_EVENT_HANDLER)(
   IN NDIS_HANDLE  ProtocolBindingContext,
   IN PNET_PNP_EVENT  NetPnPEvent);
 
 typedef VOID
-(NTAPI *UNLOAD_PROTOCOL_HANDLER)(
+(DDKAPI *UNLOAD_PROTOCOL_HANDLER)(
   VOID);
 
 
@@ -1468,13 +1468,13 @@ typedef struct _NDIS40_PROTOCOL_CHARACTERISTICS {
 /* Prototypes for NDIS 5.0 protocol characteristics */
 
 typedef VOID
-(NTAPI *CO_SEND_COMPLETE_HANDLER)(
+(DDKAPI *CO_SEND_COMPLETE_HANDLER)(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  ProtocolVcContext,
   IN PNDIS_PACKET  Packet);
 
 typedef VOID
-(NTAPI *CO_STATUS_HANDLER)(
+(DDKAPI *CO_STATUS_HANDLER)(
        IN NDIS_HANDLE  ProtocolBindingContext,
        IN NDIS_HANDLE  ProtocolVcContext  OPTIONAL,
        IN NDIS_STATUS  GeneralStatus,
@@ -1482,13 +1482,13 @@ typedef VOID
        IN UINT  StatusBufferSize);
 
 typedef UINT
-(NTAPI *CO_RECEIVE_PACKET_HANDLER)(
+(DDKAPI *CO_RECEIVE_PACKET_HANDLER)(
   IN NDIS_HANDLE  ProtocolBindingContext,
   IN NDIS_HANDLE  ProtocolVcContext,
   IN PNDIS_PACKET  Packet);
 
 typedef VOID
-(NTAPI *CO_AF_REGISTER_NOTIFY_HANDLER)(
+(DDKAPI *CO_AF_REGISTER_NOTIFY_HANDLER)(
   IN NDIS_HANDLE  ProtocolBindingContext,
   IN PCO_ADDRESS_FAMILY  AddressFamily);
 
@@ -1538,7 +1538,7 @@ typedef struct _NDIS_PROTOCOL_CHARACTERISTICS {
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisAllocateBuffer(
   OUT PNDIS_STATUS  Status,
   OUT PNDIS_BUFFER  *Buffer,
@@ -1549,7 +1549,7 @@ NdisAllocateBuffer(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisAllocateBufferPool(
   OUT PNDIS_STATUS  Status,
   OUT PNDIS_HANDLE  PoolHandle,
@@ -1557,7 +1557,7 @@ NdisAllocateBufferPool(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisAllocatePacket(
   OUT PNDIS_STATUS  Status,
   OUT PNDIS_PACKET  *Packet,
@@ -1565,7 +1565,7 @@ NdisAllocatePacket(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisAllocatePacketPool(
   OUT PNDIS_STATUS  Status,
   OUT PNDIS_HANDLE  PoolHandle,
@@ -1574,7 +1574,7 @@ NdisAllocatePacketPool(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCopyBuffer(
   OUT PNDIS_STATUS  Status,
   OUT PNDIS_BUFFER  *Buffer,
@@ -1585,7 +1585,7 @@ NdisCopyBuffer(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCopyFromPacketToPacket(
   IN PNDIS_PACKET  Destination,
   IN UINT  DestinationOffset,
@@ -1626,7 +1626,7 @@ NdisCopyFromPacketToPacket(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisDprAllocatePacket(
   OUT PNDIS_STATUS  Status,
   OUT PNDIS_PACKET  *Packet,
@@ -1634,7 +1634,7 @@ NdisDprAllocatePacket(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisDprAllocatePacketNonInterlocked(
   OUT PNDIS_STATUS  Status,
   OUT PNDIS_PACKET  *Packet,
@@ -1642,96 +1642,96 @@ NdisDprAllocatePacketNonInterlocked(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisDprFreePacket(
   IN PNDIS_PACKET  Packet);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisDprFreePacketNonInterlocked(
   IN PNDIS_PACKET  Packet);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisFreeBufferPool(
   IN NDIS_HANDLE  PoolHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisFreePacket(
   IN PNDIS_PACKET  Packet);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisFreePacketPool(
   IN NDIS_HANDLE  PoolHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisReturnPackets(
   IN PNDIS_PACKET  *PacketsToReturn,
   IN UINT  NumberOfPackets);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisUnchainBufferAtBack(
   IN OUT PNDIS_PACKET  Packet,
   OUT PNDIS_BUFFER  *Buffer);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisUnchainBufferAtFront(
   IN OUT PNDIS_PACKET  Packet,
   OUT PNDIS_BUFFER  *Buffer);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisAdjustBufferLength(
   IN PNDIS_BUFFER  Buffer,
   IN UINT  Length);
 
 NDISAPI
 ULONG
-NTAPI
+DDKAPI
 NdisBufferLength(
   IN PNDIS_BUFFER  Buffer);
 
 NDISAPI
 PVOID
-NTAPI
+DDKAPI
 NdisBufferVirtualAddress(
   IN PNDIS_BUFFER  Buffer);
 
 NDISAPI
 ULONG
-NTAPI
+DDKAPI
 NDIS_BUFFER_TO_SPAN_PAGES(
   IN PNDIS_BUFFER  Buffer);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisFreeBuffer(
   IN PNDIS_BUFFER  Buffer);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisGetBufferPhysicalArraySize(
   IN PNDIS_BUFFER  Buffer,
   OUT PUINT  ArraySize);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisGetFirstBufferFromPacket(
   IN PNDIS_PACKET  _Packet,
   OUT PNDIS_BUFFER  *_FirstBuffer,
@@ -1741,7 +1741,7 @@ NdisGetFirstBufferFromPacket(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisQueryBuffer(
   IN PNDIS_BUFFER  Buffer,
   OUT PVOID  *VirtualAddress OPTIONAL,
@@ -1749,7 +1749,7 @@ NdisQueryBuffer(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisQueryBufferOffset(
   IN PNDIS_BUFFER  Buffer,
   OUT PUINT  Offset,
@@ -2152,7 +2152,7 @@ NdisQueryPacketLength(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCreateLookaheadBufferFromSharedMemory(
   IN PVOID  pSharedMemory,
   IN UINT  LookaheadLength,
@@ -2160,7 +2160,7 @@ NdisCreateLookaheadBufferFromSharedMemory(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisDestroyLookaheadBufferFromSharedMemory(
   IN PVOID  pLookaheadBuffer);
 
@@ -2236,7 +2236,7 @@ NdisDestroyLookaheadBufferFromSharedMemory(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisAllocateMemory(
   OUT  PVOID  *VirtualAddress,
   IN UINT  Length,
@@ -2245,7 +2245,7 @@ NdisAllocateMemory(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisFreeMemory(
   IN PVOID  VirtualAddress,
   IN UINT  Length,
@@ -2253,7 +2253,7 @@ NdisFreeMemory(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisImmediateReadSharedMemory(
   IN NDIS_HANDLE WrapperConfigurationContext,
   IN ULONG       SharedMemoryAddress,
@@ -2262,7 +2262,7 @@ NdisImmediateReadSharedMemory(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisImmediateWriteSharedMemory(
   IN NDIS_HANDLE WrapperConfigurationContext,
   IN ULONG       SharedMemoryAddress,
@@ -2271,7 +2271,7 @@ NdisImmediateWriteSharedMemory(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMAllocateSharedMemory(
   IN   NDIS_HANDLE  MiniportAdapterHandle,
   IN   ULONG  Length,
@@ -2281,7 +2281,7 @@ NdisMAllocateSharedMemory(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMAllocateSharedMemoryAsync(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN ULONG  Length,
@@ -2299,7 +2299,7 @@ NdisMAllocateSharedMemoryAsync(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisUpdateSharedMemory(
   IN NDIS_HANDLE             NdisAdapterHandle,
   IN ULONG                   Length,
@@ -2413,7 +2413,7 @@ NdisUpdateSharedMemory(
   RtlZeroMemory(Destination, Length)
 
 typedef VOID
-(NTAPI *NDIS_BLOCK_INITIALIZER) (
+(DDKAPI *NDIS_BLOCK_INITIALIZER) (
     IN  PUCHAR  Block,
     IN  SIZE_T  NumberOfBytes
     );
@@ -2422,7 +2422,7 @@ typedef VOID
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisOpenConfiguration(
   OUT  PNDIS_STATUS  Status,
   OUT  PNDIS_HANDLE  ConfigurationHandle,
@@ -2430,7 +2430,7 @@ NdisOpenConfiguration(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisReadNetworkAddress(
   OUT PNDIS_STATUS  Status,
   OUT PVOID  *NetworkAddress,
@@ -2439,7 +2439,7 @@ NdisReadNetworkAddress(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisReadEisaSlotInformation(
   OUT PNDIS_STATUS  Status,
   IN NDIS_HANDLE  WrapperConfigurationContext,
@@ -2448,7 +2448,7 @@ NdisReadEisaSlotInformation(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisReadEisaSlotInformationEx(
   OUT PNDIS_STATUS  Status,
   IN NDIS_HANDLE  WrapperConfigurationContext,
@@ -2458,7 +2458,7 @@ NdisReadEisaSlotInformationEx(
 
 NDISAPI
 ULONG
-NTAPI
+DDKAPI
 NdisReadPciSlotInformation(
   IN NDIS_HANDLE  NdisAdapterHandle,
   IN ULONG  SlotNumber,
@@ -2468,7 +2468,7 @@ NdisReadPciSlotInformation(
 
 NDISAPI
 ULONG
-NTAPI
+DDKAPI
 NdisWritePciSlotInformation(
   IN NDIS_HANDLE  NdisAdapterHandle,
   IN ULONG  SlotNumber,
@@ -2482,7 +2482,7 @@ NdisWritePciSlotInformation(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisAnsiStringToUnicodeString(
   IN OUT PNDIS_STRING  DestinationString,
   IN PNDIS_ANSI_STRING  SourceString);
@@ -2499,21 +2499,21 @@ NdisAnsiStringToUnicodeString(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisInitAnsiString(
   IN OUT PNDIS_ANSI_STRING  DestinationString,
   IN PCSTR  SourceString);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisInitUnicodeString(
   IN OUT PNDIS_STRING  DestinationString,
   IN PCWSTR  SourceString);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisUnicodeStringToAnsiString(
   IN OUT PNDIS_ANSI_STRING  DestinationString,
   IN PNDIS_STRING  SourceString);
@@ -2526,37 +2526,37 @@ NdisUnicodeStringToAnsiString(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisAllocateSpinLock(
   IN PNDIS_SPIN_LOCK  SpinLock);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisFreeSpinLock(
   IN PNDIS_SPIN_LOCK  SpinLock);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisAcquireSpinLock(
   IN PNDIS_SPIN_LOCK  SpinLock);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisReleaseSpinLock(
   IN PNDIS_SPIN_LOCK  SpinLock);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisDprAcquireSpinLock(
   IN PNDIS_SPIN_LOCK  SpinLock);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisDprReleaseSpinLock(
   IN PNDIS_SPIN_LOCK  SpinLock);
 
@@ -2821,13 +2821,13 @@ NdisDprReleaseSpinLock(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCloseConfiguration(
   IN NDIS_HANDLE  ConfigurationHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisReadConfiguration(
   OUT  PNDIS_STATUS  Status,
   OUT  PNDIS_CONFIGURATION_PARAMETER  *ParameterValue,
@@ -2837,7 +2837,7 @@ NdisReadConfiguration(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisWriteConfiguration(
   OUT  PNDIS_STATUS  Status,
   IN NDIS_HANDLE  WrapperConfigurationContext,
@@ -2846,7 +2846,7 @@ NdisWriteConfiguration(
 
 NDISAPI
 VOID
-__cdecl
+DDKCDECLAPI
 NdisWriteErrorLogEntry(
        IN NDIS_HANDLE  NdisAdapterHandle,
        IN NDIS_ERROR_CODE  ErrorCode,
@@ -2862,18 +2862,18 @@ NdisWriteErrorLogEntry(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisGetCurrentSystemTime(
   IN PLARGE_INTEGER  pSystemTime);
 
 NDISAPI
 CCHAR
-NTAPI
+DDKAPI
 NdisSystemProcessorCount(VOID);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisGetCurrentProcessorCpuUsage(
   OUT PULONG  pCpuUsage);
 
@@ -2902,7 +2902,7 @@ NdisGetCurrentProcessorCpuUsage(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMFreeSharedMemory(
        IN NDIS_HANDLE  MiniportAdapterHandle,
        IN ULONG  Length,
@@ -2912,7 +2912,7 @@ NdisMFreeSharedMemory(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMWanIndicateReceive(
        OUT PNDIS_STATUS  Status,
        IN NDIS_HANDLE  MiniportAdapterHandle,
@@ -2922,13 +2922,13 @@ NdisMWanIndicateReceive(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMWanIndicateReceiveComplete(
   IN NDIS_HANDLE  MiniportAdapterHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMWanSendComplete(
        IN NDIS_HANDLE  MiniportAdapterHandle,
        IN PNDIS_WAN_PACKET  Packet,
@@ -2936,7 +2936,7 @@ NdisMWanSendComplete(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisPciAssignResources(
        IN NDIS_HANDLE  NdisMacHandle,
        IN NDIS_HANDLE  NdisWrapperHandle,
@@ -2949,7 +2949,7 @@ NdisPciAssignResources(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisAcquireReadWriteLock(
   IN PNDIS_RW_LOCK  Lock,
   IN BOOLEAN  fWrite,
@@ -2957,7 +2957,7 @@ NdisAcquireReadWriteLock(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisAllocateMemoryWithTag(
   OUT PVOID  *VirtualAddress,
   IN UINT  Length,
@@ -2965,7 +2965,7 @@ NdisAllocateMemoryWithTag(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisAllocatePacketPoolEx(
   OUT PNDIS_STATUS  Status,
   OUT PNDIS_HANDLE  PoolHandle,
@@ -2975,7 +2975,7 @@ NdisAllocatePacketPoolEx(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCompletePnPEvent(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisBindingHandle,
@@ -2983,7 +2983,7 @@ NdisCompletePnPEvent(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisGetCurrentProcessorCounts(
   OUT PULONG  pIdleCount,
   OUT PULONG  pKernelAndUser,
@@ -2991,39 +2991,39 @@ NdisGetCurrentProcessorCounts(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisGetDriverHandle(
   IN PNDIS_HANDLE  NdisBindingHandle,
   OUT PNDIS_HANDLE  NdisDriverHandle);
 
 NDISAPI
 PNDIS_PACKET
-NTAPI
+DDKAPI
 NdisGetReceivedPacket(
   IN PNDIS_HANDLE  NdisBindingHandle,
   IN PNDIS_HANDLE  MacContext);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisGetSystemUpTime(
   OUT PULONG  pSystemUpTime);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisInitializeReadWriteLock(
   IN PNDIS_RW_LOCK  Lock);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMDeregisterDevice(
   IN NDIS_HANDLE  NdisDeviceHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMGetDeviceProperty(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN OUT PDEVICE_OBJECT  *PhysicalDeviceObject  OPTIONAL,
@@ -3034,7 +3034,7 @@ NdisMGetDeviceProperty(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMInitializeScatterGatherDma(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN BOOLEAN  Dma64BitAddresses,
@@ -3042,20 +3042,20 @@ NdisMInitializeScatterGatherDma(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMPromoteMiniport(
   IN NDIS_HANDLE  MiniportAdapterHandle);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMQueryAdapterInstanceName(
   OUT PNDIS_STRING  AdapterInstanceName,
   IN NDIS_HANDLE  MiniportAdapterHandle);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMRegisterDevice(
   IN NDIS_HANDLE  NdisWrapperHandle,
   IN PNDIS_STRING  DeviceName,
@@ -3066,27 +3066,27 @@ NdisMRegisterDevice(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMRegisterUnloadHandler(
   IN NDIS_HANDLE  NdisWrapperHandle,
   IN PDRIVER_UNLOAD  UnloadHandler);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMRemoveMiniport(
   IN NDIS_HANDLE  MiniportAdapterHandle);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMSetMiniportSecondary(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN NDIS_HANDLE  PrimaryMiniportAdapterHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisOpenConfigurationKeyByIndex(
   OUT PNDIS_STATUS  Status,
   IN NDIS_HANDLE  ConfigurationHandle,
@@ -3096,7 +3096,7 @@ NdisOpenConfigurationKeyByIndex(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisOpenConfigurationKeyByName(
   OUT PNDIS_STATUS  Status,
   IN NDIS_HANDLE  ConfigurationHandle,
@@ -3105,20 +3105,20 @@ NdisOpenConfigurationKeyByName(
 
 NDISAPI
 UINT
-NTAPI
+DDKAPI
 NdisPacketPoolUsage(
   IN NDIS_HANDLE  PoolHandle);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisQueryAdapterInstanceName(
   OUT PNDIS_STRING  AdapterInstanceName,
   IN NDIS_HANDLE  NdisBindingHandle);
 
 NDISAPI
 ULONG
-NTAPI
+DDKAPI
 NdisReadPcmciaAttributeMemory(
   IN NDIS_HANDLE  NdisAdapterHandle,
   IN ULONG  Offset,
@@ -3127,14 +3127,14 @@ NdisReadPcmciaAttributeMemory(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisReleaseReadWriteLock(
   IN PNDIS_RW_LOCK  Lock,
   IN PLOCK_STATE  LockState);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisWriteEventLogEntry(
   IN PVOID  LogHandle,
   IN NDIS_STATUS  EventCode,
@@ -3146,7 +3146,7 @@ NdisWriteEventLogEntry(
 
 NDISAPI
 ULONG
-NTAPI
+DDKAPI
 NdisWritePcmciaAttributeMemory(
   IN NDIS_HANDLE  NdisAdapterHandle,
   IN ULONG  Offset,
@@ -3158,7 +3158,7 @@ NdisWritePcmciaAttributeMemory(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisClAddParty(
   IN NDIS_HANDLE  NdisVcHandle,
   IN NDIS_HANDLE  ProtocolPartyContext,
@@ -3167,13 +3167,13 @@ NdisClAddParty(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisClCloseAddressFamily(
   IN NDIS_HANDLE  NdisAfHandle);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisClCloseCall(
   IN NDIS_HANDLE NdisVcHandle,
   IN NDIS_HANDLE NdisPartyHandle  OPTIONAL,
@@ -3182,13 +3182,13 @@ NdisClCloseCall(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisClDeregisterSap(
   IN NDIS_HANDLE  NdisSapHandle);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisClDropParty(
   IN NDIS_HANDLE  NdisPartyHandle,
   IN PVOID  Buffer  OPTIONAL,
@@ -3196,7 +3196,7 @@ NdisClDropParty(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisClIncomingCallComplete(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisVcHandle,
@@ -3204,7 +3204,7 @@ NdisClIncomingCallComplete(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisClMakeCall(
   IN NDIS_HANDLE  NdisVcHandle,
   IN OUT PCO_CALL_PARAMETERS  CallParameters,
@@ -3213,7 +3213,7 @@ NdisClMakeCall(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisClModifyCallQoS(
   IN NDIS_HANDLE  NdisVcHandle,
   IN PCO_CALL_PARAMETERS  CallParameters);
@@ -3221,7 +3221,7 @@ NdisClModifyCallQoS(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisClOpenAddressFamily(
   IN NDIS_HANDLE  NdisBindingHandle,
   IN PCO_ADDRESS_FAMILY  AddressFamily,
@@ -3232,7 +3232,7 @@ NdisClOpenAddressFamily(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisClRegisterSap(
   IN NDIS_HANDLE  NdisAfHandle,
   IN NDIS_HANDLE  ProtocolSapContext,
@@ -3244,14 +3244,14 @@ NdisClRegisterSap(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisCmActivateVc(
   IN NDIS_HANDLE  NdisVcHandle,
   IN OUT PCO_CALL_PARAMETERS  CallParameters);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCmAddPartyComplete(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisPartyHandle,
@@ -3260,14 +3260,14 @@ NdisCmAddPartyComplete(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCmCloseAddressFamilyComplete(
   IN NDIS_STATUS Status,
   IN NDIS_HANDLE NdisAfHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCmCloseCallComplete(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisVcHandle,
@@ -3275,26 +3275,26 @@ NdisCmCloseCallComplete(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisCmDeactivateVc(
   IN NDIS_HANDLE  NdisVcHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCmDeregisterSapComplete(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisSapHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCmDispatchCallConnected(
   IN NDIS_HANDLE  NdisVcHandle);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisCmDispatchIncomingCall(
   IN NDIS_HANDLE  NdisSapHandle,
   IN NDIS_HANDLE  NdisVcHandle,
@@ -3302,14 +3302,14 @@ NdisCmDispatchIncomingCall(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCmDispatchIncomingCallQoSChange(
   IN NDIS_HANDLE  NdisVcHandle,
   IN PCO_CALL_PARAMETERS  CallParameters);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCmDispatchIncomingCloseCall(
   IN NDIS_STATUS  CloseStatus,
   IN NDIS_HANDLE  NdisVcHandle,
@@ -3318,7 +3318,7 @@ NdisCmDispatchIncomingCloseCall(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCmDispatchIncomingDropParty(
   IN NDIS_STATUS  DropStatus,
   IN NDIS_HANDLE  NdisPartyHandle,
@@ -3327,14 +3327,14 @@ NdisCmDispatchIncomingDropParty(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCmDropPartyComplete(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisPartyHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCmMakeCallComplete(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisVcHandle,
@@ -3344,7 +3344,7 @@ NdisCmMakeCallComplete(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCmModifyCallQoSComplete(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisVcHandle,
@@ -3352,7 +3352,7 @@ NdisCmModifyCallQoSComplete(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCmOpenAddressFamilyComplete(
   IN NDIS_STATUS Status,
   IN NDIS_HANDLE NdisAfHandle,
@@ -3360,7 +3360,7 @@ NdisCmOpenAddressFamilyComplete(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisCmRegisterAddressFamily(
   IN NDIS_HANDLE  NdisBindingHandle,
   IN PCO_ADDRESS_FAMILY  AddressFamily,
@@ -3369,7 +3369,7 @@ NdisCmRegisterAddressFamily(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCmRegisterSapComplete(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisSapHandle,
@@ -3378,14 +3378,14 @@ NdisCmRegisterSapComplete(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMCmActivateVc(
   IN NDIS_HANDLE  NdisVcHandle,
   IN PCO_CALL_PARAMETERS  CallParameters);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMCmCreateVc(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN NDIS_HANDLE  NdisAfHandle,
@@ -3394,19 +3394,19 @@ NdisMCmCreateVc(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMCmDeactivateVc(
   IN NDIS_HANDLE  NdisVcHandle);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMCmDeleteVc(
   IN NDIS_HANDLE  NdisVcHandle);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMCmRegisterAddressFamily(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN PCO_ADDRESS_FAMILY  AddressFamily,
@@ -3415,7 +3415,7 @@ NdisMCmRegisterAddressFamily(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMCmRequest(
   IN NDIS_HANDLE  NdisAfHandle,
   IN NDIS_HANDLE  NdisVcHandle  OPTIONAL,
@@ -3427,7 +3427,7 @@ NdisMCmRequest(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisCoCreateVc(
   IN NDIS_HANDLE  NdisBindingHandle,
   IN NDIS_HANDLE  NdisAfHandle  OPTIONAL,
@@ -3436,13 +3436,13 @@ NdisCoCreateVc(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisCoDeleteVc(
   IN NDIS_HANDLE  NdisVcHandle);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisCoRequest(
   IN NDIS_HANDLE  NdisBindingHandle,
   IN NDIS_HANDLE  NdisAfHandle  OPTIONAL,
@@ -3452,7 +3452,7 @@ NdisCoRequest(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCoRequestComplete(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisAfHandle,
@@ -3462,7 +3462,7 @@ NdisCoRequestComplete(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCoSendPackets(
   IN NDIS_HANDLE  NdisVcHandle,
   IN PPNDIS_PACKET  PacketArray,
@@ -3470,7 +3470,7 @@ NdisCoSendPackets(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMCoActivateVcComplete(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisVcHandle,
@@ -3478,14 +3478,14 @@ NdisMCoActivateVcComplete(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMCoDeactivateVcComplete(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisVcHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMCoIndicateReceivePacket(
   IN NDIS_HANDLE  NdisVcHandle,
   IN PPNDIS_PACKET  PacketArray,
@@ -3493,7 +3493,7 @@ NdisMCoIndicateReceivePacket(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMCoIndicateStatus(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN NDIS_HANDLE  NdisVcHandle  OPTIONAL,
@@ -3503,13 +3503,13 @@ NdisMCoIndicateStatus(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMCoReceiveComplete(
   IN NDIS_HANDLE  MiniportAdapterHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMCoRequestComplete(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  MiniportAdapterHandle,
@@ -3517,7 +3517,7 @@ NdisMCoRequestComplete(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMCoSendComplete(
   IN NDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisVcHandle,
@@ -3528,53 +3528,53 @@ NdisMCoSendComplete(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisIMAssociateMiniport(
   IN NDIS_HANDLE  DriverHandle,
   IN NDIS_HANDLE  ProtocolHandle);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisIMCancelInitializeDeviceInstance(
   IN NDIS_HANDLE  DriverHandle,
   IN PNDIS_STRING  DeviceInstance);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisIMCopySendCompletePerPacketInfo(
   IN PNDIS_PACKET  DstPacket,
   IN PNDIS_PACKET  SrcPacket);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisIMCopySendPerPacketInfo(
   IN PNDIS_PACKET  DstPacket,
   IN PNDIS_PACKET  SrcPacket);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisIMDeregisterLayeredMiniport(
   IN NDIS_HANDLE  DriverHandle);
 
 NDISAPI
 NDIS_HANDLE
-NTAPI
+DDKAPI
 NdisIMGetBindingContext(
   IN NDIS_HANDLE  NdisBindingHandle);
 
 NDISAPI
 NDIS_HANDLE
-NTAPI
+DDKAPI
 NdisIMGetDeviceContext(
   IN NDIS_HANDLE  MiniportAdapterHandle);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisIMInitializeDeviceInstanceEx(
   IN NDIS_HANDLE  DriverHandle,
   IN PNDIS_STRING  DriverInstance,
@@ -3582,14 +3582,14 @@ NdisIMInitializeDeviceInstanceEx(
 
 NDISAPI
 PSINGLE_LIST_ENTRY
-NTAPI
+DDKAPI
 NdisInterlockedPopEntrySList(
   IN PSLIST_HEADER  ListHead,
   IN PKSPIN_LOCK  Lock);
 
 NDISAPI
 PSINGLE_LIST_ENTRY
-NTAPI
+DDKAPI
 NdisInterlockedPushEntrySList(
   IN PSLIST_HEADER  ListHead,
   IN PSINGLE_LIST_ENTRY  ListEntry,
@@ -3597,7 +3597,7 @@ NdisInterlockedPushEntrySList(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisQueryBufferSafe(
   IN PNDIS_BUFFER  Buffer,
   OUT PVOID  *VirtualAddress  OPTIONAL,
@@ -3607,27 +3607,27 @@ NdisQueryBufferSafe(
 /* Prototypes for NDIS_MINIPORT_CHARACTERISTICS */
 
 typedef BOOLEAN
-(NTAPI *W_CHECK_FOR_HANG_HANDLER)(
+(DDKAPI *W_CHECK_FOR_HANG_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext);
 
 typedef VOID
-(NTAPI *W_DISABLE_INTERRUPT_HANDLER)(
+(DDKAPI *W_DISABLE_INTERRUPT_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext);
 
 typedef VOID
-(NTAPI *W_ENABLE_INTERRUPT_HANDLER)(
+(DDKAPI *W_ENABLE_INTERRUPT_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext);
 
 typedef VOID
-(NTAPI *W_HALT_HANDLER)(
+(DDKAPI *W_HALT_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext);
 
 typedef VOID
-(NTAPI *W_HANDLE_INTERRUPT_HANDLER)(
+(DDKAPI *W_HANDLE_INTERRUPT_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext);
 
 typedef NDIS_STATUS
-(NTAPI *W_INITIALIZE_HANDLER)(
+(DDKAPI *W_INITIALIZE_HANDLER)(
   OUT PNDIS_STATUS  OpenErrorStatus,
   OUT PUINT  SelectedMediumIndex,
   IN PNDIS_MEDIUM  MediumArray,
@@ -3636,13 +3636,13 @@ typedef NDIS_STATUS
   IN NDIS_HANDLE  WrapperConfigurationContext);
 
 typedef VOID
-(NTAPI *W_ISR_HANDLER)(
+(DDKAPI *W_ISR_HANDLER)(
   OUT PBOOLEAN  InterruptRecognized,
   OUT PBOOLEAN  QueueMiniportHandleInterrupt,
   IN   NDIS_HANDLE  MiniportAdapterContext);
 
 typedef NDIS_STATUS
-(NTAPI *W_QUERY_INFORMATION_HANDLER)(
+(DDKAPI *W_QUERY_INFORMATION_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext,
   IN NDIS_OID  Oid,
   IN PVOID  InformationBuffer,
@@ -3651,30 +3651,30 @@ typedef NDIS_STATUS
   OUT PULONG  BytesNeeded);
 
 typedef NDIS_STATUS
-(NTAPI *W_RECONFIGURE_HANDLER)(
+(DDKAPI *W_RECONFIGURE_HANDLER)(
   OUT PNDIS_STATUS  OpenErrorStatus,
   IN NDIS_HANDLE  MiniportAdapterContext,
   IN NDIS_HANDLE       WrapperConfigurationContext);
 
 typedef NDIS_STATUS
-(NTAPI *W_RESET_HANDLER)(
+(DDKAPI *W_RESET_HANDLER)(
   OUT PBOOLEAN  AddressingReset,
   IN NDIS_HANDLE  MiniportAdapterContext);
 
 typedef NDIS_STATUS
-(NTAPI *W_SEND_HANDLER)(
+(DDKAPI *W_SEND_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext,
   IN PNDIS_PACKET  Packet,
   IN UINT  Flags);
 
 typedef NDIS_STATUS
-(NTAPI *WM_SEND_HANDLER)(
+(DDKAPI *WM_SEND_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext,
   IN NDIS_HANDLE  NdisLinkHandle,
   IN PNDIS_WAN_PACKET  Packet);
 
 typedef NDIS_STATUS
-(NTAPI *W_SET_INFORMATION_HANDLER)(
+(DDKAPI *W_SET_INFORMATION_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext,
   IN NDIS_OID  Oid,
   IN PVOID  InformationBuffer,
@@ -3683,7 +3683,7 @@ typedef NDIS_STATUS
   OUT PULONG  BytesNeeded);
 
 typedef NDIS_STATUS
-(NTAPI *W_TRANSFER_DATA_HANDLER)(
+(DDKAPI *W_TRANSFER_DATA_HANDLER)(
   OUT PNDIS_PACKET  Packet,
   OUT PUINT  BytesTransferred,
   IN NDIS_HANDLE  MiniportAdapterContext,
@@ -3692,7 +3692,7 @@ typedef NDIS_STATUS
   IN UINT  BytesToTransfer);
 
 typedef NDIS_STATUS
-(NTAPI *WM_TRANSFER_DATA_HANDLER)(
+(DDKAPI *WM_TRANSFER_DATA_HANDLER)(
   VOID);
 
 
@@ -3724,18 +3724,18 @@ typedef struct _NDIS30_MINIPORT_CHARACTERISTICS {
 /* Extensions for NDIS 4.0 miniports */
 
 typedef VOID
-(NTAPI *W_SEND_PACKETS_HANDLER)(
+(DDKAPI *W_SEND_PACKETS_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext,
   IN PPNDIS_PACKET  PacketArray,
   IN UINT  NumberOfPackets);
 
 typedef VOID
-(NTAPI *W_RETURN_PACKET_HANDLER)(
+(DDKAPI *W_RETURN_PACKET_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext,
   IN PNDIS_PACKET  Packet);
 
 typedef VOID
-(NTAPI *W_ALLOCATE_COMPLETE_HANDLER)(
+(DDKAPI *W_ALLOCATE_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext,
   IN PVOID  VirtualAddress,
   IN PNDIS_PHYSICAL_ADDRESS  PhysicalAddress,
@@ -3768,32 +3768,32 @@ typedef struct _NDIS40_MINIPORT_CHARACTERISTICS {
 /* Extensions for NDIS 5.0 miniports */
 
 typedef NDIS_STATUS
-(NTAPI *W_CO_CREATE_VC_HANDLER)(
+(DDKAPI *W_CO_CREATE_VC_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext,
   IN NDIS_HANDLE  NdisVcHandle,
   OUT PNDIS_HANDLE  MiniportVcContext);
 
 typedef NDIS_STATUS
-(NTAPI *W_CO_DELETE_VC_HANDLER)(
+(DDKAPI *W_CO_DELETE_VC_HANDLER)(
   IN NDIS_HANDLE  MiniportVcContext);
 
 typedef NDIS_STATUS
-(NTAPI *W_CO_ACTIVATE_VC_HANDLER)(
+(DDKAPI *W_CO_ACTIVATE_VC_HANDLER)(
   IN NDIS_HANDLE  MiniportVcContext,
   IN OUT PCO_CALL_PARAMETERS  CallParameters);
 
 typedef NDIS_STATUS
-(NTAPI *W_CO_DEACTIVATE_VC_HANDLER)(
+(DDKAPI *W_CO_DEACTIVATE_VC_HANDLER)(
   IN NDIS_HANDLE  MiniportVcContext);
 
 typedef VOID
-(NTAPI *W_CO_SEND_PACKETS_HANDLER)(
+(DDKAPI *W_CO_SEND_PACKETS_HANDLER)(
   IN NDIS_HANDLE  MiniportVcContext,
   IN PPNDIS_PACKET  PacketArray,
   IN UINT  NumberOfPackets);
 
 typedef NDIS_STATUS
-(NTAPI *W_CO_REQUEST_HANDLER)(
+(DDKAPI *W_CO_REQUEST_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext,
   IN NDIS_HANDLE  MiniportVcContext  OPTIONAL,
   IN OUT PNDIS_REQUEST  NdisRequest);
@@ -3830,19 +3830,19 @@ typedef struct _NDIS50_MINIPORT_CHARACTERISTICS {
 /* Extensions for NDIS 5.1 miniports */
 
 typedef VOID
-(NTAPI *W_CANCEL_SEND_PACKETS_HANDLER)(
+(DDKAPI *W_CANCEL_SEND_PACKETS_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext,
   IN PVOID  CancelId);
 
 typedef VOID
-(NTAPI *W_PNP_EVENT_NOTIFY_HANDLER)(
+(DDKAPI *W_PNP_EVENT_NOTIFY_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext,
   IN NDIS_DEVICE_PNP_EVENT  PnPEvent,
   IN PVOID  InformationBuffer,
   IN ULONG  InformationBufferLength);
 
 typedef VOID
-(NTAPI *W_MINIPORT_SHUTDOWN_HANDLER)(
+(DDKAPI *W_MINIPORT_SHUTDOWN_HANDLER)(
   IN PVOID  ShutdownContext);
 
 #ifdef __cplusplus
@@ -3887,12 +3887,12 @@ typedef struct _NDIS_MINIPORT_CHARACTERISTICS {
 
 
 typedef NDIS_STATUS
-(NTAPI *SEND_HANDLER)(
+(DDKAPI *SEND_HANDLER)(
   IN NDIS_HANDLE  MacBindingHandle,
   IN PNDIS_PACKET  Packet);
 
 typedef NDIS_STATUS
-(NTAPI *TRANSFER_DATA_HANDLER)(
+(DDKAPI *TRANSFER_DATA_HANDLER)(
   IN NDIS_HANDLE  MacBindingHandle,
   IN NDIS_HANDLE  MacReceiveContext,
   IN UINT  ByteOffset,
@@ -3901,11 +3901,11 @@ typedef NDIS_STATUS
   OUT PUINT  BytesTransferred);
 
 typedef NDIS_STATUS
-(NTAPI *RESET_HANDLER)(
+(DDKAPI *RESET_HANDLER)(
   IN NDIS_HANDLE  MacBindingHandle);
 
 typedef NDIS_STATUS
-(NTAPI *REQUEST_HANDLER)(
+(DDKAPI *REQUEST_HANDLER)(
   IN NDIS_HANDLE   MacBindingHandle,
   IN PNDIS_REQUEST   NdisRequest);
 
@@ -3914,11 +3914,11 @@ typedef NDIS_STATUS
 /* Structures available only to full MAC drivers */
 
 typedef BOOLEAN
-(NTAPI *PNDIS_INTERRUPT_SERVICE)(
+(DDKAPI *PNDIS_INTERRUPT_SERVICE)(
   IN PVOID  InterruptContext);
 
 typedef VOID
-(NTAPI *PNDIS_DEFERRED_PROCESSING)(
+(DDKAPI *PNDIS_DEFERRED_PROCESSING)(
   IN PVOID  SystemSpecific1,
   IN PVOID  InterruptContext,
   IN PVOID  SystemSpecific2,
@@ -4012,11 +4012,11 @@ typedef struct _NDIS_BIND_PATHS {
 
 
 typedef VOID
-(NTAPI *ETH_RCV_COMPLETE_HANDLER)(
+(DDKAPI *ETH_RCV_COMPLETE_HANDLER)(
   IN PETH_FILTER  Filter);
 
 typedef VOID
-(NTAPI *ETH_RCV_INDICATE_HANDLER)(
+(DDKAPI *ETH_RCV_INDICATE_HANDLER)(
   IN PETH_FILTER  Filter,
   IN NDIS_HANDLE  MacReceiveContext,
   IN PCHAR  Address,
@@ -4027,11 +4027,11 @@ typedef VOID
   IN UINT  PacketSize);
 
 typedef VOID
-(NTAPI *FDDI_RCV_COMPLETE_HANDLER)(
+(DDKAPI *FDDI_RCV_COMPLETE_HANDLER)(
   IN PFDDI_FILTER  Filter);
 
 typedef VOID
-(NTAPI *FDDI_RCV_INDICATE_HANDLER)(
+(DDKAPI *FDDI_RCV_INDICATE_HANDLER)(
   IN PFDDI_FILTER  Filter,
   IN NDIS_HANDLE  MacReceiveContext,
   IN PCHAR  Address,
@@ -4043,17 +4043,17 @@ typedef VOID
   IN UINT  PacketSize);
 
 typedef VOID
-(NTAPI *FILTER_PACKET_INDICATION_HANDLER)(
+(DDKAPI *FILTER_PACKET_INDICATION_HANDLER)(
   IN NDIS_HANDLE  Miniport,
   IN PPNDIS_PACKET  PacketArray,
   IN UINT  NumberOfPackets);
 
 typedef VOID
-(NTAPI *TR_RCV_COMPLETE_HANDLER)(
+(DDKAPI *TR_RCV_COMPLETE_HANDLER)(
   IN PTR_FILTER  Filter);
 
 typedef VOID
-(NTAPI *TR_RCV_INDICATE_HANDLER)(
+(DDKAPI *TR_RCV_INDICATE_HANDLER)(
   IN PTR_FILTER  Filter,
   IN NDIS_HANDLE  MacReceiveContext,
   IN PVOID  HeaderBuffer,
@@ -4063,12 +4063,12 @@ typedef VOID
   IN UINT  PacketSize);
 
 typedef VOID
-(NTAPI *WAN_RCV_COMPLETE_HANDLER)(
+(DDKAPI *WAN_RCV_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN NDIS_HANDLE  NdisLinkContext);
 
 typedef VOID
-(NTAPI *WAN_RCV_HANDLER)(
+(DDKAPI *WAN_RCV_HANDLER)(
   OUT PNDIS_STATUS  Status,
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN NDIS_HANDLE  NdisLinkContext,
@@ -4094,24 +4094,24 @@ typedef NDIS_STATUS
   IN PVOID  WorkItemContext);
 
 typedef VOID
-(NTAPI *NDIS_M_REQ_COMPLETE_HANDLER)(
+(DDKAPI *NDIS_M_REQ_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN NDIS_STATUS  Status);
 
 typedef VOID
-(NTAPI *NDIS_M_RESET_COMPLETE_HANDLER)(
+(DDKAPI *NDIS_M_RESET_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN NDIS_STATUS  Status,
   IN BOOLEAN  AddressingReset);
 
 typedef VOID
-(NTAPI *NDIS_M_SEND_COMPLETE_HANDLER)(
+(DDKAPI *NDIS_M_SEND_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN PNDIS_PACKET  Packet,
   IN NDIS_STATUS  Status);
 
 typedef VOID
-(NTAPI *NDIS_M_SEND_RESOURCES_HANDLER)(
+(DDKAPI *NDIS_M_SEND_RESOURCES_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterHandle);
 
 typedef BOOLEAN
@@ -4119,24 +4119,24 @@ typedef BOOLEAN
   IN PNDIS_MINIPORT_BLOCK  Miniport);
 
 typedef VOID
-(NTAPI *NDIS_M_STATUS_HANDLER)(
+(DDKAPI *NDIS_M_STATUS_HANDLER)(
   IN NDIS_HANDLE  MiniportHandle,
   IN NDIS_STATUS  GeneralStatus,
   IN PVOID  StatusBuffer,
   IN UINT  StatusBufferSize);
 
 typedef VOID
-(NTAPI *NDIS_M_STS_COMPLETE_HANDLER)(
+(DDKAPI *NDIS_M_STS_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterHandle);
 
 typedef VOID
-(NTAPI *NDIS_M_TD_COMPLETE_HANDLER)(
+(DDKAPI *NDIS_M_TD_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN PNDIS_PACKET  Packet,
   IN NDIS_STATUS  Status,
   IN UINT  BytesTransferred);
 
-typedef VOID (NTAPI *NDIS_WM_SEND_COMPLETE_HANDLER)(
+typedef VOID (DDKAPI *NDIS_WM_SEND_COMPLETE_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN PVOID  Packet,
   IN NDIS_STATUS  Status);
@@ -4376,14 +4376,14 @@ struct _NDIS_MINIPORT_BLOCK {
 
 /* Handler prototypes for NDIS_OPEN_BLOCK */
 
-typedef NDIS_STATUS (NTAPI *WAN_SEND_HANDLER)(
+typedef NDIS_STATUS (DDKAPI *WAN_SEND_HANDLER)(
   IN NDIS_HANDLE  MacBindingHandle,
   IN NDIS_HANDLE  LinkHandle,
   IN PVOID  Packet);
 
 /* NDIS 4.0 extension */
 
-typedef VOID (NTAPI *SEND_PACKETS_HANDLER)(
+typedef VOID (DDKAPI *SEND_PACKETS_HANDLER)(
   IN NDIS_HANDLE  MiniportAdapterContext,
   IN PPNDIS_PACKET  PacketArray,
   IN UINT  NumberOfPackets);
@@ -4466,7 +4466,7 @@ struct _NDIS_OPEN_BLOCK
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisInitializeWrapper(
   OUT PNDIS_HANDLE  NdisWrapperHandle,
   IN PVOID  SystemSpecific1,
@@ -4475,7 +4475,7 @@ NdisInitializeWrapper(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMAllocateMapRegisters(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN UINT  DmaChannel,
@@ -4521,13 +4521,13 @@ NdisMAllocateMapRegisters(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMCloseLog(
   IN NDIS_HANDLE  LogHandle);
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMCreateLog(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN UINT  Size,
@@ -4535,19 +4535,19 @@ NdisMCreateLog(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMDeregisterAdapterShutdownHandler(
   IN NDIS_HANDLE  MiniportHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMDeregisterInterrupt(
   IN PNDIS_MINIPORT_INTERRUPT  Interrupt);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMDeregisterIoPortRange(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN UINT  InitialPort,
@@ -4643,13 +4643,13 @@ NdisMDeregisterIoPortRange(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMFlushLog(
   IN NDIS_HANDLE  LogHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMFreeMapRegisters(
   IN NDIS_HANDLE  MiniportAdapterHandle);
 
@@ -4708,7 +4708,7 @@ NdisMFreeMapRegisters(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMMapIoSpace(
   OUT PVOID  *VirtualAddress,
   IN NDIS_HANDLE  MiniportAdapterHandle,
@@ -4726,7 +4726,7 @@ NdisMMapIoSpace(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMRegisterAdapterShutdownHandler(
   IN NDIS_HANDLE  MiniportHandle,
   IN PVOID  ShutdownContext,
@@ -4734,7 +4734,7 @@ NdisMRegisterAdapterShutdownHandler(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMRegisterInterrupt(
   OUT PNDIS_MINIPORT_INTERRUPT  Interrupt,
   IN NDIS_HANDLE  MiniportAdapterHandle,
@@ -4746,7 +4746,7 @@ NdisMRegisterInterrupt(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMRegisterIoPortRange(
   OUT PVOID  *PortOffset,
   IN NDIS_HANDLE  MiniportAdapterHandle,
@@ -4755,7 +4755,7 @@ NdisMRegisterIoPortRange(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMRegisterMiniport(
   IN NDIS_HANDLE  NdisWrapperHandle,
   IN PNDIS_MINIPORT_CHARACTERISTICS  MiniportCharacteristics,
@@ -4763,14 +4763,14 @@ NdisMRegisterMiniport(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMSetTimer(
   IN PNDIS_MINIPORT_TIMER  Timer,
   IN UINT  MillisecondsToDelay);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMInitializeTimer(
   IN OUT PNDIS_MINIPORT_TIMER Timer,
   IN NDIS_HANDLE MiniportAdapterHandle,
@@ -4779,14 +4779,14 @@ NdisMInitializeTimer(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMSetPeriodicTimer(
   IN PNDIS_MINIPORT_TIMER  Timer,
   IN UINT  MillisecondPeriod);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMCancelTimer(
   IN PNDIS_MINIPORT_TIMER  Timer,
   OUT PBOOLEAN  TimerCancelled);
@@ -4874,7 +4874,7 @@ NdisMCancelTimer(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMSetAttributesEx(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN NDIS_HANDLE  MiniportAdapterContext,
@@ -4895,13 +4895,13 @@ NdisMSetAttributesEx(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMSleep(
   IN ULONG  MicrosecondsToSleep);
 
 NDISAPI
 BOOLEAN
-NTAPI
+DDKAPI
 NdisMSynchronizeWithInterrupt(
   IN PNDIS_MINIPORT_INTERRUPT  Interrupt,
   IN PVOID  SynchronizeFunction,
@@ -4950,7 +4950,7 @@ NdisMSynchronizeWithInterrupt(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisMWriteLogData(
   IN NDIS_HANDLE  LogHandle,
   IN PVOID  LogBuffer,
@@ -4958,7 +4958,7 @@ NdisMWriteLogData(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMQueryAdapterResources(
   OUT PNDIS_STATUS  Status,
   IN NDIS_HANDLE  WrapperConfigurationContext,
@@ -4967,14 +4967,14 @@ NdisMQueryAdapterResources(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisTerminateWrapper(
   IN NDIS_HANDLE  NdisWrapperHandle,
   IN PVOID  SystemSpecific);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisMUnmapIoSpace(
   IN NDIS_HANDLE  MiniportAdapterHandle,
   IN PVOID  VirtualAddress,
@@ -4986,25 +4986,25 @@ NdisMUnmapIoSpace(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisInitializeEvent(
   IN PNDIS_EVENT  Event);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisSetEvent(
   IN PNDIS_EVENT  Event);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisResetEvent(
   IN PNDIS_EVENT  Event);
 
 NDISAPI
 BOOLEAN
-NTAPI
+DDKAPI
 NdisWaitEvent(
   IN PNDIS_EVENT  Event,
   IN UINT  Timeout);
@@ -5013,7 +5013,7 @@ NdisWaitEvent(
 
 /* NDIS intermediate miniport structures */
 
-typedef VOID (NTAPI *W_MINIPORT_CALLBACK)(
+typedef VOID (DDKAPI *W_MINIPORT_CALLBACK)(
   IN NDIS_HANDLE  MiniportAdapterContext,
   IN PVOID  CallbackContext);
 
@@ -5023,7 +5023,7 @@ typedef VOID (NTAPI *W_MINIPORT_CALLBACK)(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisIMDeInitializeDeviceInstance(
   IN NDIS_HANDLE NdisMiniportHandle);
 
@@ -5038,7 +5038,7 @@ NdisIMDeInitializeDeviceInstance(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisIMRegisterLayeredMiniport(
   IN NDIS_HANDLE  NdisWrapperHandle,
   IN PNDIS_MINIPORT_CHARACTERISTICS  MiniportCharacteristics,
@@ -5050,13 +5050,13 @@ NdisIMRegisterLayeredMiniport(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisFreeDmaChannel(
   IN PNDIS_HANDLE  NdisDmaHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisSetupDmaTransfer(
   OUT PNDIS_STATUS  Status,
   IN PNDIS_HANDLE  NdisDmaHandle,
@@ -5067,7 +5067,7 @@ NdisSetupDmaTransfer(
 
 NDISAPI
 NTSTATUS
-NTAPI
+DDKAPI
 NdisUpcaseUnicodeString(
   OUT PUNICODE_STRING  DestinationString,
   IN PUNICODE_STRING  SourceString);
@@ -5077,7 +5077,7 @@ NdisUpcaseUnicodeString(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisRequest(
   OUT PNDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisBindingHandle,
@@ -5085,14 +5085,14 @@ NdisRequest(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisReset(
   OUT PNDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisBindingHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisSend(
   OUT PNDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisBindingHandle,
@@ -5100,7 +5100,7 @@ NdisSend(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisSendPackets(
   IN NDIS_HANDLE  NdisBindingHandle,
   IN PPNDIS_PACKET  PacketArray,
@@ -5108,7 +5108,7 @@ NdisSendPackets(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisTransferData(
   OUT PNDIS_STATUS        Status,
   IN NDIS_HANDLE  NdisBindingHandle,
@@ -5120,14 +5120,14 @@ NdisTransferData(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCloseAdapter(
   OUT PNDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisBindingHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCompleteBindAdapter(
   IN NDIS_HANDLE  BindAdapterContext,
   IN NDIS_STATUS  Status,
@@ -5135,21 +5135,21 @@ NdisCompleteBindAdapter(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisCompleteUnbindAdapter(
   IN NDIS_HANDLE  UnbindAdapterContext,
   IN NDIS_STATUS  Status);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisDeregisterProtocol(
   OUT PNDIS_STATUS  Status,
   IN NDIS_HANDLE  NdisProtocolHandle);
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisOpenAdapter(
   OUT PNDIS_STATUS  Status,
   OUT PNDIS_STATUS  OpenErrorStatus,
@@ -5165,7 +5165,7 @@ NdisOpenAdapter(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisOpenProtocolConfiguration(
   OUT PNDIS_STATUS  Status,
   OUT PNDIS_HANDLE  ConfigurationHandle,
@@ -5173,7 +5173,7 @@ NdisOpenProtocolConfiguration(
 
 NDISAPI
 VOID
-NTAPI
+DDKAPI
 NdisRegisterProtocol(
   OUT PNDIS_STATUS  Status,
   OUT PNDIS_HANDLE  NdisProtocolHandle,
@@ -5182,7 +5182,7 @@ NdisRegisterProtocol(
 
 NDISAPI
 NDIS_STATUS
-NTAPI
+DDKAPI
 NdisScheduleWorkItem(
   IN  PNDIS_WORK_ITEM WorkItem);
 
@@ -5201,20 +5201,20 @@ typedef NDIS_STATUS (*OPEN_ADAPTER_HANDLER)(
   IN UINT  OpenOptions,
   IN PSTRING  AddressingInformation  OPTIONAL);
 
-typedef NDIS_STATUS (NTAPI *CLOSE_ADAPTER_HANDLER)(
+typedef NDIS_STATUS (DDKAPI *CLOSE_ADAPTER_HANDLER)(
   IN NDIS_HANDLE  MacBindingHandle);
 
-typedef NDIS_STATUS (NTAPI *WAN_TRANSFER_DATA_HANDLER)(
+typedef NDIS_STATUS (DDKAPI *WAN_TRANSFER_DATA_HANDLER)(
   VOID);
 
-typedef NDIS_STATUS (NTAPI *QUERY_GLOBAL_STATISTICS_HANDLER)(
+typedef NDIS_STATUS (DDKAPI *QUERY_GLOBAL_STATISTICS_HANDLER)(
   IN NDIS_HANDLE  MacAdapterContext,
   IN PNDIS_REQUEST  NdisRequest);
 
-typedef VOID (NTAPI *UNLOAD_MAC_HANDLER)(
+typedef VOID (DDKAPI *UNLOAD_MAC_HANDLER)(
   IN NDIS_HANDLE  MacMacContext);
 
-typedef NDIS_STATUS (NTAPI *ADD_ADAPTER_HANDLER)(
+typedef NDIS_STATUS (DDKAPI *ADD_ADAPTER_HANDLER)(
   IN NDIS_HANDLE  MacMacContext,
   IN NDIS_HANDLE  WrapperConfigurationContext,
   IN PNDIS_STRING  AdapterName);
index 6622d81..6776d2a 100644 (file)
@@ -36,7 +36,7 @@ extern "C" {
 #define AGP_CAPABILITIES_MAP_PHYSICAL     0x00000001L
 
 typedef NTSTATUS
-(NTAPI *PAGP_BUS_COMMIT_MEMORY)(
+(DDKAPI *PAGP_BUS_COMMIT_MEMORY)(
   IN     PVOID  AgpContext,
   IN     PVOID  MapHandle,
   IN     ULONG  NumberOfPages,
@@ -45,19 +45,19 @@ typedef NTSTATUS
   OUT    PHYSICAL_ADDRESS  *MemoryBase);
 
 typedef NTSTATUS
-(NTAPI *PAGP_BUS_FREE_MEMORY)(
+(DDKAPI *PAGP_BUS_FREE_MEMORY)(
   IN  PVOID  AgpContext,
   IN  PVOID  MapHandle,
   IN  ULONG  NumberOfPages,
   IN  ULONG  OffsetInPages);
 
 typedef NTSTATUS
-(NTAPI *PAGP_BUS_RELEASE_MEMORY)(
+(DDKAPI *PAGP_BUS_RELEASE_MEMORY)(
   IN  PVOID  AgpContext,
   IN  PVOID  MapHandle);
 
 typedef NTSTATUS
-(NTAPI *PAGP_BUS_RESERVE_MEMORY)(
+(DDKAPI *PAGP_BUS_RESERVE_MEMORY)(
   IN  PVOID  AgpContext,
   IN  ULONG  NumberOfPages,
   IN  MEMORY_CACHING_TYPE  MemoryType,
@@ -65,12 +65,12 @@ typedef NTSTATUS
   OUT PHYSICAL_ADDRESS  *PhysicalAddress  OPTIONAL);
 
 typedef NTSTATUS
-(NTAPI *PAGP_BUS_SET_RATE)(
+(DDKAPI *PAGP_BUS_SET_RATE)(
   IN  PVOID  AgpContext,
   IN  ULONG  AgpRate);
 
 typedef NTSTATUS
-(NTAPI *PAGP_GET_MAPPED_PAGES)(
+(DDKAPI *PAGP_GET_MAPPED_PAGES)(
   IN  PVOID  AgpContext,
   IN  PVOID  MapHandle,
   IN  ULONG  NumberOfPages,
index 4bb3252..0527ef4 100644 (file)
@@ -134,29 +134,29 @@ typedef struct _INTERNAL_I8042_START_INFORMATION {
 } INTERNAL_I8042_START_INFORMATION, *PINTERNAL_I8042_START_INFORMATION;
 
 typedef VOID
-(NTAPI *PI8042_ISR_WRITE_PORT)(
+(DDKAPI *PI8042_ISR_WRITE_PORT)(
   IN PVOID  Context,
   IN UCHAR  Value);
 
 typedef VOID
-(NTAPI *PI8042_QUEUE_PACKET)(
+(DDKAPI *PI8042_QUEUE_PACKET)(
   IN PVOID  Context);
 
 typedef NTSTATUS
-(NTAPI *PI8042_SYNCH_READ_PORT) (
+(DDKAPI *PI8042_SYNCH_READ_PORT) (
   IN PVOID  Context,
   OUT PUCHAR  Value,
   IN BOOLEAN  WaitForACK);
 
 typedef NTSTATUS
-(NTAPI *PI8042_SYNCH_WRITE_PORT)(
+(DDKAPI *PI8042_SYNCH_WRITE_PORT)(
   IN PVOID  Context,
   IN UCHAR  Value,
   IN BOOLEAN  WaitForACK);
 
 
 typedef NTSTATUS
-(NTAPI *PI8042_KEYBOARD_INITIALIZATION_ROUTINE)(
+(DDKAPI *PI8042_KEYBOARD_INITIALIZATION_ROUTINE)(
   IN PVOID  InitializationContext,
   IN PVOID  SynchFuncContext,
   IN PI8042_SYNCH_READ_PORT  ReadPort,
@@ -164,7 +164,7 @@ typedef NTSTATUS
   OUT PBOOLEAN  TurnTranslationOn);
 
 typedef BOOLEAN
-(NTAPI *PI8042_KEYBOARD_ISR)(
+(DDKAPI *PI8042_KEYBOARD_ISR)(
   PVOID  IsrContext,
   PKEYBOARD_INPUT_DATA  CurrentInput,
   POUTPUT_PACKET  CurrentOutput,
@@ -183,7 +183,7 @@ typedef struct _INTERNAL_I8042_HOOK_KEYBOARD {
 } INTERNAL_I8042_HOOK_KEYBOARD, *PINTERNAL_I8042_HOOK_KEYBOARD;
 
 typedef BOOLEAN
-(NTAPI *PI8042_MOUSE_ISR)(
+(DDKAPI *PI8042_MOUSE_ISR)(
   PVOID  IsrContext,
   PMOUSE_INPUT_DATA  CurrentInput,
   POUTPUT_PACKET  CurrentOutput,
index 61c23d3..0475b3a 100644 (file)
@@ -1,13 +1,12 @@
 /*
  * ntddk.h
  *
- * Windows NT Device Driver Kit
+ * Windows Device Driver Kit
  *
- * This file is part of the ReactOS DDK package.
+ * This file is part of the w32api package.
  *
  * Contributors:
- *   Amine Khaldi
- *   Timo Kreuzer (timo.kreuzer@reactos.org)
+ *   Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
  *
  * THIS SOFTWARE IS NOT COPYRIGHTED
  *
  * DISCLAIMED. This includes but is not limited to warranties of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  *
+ * DEFINES:
+ *    DBG          - Debugging enabled/disabled (0/1)
+ *    POOL_TAGGING - Enable pool tagging
+ *    _X86_        - X86 environment
  */
 
-#pragma once
-
+#ifndef _NTDDK_
 #define _NTDDK_
 
 #if !defined(_NTHAL_) && !defined(_NTIFS_)
@@ -39,7 +41,6 @@
 #include <excpt.h>
 #include <ntdef.h>
 #include <ntstatus.h>
-#include <mce.h>
 
 /* FIXME
 #include <bugcodes.h>
 extern "C" {
 #endif
 
-/* GUID and UUID */
-#ifndef _NTLSA_IFS_
-#ifndef _NTLSA_AUDIT_
-#define _NTLSA_AUDIT_
-
-#ifndef GUID_DEFINED
-#include <guiddef.h>
-#endif
-
-#endif /* _NTLSA_AUDIT_ */
-#endif /* _NTLSA_IFS_ */
-
-typedef GUID UUID;
-
 struct _LOADER_PARAMETER_BLOCK;
 struct _CREATE_DISK;
 struct _DRIVE_LAYOUT_INFORMATION_EX;
 struct _SET_PARTITION_INFORMATION_EX;
 
-typedef struct _BUS_HANDLER *PBUS_HANDLER;
-typedef struct _DEVICE_HANDLER_OBJECT *PDEVICE_HANDLER_OBJECT;
-#if defined(_NTHAL_INCLUDED_)
-typedef struct _KAFFINITY_EX *PKAFFINITY_EX;
+//
+// GUID and UUID
+//
+#ifndef GUID_DEFINED
+#include <guiddef.h>
 #endif
-typedef struct _PEB *PPEB;
+typedef GUID UUID;
 
-#ifndef _NTIMAGE_
+typedef struct _BUS_HANDLER *PBUS_HANDLER;
 
-typedef struct _IMAGE_NT_HEADERS *PIMAGE_NT_HEADERS32;
-typedef struct _IMAGE_NT_HEADERS64 *PIMAGE_NT_HEADERS64;
+#define EXCEPTION_READ_FAULT    0
+#define EXCEPTION_WRITE_FAULT   1
+#define EXCEPTION_EXECUTE_FAULT 8
 
-#ifdef _WIN64
-typedef PIMAGE_NT_HEADERS64 PIMAGE_NT_HEADERS;
+#if (NTDDI_VERSION >= NTDDI_VISTA)
+extern NTSYSAPI volatile CCHAR KeNumberProcessors;
+#elif (NTDDI_VERSION >= NTDDI_WINXP)
+extern NTSYSAPI CCHAR KeNumberProcessors;
 #else
-typedef PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS;
+extern PCCHAR KeNumberProcessors;
 #endif
 
-#endif /* _NTIMAGE_ */
-
-/******************************************************************************
- *                            Executive Types                                 *
- ******************************************************************************/
-
-typedef struct _ZONE_SEGMENT_HEADER {
-  SINGLE_LIST_ENTRY SegmentList;
-  PVOID Reserved;
-} ZONE_SEGMENT_HEADER, *PZONE_SEGMENT_HEADER;
-
-typedef struct _ZONE_HEADER {
-  SINGLE_LIST_ENTRY FreeList;
-  SINGLE_LIST_ENTRY SegmentList;
-  ULONG BlockSize;
-  ULONG TotalSegmentSize;
-} ZONE_HEADER, *PZONE_HEADER;
-
-#define PROTECTED_POOL                    0x80000000
-
-
-/******************************************************************************
- *                         I/O Manager Types                                  *
- ******************************************************************************/
-
-/* DEVICE_OBJECT.Flags */
-#define DO_DEVICE_HAS_NAME                0x00000040
-#define DO_SYSTEM_BOOT_PARTITION          0x00000100
-#define DO_LONG_TERM_REQUESTS             0x00000200
-#define DO_NEVER_LAST_DEVICE              0x00000400
-#define DO_LOW_PRIORITY_FILESYSTEM        0x00010000
-#define DO_SUPPORTS_TRANSACTIONS          0x00040000
-#define DO_FORCE_NEITHER_IO               0x00080000
-#define DO_VOLUME_DEVICE_OBJECT           0x00100000
-#define DO_SYSTEM_SYSTEM_PARTITION        0x00200000
-#define DO_SYSTEM_CRITICAL_PARTITION      0x00400000
-#define DO_DISALLOW_EXECUTE               0x00800000
+#define MAX_WOW64_SHARED_ENTRIES 16
 
-#ifndef _ARC_DDK_
-#define _ARC_DDK_
-typedef enum _CONFIGURATION_TYPE {
-  ArcSystem,
-  CentralProcessor,
-  FloatingPointProcessor,
-  PrimaryIcache,
-  PrimaryDcache,
-  SecondaryIcache,
-  SecondaryDcache,
-  SecondaryCache,
-  EisaAdapter,
-  TcAdapter,
-  ScsiAdapter,
-  DtiAdapter,
-  MultiFunctionAdapter,
-  DiskController,
-  TapeController,
-  CdromController,
-  WormController,
-  SerialController,
-  NetworkController,
-  DisplayController,
-  ParallelController,
-  PointerController,
-  KeyboardController,
-  AudioController,
-  OtherController,
-  DiskPeripheral,
-  FloppyDiskPeripheral,
-  TapePeripheral,
-  ModemPeripheral,
-  MonitorPeripheral,
-  PrinterPeripheral,
-  PointerPeripheral,
-  KeyboardPeripheral,
-  TerminalPeripheral,
-  OtherPeripheral,
-  LinePeripheral,
-  NetworkPeripheral,
-  SystemMemory,
-  DockingInformation,
-  RealModeIrqRoutingTable,
-  RealModePCIEnumeration,
-  MaximumType
-} CONFIGURATION_TYPE, *PCONFIGURATION_TYPE;
-#endif /* !_ARC_DDK_ */
+#define NX_SUPPORT_POLICY_ALWAYSOFF 0
+#define NX_SUPPORT_POLICY_ALWAYSON 1
+#define NX_SUPPORT_POLICY_OPTIN 2
+#define NX_SUPPORT_POLICY_OPTOUT 3
 
 /*
 ** IRP function codes
@@ -210,118 +122,102 @@ typedef enum _CONFIGURATION_TYPE {
 
 #define IRP_MN_QUERY_LEGACY_BUS_INFORMATION 0x18
 
-#define IO_CHECK_CREATE_PARAMETERS      0x0200
-#define IO_ATTACH_DEVICE                0x0400
-#define IO_IGNORE_SHARE_ACCESS_CHECK    0x0800
+typedef struct _IO_COUNTERS {
+  ULONGLONG ReadOperationCount;
+  ULONGLONG WriteOperationCount;
+  ULONGLONG OtherOperationCount;
+  ULONGLONG ReadTransferCount;
+  ULONGLONG WriteTransferCount;
+  ULONGLONG OtherTransferCount;
+} IO_COUNTERS, *PIO_COUNTERS;
 
-typedef
-NTSTATUS
-(NTAPI *PIO_QUERY_DEVICE_ROUTINE)(
-  IN PVOID Context,
-  IN PUNICODE_STRING PathName,
-  IN INTERFACE_TYPE BusType,
-  IN ULONG BusNumber,
-  IN PKEY_VALUE_FULL_INFORMATION *BusInformation,
-  IN CONFIGURATION_TYPE ControllerType,
-  IN ULONG ControllerNumber,
-  IN PKEY_VALUE_FULL_INFORMATION *ControllerInformation,
-  IN CONFIGURATION_TYPE PeripheralType,
-  IN ULONG PeripheralNumber,
-  IN PKEY_VALUE_FULL_INFORMATION *PeripheralInformation);
+typedef struct _VM_COUNTERS {
+  SIZE_T PeakVirtualSize;
+  SIZE_T VirtualSize;
+  ULONG PageFaultCount;
+  SIZE_T PeakWorkingSetSize;
+  SIZE_T WorkingSetSize;
+  SIZE_T QuotaPeakPagedPoolUsage;
+  SIZE_T QuotaPagedPoolUsage;
+  SIZE_T QuotaPeakNonPagedPoolUsage;
+  SIZE_T QuotaNonPagedPoolUsage;
+  SIZE_T PagefileUsage;
+  SIZE_T PeakPagefileUsage;
+} VM_COUNTERS, *PVM_COUNTERS;
 
-typedef enum _IO_QUERY_DEVICE_DATA_FORMAT {
-  IoQueryDeviceIdentifier = 0,
-  IoQueryDeviceConfigurationData,
-  IoQueryDeviceComponentInformation,
-  IoQueryDeviceMaxData
-} IO_QUERY_DEVICE_DATA_FORMAT, *PIO_QUERY_DEVICE_DATA_FORMAT;
+typedef struct _VM_COUNTERS_EX
+{
+  SIZE_T PeakVirtualSize;
+  SIZE_T VirtualSize;
+  ULONG PageFaultCount;
+  SIZE_T PeakWorkingSetSize;
+  SIZE_T WorkingSetSize;
+  SIZE_T QuotaPeakPagedPoolUsage;
+  SIZE_T QuotaPagedPoolUsage;
+  SIZE_T QuotaPeakNonPagedPoolUsage;
+  SIZE_T QuotaNonPagedPoolUsage;
+  SIZE_T PagefileUsage;
+  SIZE_T PeakPagefileUsage;
+  SIZE_T PrivateUsage;
+} VM_COUNTERS_EX, *PVM_COUNTERS_EX;
 
-typedef VOID
-(NTAPI *PDRIVER_REINITIALIZE)(
-  IN struct _DRIVER_OBJECT *DriverObject,
-  IN PVOID Context OPTIONAL,
-  IN ULONG Count);
+typedef struct _POOLED_USAGE_AND_LIMITS
+{
+  SIZE_T PeakPagedPoolUsage;
+  SIZE_T PagedPoolUsage;
+  SIZE_T PagedPoolLimit;
+  SIZE_T PeakNonPagedPoolUsage;
+  SIZE_T NonPagedPoolUsage;
+  SIZE_T NonPagedPoolLimit;
+  SIZE_T PeakPagefileUsage;
+  SIZE_T PagefileUsage;
+  SIZE_T PagefileLimit;
+} POOLED_USAGE_AND_LIMITS, *PPOOLED_USAGE_AND_LIMITS;
 
-typedef struct _CONTROLLER_OBJECT {
-  CSHORT Type;
-  CSHORT Size;
-  PVOID ControllerExtension;
-  KDEVICE_QUEUE DeviceWaitQueue;
-  ULONG Spare1;
-  LARGE_INTEGER Spare2;
-} CONTROLLER_OBJECT, *PCONTROLLER_OBJECT;
+/* DEVICE_OBJECT.Flags */
+
+#define DO_VERIFY_VOLUME                    0x00000002
+#define DO_BUFFERED_IO                      0x00000004
+#define DO_EXCLUSIVE                        0x00000008
+#define DO_DIRECT_IO                        0x00000010
+#define DO_MAP_IO_BUFFER                    0x00000020
+#define DO_DEVICE_HAS_NAME                  0x00000040
+#define DO_DEVICE_INITIALIZING              0x00000080
+#define DO_SYSTEM_BOOT_PARTITION            0x00000100
+#define DO_LONG_TERM_REQUESTS               0x00000200
+#define DO_NEVER_LAST_DEVICE                0x00000400
+#define DO_SHUTDOWN_REGISTERED              0x00000800
+#define DO_BUS_ENUMERATED_DEVICE            0x00001000
+#define DO_POWER_PAGABLE                    0x00002000
+#define DO_POWER_INRUSH                     0x00004000
+#define DO_LOW_PRIORITY_FILESYSTEM          0x00010000
+#define DO_SUPPORTS_TRANSACTIONS            0x00040000
+#define DO_FORCE_NEITHER_IO                 0x00080000
+#define DO_VOLUME_DEVICE_OBJECT             0x00100000
+#define DO_SYSTEM_SYSTEM_PARTITION          0x00200000
+#define DO_SYSTEM_CRITICAL_PARTITION        0x00400000
+#define DO_DISALLOW_EXECUTE                 0x00800000
 
 #define DRVO_REINIT_REGISTERED          0x00000008
 #define DRVO_INITIALIZED                0x00000010
 #define DRVO_BOOTREINIT_REGISTERED      0x00000020
 #define DRVO_LEGACY_RESOURCES           0x00000040
 
-typedef struct _CONFIGURATION_INFORMATION {
-  ULONG DiskCount;
-  ULONG FloppyCount;
-  ULONG CdRomCount;
-  ULONG TapeCount;
-  ULONG ScsiPortCount;
-  ULONG SerialCount;
-  ULONG ParallelCount;
-  BOOLEAN AtDiskPrimaryAddressClaimed;
-  BOOLEAN AtDiskSecondaryAddressClaimed;
-  ULONG Version;
-  ULONG MediumChangerCount;
-} CONFIGURATION_INFORMATION, *PCONFIGURATION_INFORMATION;
-
-typedef struct _DISK_SIGNATURE {
-  ULONG PartitionStyle;
-  _ANONYMOUS_UNION union {
-    struct {
-      ULONG Signature;
-      ULONG CheckSum;
-    } Mbr;
-    struct {
-      GUID DiskId;
-    } Gpt;
-  } DUMMYUNIONNAME;
-} DISK_SIGNATURE, *PDISK_SIGNATURE;
-
-typedef struct _TXN_PARAMETER_BLOCK {
-  USHORT Length;
-  USHORT TxFsContext;
-  PVOID TransactionObject;
-} TXN_PARAMETER_BLOCK, *PTXN_PARAMETER_BLOCK;
-
-#define TXF_MINIVERSION_DEFAULT_VIEW        (0xFFFE)
-
-typedef struct _IO_DRIVER_CREATE_CONTEXT {
-  CSHORT Size;
-  struct _ECP_LIST *ExtraCreateParameter;
-  PVOID DeviceObjectHint;
-  PTXN_PARAMETER_BLOCK TxnParameters;
-} IO_DRIVER_CREATE_CONTEXT, *PIO_DRIVER_CREATE_CONTEXT;
-
-typedef struct _AGP_TARGET_BUS_INTERFACE_STANDARD {
-  USHORT Size;
-  USHORT Version;
-  PVOID Context;
-  PINTERFACE_REFERENCE InterfaceReference;
-  PINTERFACE_DEREFERENCE InterfaceDereference;
-  PGET_SET_DEVICE_DATA SetBusData;
-  PGET_SET_DEVICE_DATA GetBusData;
-  UCHAR CapabilityID;
-} AGP_TARGET_BUS_INTERFACE_STANDARD, *PAGP_TARGET_BUS_INTERFACE_STANDARD;
-
-typedef NTSTATUS
-(NTAPI *PGET_LOCATION_STRING)(
-  IN OUT PVOID Context OPTIONAL,
-  OUT PWCHAR *LocationStrings);
+typedef enum _ARBITER_REQUEST_SOURCE {
+  ArbiterRequestUndefined = -1,
+  ArbiterRequestLegacyReported,
+  ArbiterRequestHalReported,
+  ArbiterRequestLegacyAssigned,
+  ArbiterRequestPnpDetected,
+  ArbiterRequestPnpEnumerated
+} ARBITER_REQUEST_SOURCE;
 
-typedef struct _PNP_LOCATION_INTERFACE {
-  USHORT Size;
-  USHORT Version;
-  PVOID Context;
-  PINTERFACE_REFERENCE InterfaceReference;
-  PINTERFACE_DEREFERENCE InterfaceDereference;
-  PGET_LOCATION_STRING GetLocationString;
-} PNP_LOCATION_INTERFACE, *PPNP_LOCATION_INTERFACE;
+typedef enum _ARBITER_RESULT {
+  ArbiterResultUndefined = -1,
+  ArbiterResultSuccess,
+  ArbiterResultExternalConflict,
+  ArbiterResultNullRequest
+} ARBITER_RESULT;
 
 typedef enum _ARBITER_ACTION {
   ArbiterActionTestAllocation,
@@ -342,69 +238,39 @@ typedef struct _ARBITER_CONFLICT_INFO {
   ULONGLONG End;
 } ARBITER_CONFLICT_INFO, *PARBITER_CONFLICT_INFO;
 
-typedef struct _ARBITER_TEST_ALLOCATION_PARAMETERS {
-  IN OUT PLIST_ENTRY ArbitrationList;
-  IN ULONG AllocateFromCount;
-  IN PCM_PARTIAL_RESOURCE_DESCRIPTOR AllocateFrom;
-} ARBITER_TEST_ALLOCATION_PARAMETERS, *PARBITER_TEST_ALLOCATION_PARAMETERS;
-
-typedef struct _ARBITER_RETEST_ALLOCATION_PARAMETERS {
-  IN OUT PLIST_ENTRY ArbitrationList;
-  IN ULONG AllocateFromCount;
-  IN PCM_PARTIAL_RESOURCE_DESCRIPTOR AllocateFrom;
-} ARBITER_RETEST_ALLOCATION_PARAMETERS, *PARBITER_RETEST_ALLOCATION_PARAMETERS;
-
-typedef struct _ARBITER_BOOT_ALLOCATION_PARAMETERS {
-  IN OUT PLIST_ENTRY ArbitrationList;
-} ARBITER_BOOT_ALLOCATION_PARAMETERS, *PARBITER_BOOT_ALLOCATION_PARAMETERS;
-
-typedef struct _ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS {
-  OUT PCM_PARTIAL_RESOURCE_LIST *AllocatedResources;
-} ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS, *PARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS;
-
-typedef struct _ARBITER_QUERY_CONFLICT_PARAMETERS {
-  IN PDEVICE_OBJECT PhysicalDeviceObject;
-  IN PIO_RESOURCE_DESCRIPTOR ConflictingResource;
-  OUT PULONG ConflictCount;
-  OUT PARBITER_CONFLICT_INFO *Conflicts;
-} ARBITER_QUERY_CONFLICT_PARAMETERS, *PARBITER_QUERY_CONFLICT_PARAMETERS;
-
-typedef struct _ARBITER_QUERY_ARBITRATE_PARAMETERS {
-  IN PLIST_ENTRY ArbitrationList;
-} ARBITER_QUERY_ARBITRATE_PARAMETERS, *PARBITER_QUERY_ARBITRATE_PARAMETERS;
-
-typedef struct _ARBITER_ADD_RESERVED_PARAMETERS {
-  IN PDEVICE_OBJECT ReserveDevice;
-} ARBITER_ADD_RESERVED_PARAMETERS, *PARBITER_ADD_RESERVED_PARAMETERS;
-
 typedef struct _ARBITER_PARAMETERS {
   union {
-    ARBITER_TEST_ALLOCATION_PARAMETERS TestAllocation;
-    ARBITER_RETEST_ALLOCATION_PARAMETERS RetestAllocation;
-    ARBITER_BOOT_ALLOCATION_PARAMETERS BootAllocation;
-    ARBITER_QUERY_ALLOCATED_RESOURCES_PARAMETERS QueryAllocatedResources;
-    ARBITER_QUERY_CONFLICT_PARAMETERS QueryConflict;
-    ARBITER_QUERY_ARBITRATE_PARAMETERS QueryArbitrate;
-    ARBITER_ADD_RESERVED_PARAMETERS AddReserved;
+    struct {
+      IN OUT PLIST_ENTRY ArbitrationList;
+      IN ULONG AllocateFromCount;
+      IN PCM_PARTIAL_RESOURCE_DESCRIPTOR AllocateFrom;
+    } TestAllocation;
+    struct {
+      IN OUT PLIST_ENTRY ArbitrationList;
+      IN ULONG AllocateFromCount;
+      IN PCM_PARTIAL_RESOURCE_DESCRIPTOR AllocateFrom;
+    } RetestAllocation;
+    struct {
+      IN OUT PLIST_ENTRY ArbitrationList;
+    } BootAllocation;
+    struct {
+      OUT PCM_PARTIAL_RESOURCE_LIST *AllocatedResources;
+    } QueryAllocatedResources;
+    struct {
+      IN PDEVICE_OBJECT PhysicalDeviceObject;
+      IN PIO_RESOURCE_DESCRIPTOR ConflictingResource;
+      OUT PULONG ConflictCount;
+      OUT PARBITER_CONFLICT_INFO *Conflicts;
+    } QueryConflict;
+    struct {
+      IN PLIST_ENTRY ArbitrationList;
+    } QueryArbitrate;
+    struct {
+      IN PDEVICE_OBJECT ReserveDevice;
+    } AddReserved;
   } Parameters;
 } ARBITER_PARAMETERS, *PARBITER_PARAMETERS;
 
-typedef enum _ARBITER_REQUEST_SOURCE {
-  ArbiterRequestUndefined = -1,
-  ArbiterRequestLegacyReported,
-  ArbiterRequestHalReported,
-  ArbiterRequestLegacyAssigned,
-  ArbiterRequestPnpDetected,
-  ArbiterRequestPnpEnumerated
-} ARBITER_REQUEST_SOURCE;
-
-typedef enum _ARBITER_RESULT {
-  ArbiterResultUndefined = -1,
-  ArbiterResultSuccess,
-  ArbiterResultExternalConflict,
-  ArbiterResultNullRequest
-} ARBITER_RESULT;
-
 #define ARBITER_FLAG_BOOT_CONFIG 0x00000001
 
 typedef struct _ARBITER_LIST_ENTRY {
@@ -441,826 +307,6 @@ typedef struct _ARBITER_INTERFACE {
   ULONG Flags;
 } ARBITER_INTERFACE, *PARBITER_INTERFACE;
 
-typedef enum _RESOURCE_TRANSLATION_DIRECTION {
-  TranslateChildToParent,
-  TranslateParentToChild
-} RESOURCE_TRANSLATION_DIRECTION;
-
-typedef NTSTATUS
-(NTAPI *PTRANSLATE_RESOURCE_HANDLER)(
-  IN OUT PVOID Context OPTIONAL,
-  IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Source,
-  IN RESOURCE_TRANSLATION_DIRECTION Direction,
-  IN ULONG AlternativesCount OPTIONAL,
-  IN IO_RESOURCE_DESCRIPTOR Alternatives[],
-  IN PDEVICE_OBJECT PhysicalDeviceObject,
-  OUT PCM_PARTIAL_RESOURCE_DESCRIPTOR Target);
-
-typedef NTSTATUS
-(NTAPI *PTRANSLATE_RESOURCE_REQUIREMENTS_HANDLER)(
-  IN OUT PVOID Context OPTIONAL,
-  IN PIO_RESOURCE_DESCRIPTOR Source,
-  IN PDEVICE_OBJECT PhysicalDeviceObject,
-  OUT PULONG TargetCount,
-  OUT PIO_RESOURCE_DESCRIPTOR *Target);
-
-typedef struct _TRANSLATOR_INTERFACE {
-  USHORT Size;
-  USHORT Version;
-  PVOID Context;
-  PINTERFACE_REFERENCE InterfaceReference;
-  PINTERFACE_DEREFERENCE InterfaceDereference;
-  PTRANSLATE_RESOURCE_HANDLER TranslateResources;
-  PTRANSLATE_RESOURCE_REQUIREMENTS_HANDLER TranslateResourceRequirements;
-} TRANSLATOR_INTERFACE, *PTRANSLATOR_INTERFACE;
-
-typedef struct _PCI_AGP_CAPABILITY {
-  PCI_CAPABILITIES_HEADER Header;
-  USHORT Minor:4;
-  USHORT Major:4;
-  USHORT Rsvd1:8;
-  struct _PCI_AGP_STATUS {
-    ULONG Rate:3;
-    ULONG Agp3Mode:1;
-    ULONG FastWrite:1;
-    ULONG FourGB:1;
-    ULONG HostTransDisable:1;
-    ULONG Gart64:1;
-    ULONG ITA_Coherent:1;
-    ULONG SideBandAddressing:1;
-    ULONG CalibrationCycle:3;
-    ULONG AsyncRequestSize:3;
-    ULONG Rsvd1:1;
-    ULONG Isoch:1;
-    ULONG Rsvd2:6;
-    ULONG RequestQueueDepthMaximum:8;
-  } AGPStatus;
-  struct _PCI_AGP_COMMAND {
-    ULONG Rate:3;
-    ULONG Rsvd1:1;
-    ULONG FastWriteEnable:1;
-    ULONG FourGBEnable:1;
-    ULONG Rsvd2:1;
-    ULONG Gart64:1;
-    ULONG AGPEnable:1;
-    ULONG SBAEnable:1;
-    ULONG CalibrationCycle:3;
-    ULONG AsyncReqSize:3;
-    ULONG Rsvd3:8;
-    ULONG RequestQueueDepth:8;
-  } AGPCommand;
-} PCI_AGP_CAPABILITY, *PPCI_AGP_CAPABILITY;
-
-typedef enum _EXTENDED_AGP_REGISTER {
-  IsochStatus,
-  AgpControl,
-  ApertureSize,
-  AperturePageSize,
-  GartLow,
-  GartHigh,
-  IsochCommand
-} EXTENDED_AGP_REGISTER, *PEXTENDED_AGP_REGISTER;
-
-typedef struct _PCI_AGP_ISOCH_STATUS {
-  ULONG ErrorCode:2;
-  ULONG Rsvd1:1;
-  ULONG Isoch_L:3;
-  ULONG Isoch_Y:2;
-  ULONG Isoch_N:8;
-  ULONG Rsvd2:16;
-} PCI_AGP_ISOCH_STATUS, *PPCI_AGP_ISOCH_STATUS;
-
-typedef struct _PCI_AGP_CONTROL {
-  ULONG Rsvd1:7;
-  ULONG GTLB_Enable:1;
-  ULONG AP_Enable:1;
-  ULONG CAL_Disable:1;
-  ULONG Rsvd2:22;
-} PCI_AGP_CONTROL, *PPCI_AGP_CONTROL;
-
-typedef struct _PCI_AGP_APERTURE_PAGE_SIZE {
-  USHORT PageSizeMask:11;
-  USHORT Rsvd1:1;
-  USHORT PageSizeSelect:4;
-} PCI_AGP_APERTURE_PAGE_SIZE, *PPCI_AGP_APERTURE_PAGE_SIZE;
-
-typedef struct _PCI_AGP_ISOCH_COMMAND {
-  USHORT Rsvd1:6;
-  USHORT Isoch_Y:2;
-  USHORT Isoch_N:8;
-} PCI_AGP_ISOCH_COMMAND, *PPCI_AGP_ISOCH_COMMAND;
-
-typedef struct PCI_AGP_EXTENDED_CAPABILITY {
-  PCI_AGP_ISOCH_STATUS IsochStatus;
-  PCI_AGP_CONTROL AgpControl;
-  USHORT ApertureSize;
-  PCI_AGP_APERTURE_PAGE_SIZE AperturePageSize;
-  ULONG GartLow;
-  ULONG GartHigh;
-  PCI_AGP_ISOCH_COMMAND IsochCommand;
-} PCI_AGP_EXTENDED_CAPABILITY, *PPCI_AGP_EXTENDED_CAPABILITY;
-
-#define PCI_AGP_RATE_1X     0x1
-#define PCI_AGP_RATE_2X     0x2
-#define PCI_AGP_RATE_4X     0x4
-
-#define PCIX_MODE_CONVENTIONAL_PCI  0x0
-#define PCIX_MODE1_66MHZ            0x1
-#define PCIX_MODE1_100MHZ           0x2
-#define PCIX_MODE1_133MHZ           0x3
-#define PCIX_MODE2_266_66MHZ        0x9
-#define PCIX_MODE2_266_100MHZ       0xA
-#define PCIX_MODE2_266_133MHZ       0xB
-#define PCIX_MODE2_533_66MHZ        0xD
-#define PCIX_MODE2_533_100MHZ       0xE
-#define PCIX_MODE2_533_133MHZ       0xF
-
-#define PCIX_VERSION_MODE1_ONLY     0x0
-#define PCIX_VERSION_MODE2_ECC      0x1
-#define PCIX_VERSION_DUAL_MODE_ECC  0x2
-
-typedef struct _PCIX_BRIDGE_CAPABILITY {
-  PCI_CAPABILITIES_HEADER Header;
-  union {
-    struct {
-      USHORT Bus64Bit:1;
-      USHORT Bus133MHzCapable:1;
-      USHORT SplitCompletionDiscarded:1;
-      USHORT UnexpectedSplitCompletion:1;
-      USHORT SplitCompletionOverrun:1;
-      USHORT SplitRequestDelayed:1;
-      USHORT BusModeFrequency:4;
-      USHORT Rsvd:2;
-      USHORT Version:2;
-      USHORT Bus266MHzCapable:1;
-      USHORT Bus533MHzCapable:1;
-    } DUMMYSTRUCTNAME;
-  USHORT AsUSHORT;
-  } SecondaryStatus;
-  union {
-    struct {
-      ULONG FunctionNumber:3;
-      ULONG DeviceNumber:5;
-      ULONG BusNumber:8;
-      ULONG Device64Bit:1;
-      ULONG Device133MHzCapable:1;
-      ULONG SplitCompletionDiscarded:1;
-      ULONG UnexpectedSplitCompletion:1;
-      ULONG SplitCompletionOverrun:1;
-      ULONG SplitRequestDelayed:1;
-      ULONG Rsvd:7;
-      ULONG DIMCapable:1;
-      ULONG Device266MHzCapable:1;
-      ULONG Device533MHzCapable:1;
-    } DUMMYSTRUCTNAME;
-    ULONG AsULONG;
-  } BridgeStatus;
-  USHORT UpstreamSplitTransactionCapacity;
-  USHORT UpstreamSplitTransactionLimit;
-  USHORT DownstreamSplitTransactionCapacity;
-  USHORT DownstreamSplitTransactionLimit;
-  union {
-    struct {
-      ULONG SelectSecondaryRegisters:1;
-      ULONG ErrorPresentInOtherBank:1;
-      ULONG AdditionalCorrectableError:1;
-      ULONG AdditionalUncorrectableError:1;
-      ULONG ErrorPhase:3;
-      ULONG ErrorCorrected:1;
-      ULONG Syndrome:8;
-      ULONG ErrorFirstCommand:4;
-      ULONG ErrorSecondCommand:4;
-      ULONG ErrorUpperAttributes:4;
-      ULONG ControlUpdateEnable:1;
-      ULONG Rsvd:1;
-      ULONG DisableSingleBitCorrection:1;
-      ULONG EccMode:1;
-    } DUMMYSTRUCTNAME;
-  ULONG AsULONG;
-  } EccControlStatus;
-  ULONG EccFirstAddress;
-  ULONG EccSecondAddress;
-  ULONG EccAttribute;
-} PCIX_BRIDGE_CAPABILITY, *PPCIX_BRIDGE_CAPABILITY;
-
-typedef struct _PCI_SUBSYSTEM_IDS_CAPABILITY {
-  PCI_CAPABILITIES_HEADER Header;
-  USHORT Reserved;
-  USHORT SubVendorID;
-  USHORT SubSystemID;
-} PCI_SUBSYSTEM_IDS_CAPABILITY, *PPCI_SUBSYSTEM_IDS_CAPABILITY;
-
-#define OSC_FIRMWARE_FAILURE                            0x02
-#define OSC_UNRECOGNIZED_UUID                           0x04
-#define OSC_UNRECOGNIZED_REVISION                       0x08
-#define OSC_CAPABILITIES_MASKED                         0x10
-
-#define PCI_ROOT_BUS_OSC_METHOD_CAPABILITY_REVISION     0x01
-
-typedef struct _PCI_ROOT_BUS_OSC_SUPPORT_FIELD {
-  union {
-    struct {
-      ULONG ExtendedConfigOpRegions:1;
-      ULONG ActiveStatePowerManagement:1;
-      ULONG ClockPowerManagement:1;
-      ULONG SegmentGroups:1;
-      ULONG MessageSignaledInterrupts:1;
-      ULONG WindowsHardwareErrorArchitecture:1;
-      ULONG Reserved:26;
-    } DUMMYSTRUCTNAME;
-    ULONG AsULONG;
-  } u;
-} PCI_ROOT_BUS_OSC_SUPPORT_FIELD, *PPCI_ROOT_BUS_OSC_SUPPORT_FIELD;
-
-typedef struct _PCI_ROOT_BUS_OSC_CONTROL_FIELD {
-  union {
-    struct {
-      ULONG ExpressNativeHotPlug:1;
-      ULONG ShpcNativeHotPlug:1;
-      ULONG ExpressNativePME:1;
-      ULONG ExpressAdvancedErrorReporting:1;
-      ULONG ExpressCapabilityStructure:1;
-      ULONG Reserved:27;
-    } DUMMYSTRUCTNAME;
-  ULONG AsULONG;
-  } u;
-} PCI_ROOT_BUS_OSC_CONTROL_FIELD, *PPCI_ROOT_BUS_OSC_CONTROL_FIELD;
-
-typedef enum _PCI_HARDWARE_INTERFACE {
-  PciConventional,
-  PciXMode1,
-  PciXMode2,
-  PciExpress
-} PCI_HARDWARE_INTERFACE, *PPCI_HARDWARE_INTERFACE;
-
-typedef enum {
-  BusWidth32Bits,
-  BusWidth64Bits
-} PCI_BUS_WIDTH;
-
-typedef struct _PCI_ROOT_BUS_HARDWARE_CAPABILITY {
-  PCI_HARDWARE_INTERFACE SecondaryInterface;
-  struct {
-    BOOLEAN BusCapabilitiesFound;
-    ULONG CurrentSpeedAndMode;
-    ULONG SupportedSpeedsAndModes;
-    BOOLEAN DeviceIDMessagingCapable;
-    PCI_BUS_WIDTH SecondaryBusWidth;
-  } DUMMYSTRUCTNAME;
-  PCI_ROOT_BUS_OSC_SUPPORT_FIELD OscFeatureSupport;
-  PCI_ROOT_BUS_OSC_CONTROL_FIELD OscControlRequest;
-  PCI_ROOT_BUS_OSC_CONTROL_FIELD OscControlGranted;
-} PCI_ROOT_BUS_HARDWARE_CAPABILITY, *PPCI_ROOT_BUS_HARDWARE_CAPABILITY;
-
-typedef union _PCI_EXPRESS_CAPABILITIES_REGISTER {
-  struct {
-    USHORT CapabilityVersion:4;
-    USHORT DeviceType:4;
-    USHORT SlotImplemented:1;
-    USHORT InterruptMessageNumber:5;
-    USHORT Rsvd:2;
-  } DUMMYSTRUCTNAME;
-  USHORT AsUSHORT;
-} PCI_EXPRESS_CAPABILITIES_REGISTER, *PPCI_EXPRESS_CAPABILITIES_REGISTER;
-
-typedef union _PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER {
-  struct {
-    ULONG MaxPayloadSizeSupported:3;
-    ULONG PhantomFunctionsSupported:2;
-    ULONG ExtendedTagSupported:1;
-    ULONG L0sAcceptableLatency:3;
-    ULONG L1AcceptableLatency:3;
-    ULONG Undefined:3;
-    ULONG RoleBasedErrorReporting:1;
-    ULONG Rsvd1:2;
-    ULONG CapturedSlotPowerLimit:8;
-    ULONG CapturedSlotPowerLimitScale:2;
-    ULONG Rsvd2:4;
-  } DUMMYSTRUCTNAME;
-  ULONG AsULONG;
-} PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER, *PPCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER;
-
-#define PCI_EXPRESS_AER_DEVICE_CONTROL_MASK 0x07;
-
-typedef union _PCI_EXPRESS_DEVICE_CONTROL_REGISTER {
-  struct {
-    USHORT CorrectableErrorEnable:1;
-    USHORT NonFatalErrorEnable:1;
-    USHORT FatalErrorEnable:1;
-    USHORT UnsupportedRequestErrorEnable:1;
-    USHORT EnableRelaxedOrder:1;
-    USHORT MaxPayloadSize:3;
-    USHORT ExtendedTagEnable:1;
-    USHORT PhantomFunctionsEnable:1;
-    USHORT AuxPowerEnable:1;
-    USHORT NoSnoopEnable:1;
-    USHORT MaxReadRequestSize:3;
-    USHORT BridgeConfigRetryEnable:1;
-  } DUMMYSTRUCTNAME;
-  USHORT AsUSHORT;
-} PCI_EXPRESS_DEVICE_CONTROL_REGISTER, *PPCI_EXPRESS_DEVICE_CONTROL_REGISTER;
-
-#define PCI_EXPRESS_AER_DEVICE_STATUS_MASK 0x0F;
-
-typedef union _PCI_EXPRESS_DEVICE_STATUS_REGISTER {
-  struct {
-    USHORT CorrectableErrorDetected:1;
-    USHORT NonFatalErrorDetected:1;
-    USHORT FatalErrorDetected:1;
-    USHORT UnsupportedRequestDetected:1;
-    USHORT AuxPowerDetected:1;
-    USHORT TransactionsPending:1;
-    USHORT Rsvd:10;
-  } DUMMYSTRUCTNAME;
-  USHORT AsUSHORT;
-} PCI_EXPRESS_DEVICE_STATUS_REGISTER, *PPCI_EXPRESS_DEVICE_STATUS_REGISTER;
-
-typedef union _PCI_EXPRESS_LINK_CAPABILITIES_REGISTER {
-  struct {
-    ULONG MaximumLinkSpeed:4;
-    ULONG MaximumLinkWidth:6;
-    ULONG ActiveStatePMSupport:2;
-    ULONG L0sExitLatency:3;
-    ULONG L1ExitLatency:3;
-    ULONG ClockPowerManagement:1;
-    ULONG SurpriseDownErrorReportingCapable:1;
-    ULONG DataLinkLayerActiveReportingCapable:1;
-    ULONG Rsvd:3;
-    ULONG PortNumber:8;
-  } DUMMYSTRUCTNAME;
-  ULONG AsULONG;
-} PCI_EXPRESS_LINK_CAPABILITIES_REGISTER, *PPCI_EXPRESS_LINK_CAPABILITIES_REGISTER;
-
-typedef union _PCI_EXPRESS_LINK_CONTROL_REGISTER {
-  struct {
-    USHORT ActiveStatePMControl:2;
-    USHORT Rsvd1:1;
-    USHORT ReadCompletionBoundary:1;
-    USHORT LinkDisable:1;
-    USHORT RetrainLink:1;
-    USHORT CommonClockConfig:1;
-    USHORT ExtendedSynch:1;
-    USHORT EnableClockPowerManagement:1;
-    USHORT Rsvd2:7;
-  } DUMMYSTRUCTNAME;
-  USHORT AsUSHORT;
-} PCI_EXPRESS_LINK_CONTROL_REGISTER, *PPCI_EXPRESS_LINK_CONTROL_REGISTER;
-
-typedef union _PCI_EXPRESS_LINK_STATUS_REGISTER {
-  struct {
-    USHORT LinkSpeed:4;
-    USHORT LinkWidth:6;
-    USHORT Undefined:1;
-    USHORT LinkTraining:1;
-    USHORT SlotClockConfig:1;
-    USHORT DataLinkLayerActive:1;
-    USHORT Rsvd:2;
-  } DUMMYSTRUCTNAME;
-  USHORT AsUSHORT;
-} PCI_EXPRESS_LINK_STATUS_REGISTER, *PPCI_EXPRESS_LINK_STATUS_REGISTER;
-
-typedef union _PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER {
-  struct {
-    ULONG AttentionButtonPresent:1;
-    ULONG PowerControllerPresent:1;
-    ULONG MRLSensorPresent:1;
-    ULONG AttentionIndicatorPresent:1;
-    ULONG PowerIndicatorPresent:1;
-    ULONG HotPlugSurprise:1;
-    ULONG HotPlugCapable:1;
-    ULONG SlotPowerLimit:8;
-    ULONG SlotPowerLimitScale:2;
-    ULONG ElectromechanicalLockPresent:1;
-    ULONG NoCommandCompletedSupport:1;
-    ULONG PhysicalSlotNumber:13;
-  } DUMMYSTRUCTNAME;
-  ULONG AsULONG;
-} PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER, *PPCI_EXPRESS_SLOT_CAPABILITIES_REGISTER;
-
-typedef union _PCI_EXPRESS_SLOT_CONTROL_REGISTER {
-  struct {
-    USHORT AttentionButtonEnable:1;
-    USHORT PowerFaultDetectEnable:1;
-    USHORT MRLSensorEnable:1;
-    USHORT PresenceDetectEnable:1;
-    USHORT CommandCompletedEnable:1;
-    USHORT HotPlugInterruptEnable:1;
-    USHORT AttentionIndicatorControl:2;
-    USHORT PowerIndicatorControl:2;
-    USHORT PowerControllerControl:1;
-    USHORT ElectromechanicalLockControl:1;
-    USHORT DataLinkStateChangeEnable:1;
-    USHORT Rsvd:3;
-  } DUMMYSTRUCTNAME;
-  USHORT AsUSHORT;
-} PCI_EXPRESS_SLOT_CONTROL_REGISTER, *PPCI_EXPRESS_SLOT_CONTROL_REGISTER;
-
-typedef union _PCI_EXPRESS_SLOT_STATUS_REGISTER {
-  struct {
-    USHORT AttentionButtonPressed:1;
-    USHORT PowerFaultDetected:1;
-    USHORT MRLSensorChanged:1;
-    USHORT PresenceDetectChanged:1;
-    USHORT CommandCompleted:1;
-    USHORT MRLSensorState:1;
-    USHORT PresenceDetectState:1;
-    USHORT ElectromechanicalLockEngaged:1;
-    USHORT DataLinkStateChanged:1;
-    USHORT Rsvd:7;
-  } DUMMYSTRUCTNAME;
-  USHORT AsUSHORT;
-} PCI_EXPRESS_SLOT_STATUS_REGISTER, *PPCI_EXPRESS_SLOT_STATUS_REGISTER;
-
-typedef union _PCI_EXPRESS_ROOT_CONTROL_REGISTER {
-  struct {
-    USHORT CorrectableSerrEnable:1;
-    USHORT NonFatalSerrEnable:1;
-    USHORT FatalSerrEnable:1;
-    USHORT PMEInterruptEnable:1;
-    USHORT CRSSoftwareVisibilityEnable:1;
-    USHORT Rsvd:11;
-  } DUMMYSTRUCTNAME;
-  USHORT AsUSHORT;
-} PCI_EXPRESS_ROOT_CONTROL_REGISTER, *PPCI_EXPRESS_ROOT_CONTROL_REGISTER;
-
-typedef union _PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER {
-  struct {
-    USHORT CRSSoftwareVisibility:1;
-    USHORT Rsvd:15;
-  } DUMMYSTRUCTNAME;
-  USHORT AsUSHORT;
-} PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER, *PPCI_EXPRESS_ROOT_CAPABILITIES_REGISTER;
-
-typedef union _PCI_EXPRESS_ROOT_STATUS_REGISTER {
-  struct {
-    ULONG PMERequestorId:16;
-    ULONG PMEStatus:1;
-    ULONG PMEPending:1;
-    ULONG Rsvd:14;
-  } DUMMYSTRUCTNAME;
-  ULONG AsULONG;
-} PCI_EXPRESS_ROOT_STATUS_REGISTER, *PPCI_EXPRESS_ROOT_STATUS_REGISTER;
-
-typedef struct _PCI_EXPRESS_CAPABILITY {
-  PCI_CAPABILITIES_HEADER Header;
-  PCI_EXPRESS_CAPABILITIES_REGISTER ExpressCapabilities;
-  PCI_EXPRESS_DEVICE_CAPABILITIES_REGISTER DeviceCapabilities;
-  PCI_EXPRESS_DEVICE_CONTROL_REGISTER DeviceControl;
-  PCI_EXPRESS_DEVICE_STATUS_REGISTER DeviceStatus;
-  PCI_EXPRESS_LINK_CAPABILITIES_REGISTER LinkCapabilities;
-  PCI_EXPRESS_LINK_CONTROL_REGISTER LinkControl;
-  PCI_EXPRESS_LINK_STATUS_REGISTER LinkStatus;
-  PCI_EXPRESS_SLOT_CAPABILITIES_REGISTER SlotCapabilities;
-  PCI_EXPRESS_SLOT_CONTROL_REGISTER SlotControl;
-  PCI_EXPRESS_SLOT_STATUS_REGISTER SlotStatus;
-  PCI_EXPRESS_ROOT_CONTROL_REGISTER RootControl;
-  PCI_EXPRESS_ROOT_CAPABILITIES_REGISTER RootCapabilities;
-  PCI_EXPRESS_ROOT_STATUS_REGISTER RootStatus;
-} PCI_EXPRESS_CAPABILITY, *PPCI_EXPRESS_CAPABILITY;
-
-typedef enum {
-  MRLClosed = 0,
-  MRLOpen
-} PCI_EXPRESS_MRL_STATE;
-
-typedef enum {
-  SlotEmpty = 0,
-  CardPresent
-} PCI_EXPRESS_CARD_PRESENCE;
-
-typedef enum {
-  IndicatorOn = 1,
-  IndicatorBlink,
-  IndicatorOff
-} PCI_EXPRESS_INDICATOR_STATE;
-
-typedef enum {
-  PowerOn = 0,
-  PowerOff
-} PCI_EXPRESS_POWER_STATE;
-
-typedef enum {
-  L0sEntrySupport = 1,
-  L0sAndL1EntrySupport = 3
-} PCI_EXPRESS_ASPM_SUPPORT;
-
-typedef enum {
-  L0sAndL1EntryDisabled,
-  L0sEntryEnabled,
-  L1EntryEnabled,
-  L0sAndL1EntryEnabled
-} PCI_EXPRESS_ASPM_CONTROL;
-
-typedef enum {
-  L0s_Below64ns = 0,
-  L0s_64ns_128ns,
-  L0s_128ns_256ns,
-  L0s_256ns_512ns,
-  L0s_512ns_1us,
-  L0s_1us_2us,
-  L0s_2us_4us,
-  L0s_Above4us
-} PCI_EXPRESS_L0s_EXIT_LATENCY;
-
-typedef enum {
-  L1_Below1us = 0,
-  L1_1us_2us,
-  L1_2us_4us,
-  L1_4us_8us,
-  L1_8us_16us,
-  L1_16us_32us,
-  L1_32us_64us,
-  L1_Above64us
-} PCI_EXPRESS_L1_EXIT_LATENCY;
-
-typedef enum {
-  PciExpressEndpoint = 0,
-  PciExpressLegacyEndpoint,
-  PciExpressRootPort = 4,
-  PciExpressUpstreamSwitchPort,
-  PciExpressDownstreamSwitchPort,
-  PciExpressToPciXBridge,
-  PciXToExpressBridge,
-  PciExpressRootComplexIntegratedEndpoint,
-  PciExpressRootComplexEventCollector
-} PCI_EXPRESS_DEVICE_TYPE;
-
-typedef enum {
-  MaxPayload128Bytes = 0,
-  MaxPayload256Bytes,
-  MaxPayload512Bytes,
-  MaxPayload1024Bytes,
-  MaxPayload2048Bytes,
-  MaxPayload4096Bytes
-} PCI_EXPRESS_MAX_PAYLOAD_SIZE;
-
-typedef union _PCI_EXPRESS_PME_REQUESTOR_ID {
-  struct {
-    USHORT FunctionNumber:3;
-    USHORT DeviceNumber:5;
-    USHORT BusNumber:8;
-  } DUMMYSTRUCTNAME;
-  USHORT AsUSHORT;
-} PCI_EXPRESS_PME_REQUESTOR_ID, *PPCI_EXPRESS_PME_REQUESTOR_ID;
-
-#if defined(_WIN64)
-
-#ifndef USE_DMA_MACROS
-#define USE_DMA_MACROS
-#endif
-
-#ifndef NO_LEGACY_DRIVERS
-#define NO_LEGACY_DRIVERS
-#endif
-
-#endif /* defined(_WIN64) */
-
-typedef enum _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR_TYPE {
-  ResourceTypeSingle = 0,
-  ResourceTypeRange,
-  ResourceTypeExtendedCounterConfiguration,
-  ResourceTypeOverflow,
-  ResourceTypeMax
-} PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR_TYPE;
-
-typedef struct _PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR {
-  PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR_TYPE Type;
-  ULONG Flags;
-  union {
-    ULONG CounterIndex;
-    ULONG ExtendedRegisterAddress;
-    struct {
-      ULONG Begin;
-      ULONG End;
-    } Range;
-  } u;
-} PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR, *PPHYSICAL_COUNTER_RESOURCE_DESCRIPTOR;
-
-typedef struct _PHYSICAL_COUNTER_RESOURCE_LIST {
-  ULONG Count;
-  PHYSICAL_COUNTER_RESOURCE_DESCRIPTOR Descriptors[ANYSIZE_ARRAY];
-} PHYSICAL_COUNTER_RESOURCE_LIST, *PPHYSICAL_COUNTER_RESOURCE_LIST;
-
-typedef VOID
-(NTAPI *PciPin2Line)(
-  IN struct _BUS_HANDLER *BusHandler,
-  IN struct _BUS_HANDLER *RootHandler,
-  IN PCI_SLOT_NUMBER SlotNumber,
-  IN PPCI_COMMON_CONFIG PciData);
-
-typedef VOID
-(NTAPI *PciLine2Pin)(
-  IN struct _BUS_HANDLER *BusHandler,
-  IN struct _BUS_HANDLER *RootHandler,
-  IN PCI_SLOT_NUMBER SlotNumber,
-  IN PPCI_COMMON_CONFIG PciNewData,
-  IN PPCI_COMMON_CONFIG PciOldData);
-
-typedef VOID
-(NTAPI *PciReadWriteConfig)(
-  IN struct _BUS_HANDLER *BusHandler,
-  IN PCI_SLOT_NUMBER Slot,
-  IN PVOID Buffer,
-  IN ULONG Offset,
-  IN ULONG Length);
-
-#define PCI_DATA_TAG ' ICP'
-#define PCI_DATA_VERSION 1
-
-typedef struct _PCIBUSDATA {
-  ULONG Tag;
-  ULONG Version;
-  PciReadWriteConfig ReadConfig;
-  PciReadWriteConfig WriteConfig;
-  PciPin2Line Pin2Line;
-  PciLine2Pin Line2Pin;
-  PCI_SLOT_NUMBER ParentSlot;
-  PVOID Reserved[4];
-} PCIBUSDATA, *PPCIBUSDATA;
-
-#ifndef _PCIINTRF_X_
-#define _PCIINTRF_X_
-
-typedef ULONG
-(NTAPI *PCI_READ_WRITE_CONFIG)(
-  IN PVOID Context,
-  IN ULONG BusOffset,
-  IN ULONG Slot,
-  IN PVOID Buffer,
-  IN ULONG Offset,
-  IN ULONG Length);
-
-typedef VOID
-(NTAPI *PCI_PIN_TO_LINE)(
-  IN PVOID Context,
-  IN PPCI_COMMON_CONFIG PciData);
-
-typedef VOID
-(NTAPI *PCI_LINE_TO_PIN)(
-  IN PVOID Context,
-  IN PPCI_COMMON_CONFIG PciNewData,
-  IN PPCI_COMMON_CONFIG PciOldData);
-
-typedef VOID
-(NTAPI *PCI_ROOT_BUS_CAPABILITY)(
-  IN PVOID Context,
-  OUT PPCI_ROOT_BUS_HARDWARE_CAPABILITY HardwareCapability);
-
-typedef VOID
-(NTAPI *PCI_EXPRESS_WAKE_CONTROL)(
-  IN PVOID Context,
-  IN BOOLEAN EnableWake);
-
-typedef struct _PCI_BUS_INTERFACE_STANDARD {
-  USHORT Size;
-  USHORT Version;
-  PVOID Context;
-  PINTERFACE_REFERENCE InterfaceReference;
-  PINTERFACE_DEREFERENCE InterfaceDereference;
-  PCI_READ_WRITE_CONFIG ReadConfig;
-  PCI_READ_WRITE_CONFIG WriteConfig;
-  PCI_PIN_TO_LINE PinToLine;
-  PCI_LINE_TO_PIN LineToPin;
-  PCI_ROOT_BUS_CAPABILITY RootBusCapability;
-  PCI_EXPRESS_WAKE_CONTROL ExpressWakeControl;
-} PCI_BUS_INTERFACE_STANDARD, *PPCI_BUS_INTERFACE_STANDARD;
-
-#define PCI_BUS_INTERFACE_STANDARD_VERSION 1
-
-#endif /* _PCIINTRF_X_ */
-
-#if (NTDDI_VERSION >= NTDDI_WIN7)
-
-#define FILE_CHARACTERISTICS_EXPECT_ORDERLY_REMOVAL_EX     0x00004000
-#define FILE_CHARACTERISTICS_EXPECT_SURPRISE_REMOVAL_EX    0x00008000
-#define FILE_CHARACTERISTICS_REMOVAL_POLICY_MASK_EX \
-    (FILE_CHARACTERISTICS_EXPECT_ORDERLY_REMOVAL_EX | \
-     FILE_CHARACTERISTICS_EXPECT_SURPRISE_REMOVAL_EX)
-
-#define FILE_CHARACTERISTICS_EXPECT_ORDERLY_REMOVAL_DEPRECATED 0x00000200
-#define FILE_CHARACTERISTICS_EXPECT_SURPRISE_REMOVAL_DEPRECATED 0x00000300
-#define FILE_CHARACTERISTICS_REMOVAL_POLICY_MASK_DEPRECATED 0x00000300
-
-#else
-
-#define FILE_CHARACTERISTICS_EXPECT_ORDERLY_REMOVAL     0x00000200
-#define FILE_CHARACTERISTICS_EXPECT_SURPRISE_REMOVAL    0x00000300
-#define FILE_CHARACTERISTICS_REMOVAL_POLICY_MASK        0x00000300
-
-#define FILE_CHARACTERISTICS_EXPECT_ORDERLY_REMOVAL_EX FILE_CHARACTERISTICS_EXPECT_ORDERLY_REMOVAL
-#define FILE_CHARACTERISTICS_EXPECT_SURPRISE_REMOVAL_EX FILE_CHARACTERISTICS_EXPECT_SURPRISE_REMOVAL
-#define FILE_CHARACTERISTICS_REMOVAL_POLICY_MASK_EX FILE_CHARACTERISTICS_REMOVAL_POLICY_MASK
-
-#endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
-
-#define FILE_CHARACTERISTICS_PROPAGATED (   FILE_REMOVABLE_MEDIA   | \
-                                            FILE_READ_ONLY_DEVICE  | \
-                                            FILE_FLOPPY_DISKETTE   | \
-                                            FILE_WRITE_ONCE_MEDIA  | \
-                                            FILE_DEVICE_SECURE_OPEN  )
-
-typedef struct _FILE_ALIGNMENT_INFORMATION {
-  ULONG AlignmentRequirement;
-} FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
-
-typedef struct _FILE_NAME_INFORMATION {
-  ULONG FileNameLength;
-  WCHAR FileName[1];
-} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
-
-
-typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION {
-  ULONG FileAttributes;
-  ULONG ReparseTag;
-} FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION;
-
-typedef struct _FILE_DISPOSITION_INFORMATION {
-  BOOLEAN DeleteFile;
-} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
-
-typedef struct _FILE_END_OF_FILE_INFORMATION {
-  LARGE_INTEGER EndOfFile;
-} FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
-
-typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION {
-  LARGE_INTEGER ValidDataLength;
-} FILE_VALID_DATA_LENGTH_INFORMATION, *PFILE_VALID_DATA_LENGTH_INFORMATION;
-
-typedef struct _FILE_FS_LABEL_INFORMATION {
-  ULONG VolumeLabelLength;
-  WCHAR VolumeLabel[1];
-} FILE_FS_LABEL_INFORMATION, *PFILE_FS_LABEL_INFORMATION;
-
-typedef struct _FILE_FS_VOLUME_INFORMATION {
-  LARGE_INTEGER VolumeCreationTime;
-  ULONG VolumeSerialNumber;
-  ULONG VolumeLabelLength;
-  BOOLEAN SupportsObjects;
-  WCHAR VolumeLabel[1];
-} FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
-
-typedef struct _FILE_FS_SIZE_INFORMATION {
-  LARGE_INTEGER TotalAllocationUnits;
-  LARGE_INTEGER AvailableAllocationUnits;
-  ULONG SectorsPerAllocationUnit;
-  ULONG BytesPerSector;
-} FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION;
-
-typedef struct _FILE_FS_FULL_SIZE_INFORMATION {
-  LARGE_INTEGER TotalAllocationUnits;
-  LARGE_INTEGER CallerAvailableAllocationUnits;
-  LARGE_INTEGER ActualAvailableAllocationUnits;
-  ULONG SectorsPerAllocationUnit;
-  ULONG BytesPerSector;
-} FILE_FS_FULL_SIZE_INFORMATION, *PFILE_FS_FULL_SIZE_INFORMATION;
-
-typedef struct _FILE_FS_OBJECTID_INFORMATION {
-  UCHAR ObjectId[16];
-  UCHAR ExtendedInfo[48];
-} FILE_FS_OBJECTID_INFORMATION, *PFILE_FS_OBJECTID_INFORMATION;
-
-typedef union _FILE_SEGMENT_ELEMENT {
-  PVOID64 Buffer;
-  ULONGLONG Alignment;
-}FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT;
-
-#define IOCTL_AVIO_ALLOCATE_STREAM      CTL_CODE(FILE_DEVICE_AVIO, 1, METHOD_BUFFERED, FILE_SPECIAL_ACCESS)
-#define IOCTL_AVIO_FREE_STREAM          CTL_CODE(FILE_DEVICE_AVIO, 2, METHOD_BUFFERED, FILE_SPECIAL_ACCESS)
-#define IOCTL_AVIO_MODIFY_STREAM        CTL_CODE(FILE_DEVICE_AVIO, 3, METHOD_BUFFERED, FILE_SPECIAL_ACCESS)
-
-typedef enum _BUS_DATA_TYPE {
-  ConfigurationSpaceUndefined = -1,
-  Cmos,
-  EisaConfiguration,
-  Pos,
-  CbusConfiguration,
-  PCIConfiguration,
-  VMEConfiguration,
-  NuBusConfiguration,
-  PCMCIAConfiguration,
-  MPIConfiguration,
-  MPSAConfiguration,
-  PNPISAConfiguration,
-  SgiInternalConfiguration,
-  MaximumBusDataType
-} BUS_DATA_TYPE, *PBUS_DATA_TYPE;
-
-/* Hardware Abstraction Layer Types */
-
-typedef BOOLEAN
-(NTAPI *PHAL_RESET_DISPLAY_PARAMETERS)(
-  IN ULONG Columns,
-  IN ULONG Rows);
-
-typedef PBUS_HANDLER
-(FASTCALL *pHalHandlerForBus)(
-  IN INTERFACE_TYPE InterfaceType,
-  IN ULONG BusNumber);
-
-typedef VOID
-(FASTCALL *pHalReferenceBusHandler)(
-  IN PBUS_HANDLER BusHandler);
-
 typedef enum _HAL_QUERY_INFORMATION_CLASS {
   HalInstalledBusInformation,
   HalProfileSourceInformation,
@@ -1307,39 +353,113 @@ typedef enum _HAL_SET_INFORMATION_CLASS {
   HalProfileDpgoSourceInterruptHandler
 } HAL_SET_INFORMATION_CLASS, *PHAL_SET_INFORMATION_CLASS;
 
-typedef NTSTATUS
-(NTAPI *pHalQuerySystemInformation)(
-  IN HAL_QUERY_INFORMATION_CLASS InformationClass,
-  IN ULONG BufferSize,
-  IN OUT PVOID Buffer,
-  OUT PULONG ReturnedLength);
+typedef struct _HAL_PROFILE_SOURCE_INTERVAL {
+  KPROFILE_SOURCE Source;
+  ULONG_PTR Interval;
+} HAL_PROFILE_SOURCE_INTERVAL, *PHAL_PROFILE_SOURCE_INTERVAL;
 
-typedef NTSTATUS
-(NTAPI *pHalSetSystemInformation)(
-  IN HAL_SET_INFORMATION_CLASS InformationClass,
-  IN ULONG BufferSize,
-  IN PVOID Buffer);
+typedef struct _HAL_PROFILE_SOURCE_INFORMATION {
+  KPROFILE_SOURCE Source;
+  BOOLEAN Supported;
+  ULONG Interval;
+} HAL_PROFILE_SOURCE_INFORMATION, *PHAL_PROFILE_SOURCE_INFORMATION;
 
-typedef VOID
-(FASTCALL *pHalExamineMBR)(
-  IN PDEVICE_OBJECT DeviceObject,
-  IN ULONG SectorSize,
-  IN ULONG MBRTypeIdentifier,
-  OUT PVOID *Buffer);
+typedef struct _MAP_REGISTER_ENTRY {
+  PVOID MapRegister;
+  BOOLEAN WriteToDevice;
+} MAP_REGISTER_ENTRY, *PMAP_REGISTER_ENTRY;
 
-typedef NTSTATUS
-(FASTCALL *pHalIoReadPartitionTable)(
-  IN PDEVICE_OBJECT DeviceObject,
-  IN ULONG SectorSize,
-  IN BOOLEAN ReturnRecognizedPartitions,
-  OUT struct _DRIVE_LAYOUT_INFORMATION **PartitionBuffer);
+typedef struct _DEBUG_DEVICE_ADDRESS {
+  UCHAR Type;
+  BOOLEAN Valid;
+  UCHAR Reserved[2];
+  PUCHAR TranslatedAddress;
+  ULONG Length;
+} DEBUG_DEVICE_ADDRESS, *PDEBUG_DEVICE_ADDRESS;
 
-typedef NTSTATUS
-(FASTCALL *pHalIoSetPartitionInformation)(
-  IN PDEVICE_OBJECT DeviceObject,
-  IN ULONG SectorSize,
-  IN ULONG PartitionNumber,
-  IN ULONG PartitionType);
+typedef struct _DEBUG_MEMORY_REQUIREMENTS {
+  PHYSICAL_ADDRESS Start;
+  PHYSICAL_ADDRESS MaxEnd;
+  PVOID VirtualAddress;
+  ULONG Length;
+  BOOLEAN Cached;
+  BOOLEAN Aligned;
+} DEBUG_MEMORY_REQUIREMENTS, *PDEBUG_MEMORY_REQUIREMENTS;
+
+typedef struct _DEBUG_DEVICE_DESCRIPTOR {
+  ULONG Bus;
+  ULONG Slot;
+  USHORT Segment;
+  USHORT VendorID;
+  USHORT DeviceID;
+  UCHAR BaseClass;
+  UCHAR SubClass;
+  UCHAR ProgIf;
+  BOOLEAN Initialized;
+  BOOLEAN Configured;
+  DEBUG_DEVICE_ADDRESS BaseAddress[6];
+  DEBUG_MEMORY_REQUIREMENTS Memory;
+} DEBUG_DEVICE_DESCRIPTOR, *PDEBUG_DEVICE_DESCRIPTOR;
+
+typedef struct _PM_DISPATCH_TABLE {
+  ULONG Signature;
+  ULONG Version;
+  PVOID Function[1];
+} PM_DISPATCH_TABLE, *PPM_DISPATCH_TABLE;
+
+typedef enum _RESOURCE_TRANSLATION_DIRECTION {
+  TranslateChildToParent,
+  TranslateParentToChild
+} RESOURCE_TRANSLATION_DIRECTION;
+
+typedef NTSTATUS
+(NTAPI *PTRANSLATE_RESOURCE_HANDLER)(
+  IN OUT PVOID Context,
+  IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Source,
+  IN RESOURCE_TRANSLATION_DIRECTION Direction,
+  IN ULONG AlternativesCount OPTIONAL,
+  IN IO_RESOURCE_DESCRIPTOR Alternatives[],
+  IN PDEVICE_OBJECT PhysicalDeviceObject,
+  OUT PCM_PARTIAL_RESOURCE_DESCRIPTOR Target);
+
+typedef NTSTATUS
+(NTAPI *PTRANSLATE_RESOURCE_REQUIREMENTS_HANDLER)(
+  IN PVOID Context OPTIONAL,
+  IN PIO_RESOURCE_DESCRIPTOR Source,
+  IN PDEVICE_OBJECT PhysicalDeviceObject,
+  OUT PULONG TargetCount,
+  OUT PIO_RESOURCE_DESCRIPTOR *Target);
+
+typedef struct _TRANSLATOR_INTERFACE {
+  USHORT Size;
+  USHORT Version;
+  PVOID Context;
+  PINTERFACE_REFERENCE InterfaceReference;
+  PINTERFACE_DEREFERENCE InterfaceDereference;
+  PTRANSLATE_RESOURCE_HANDLER TranslateResources;
+  PTRANSLATE_RESOURCE_REQUIREMENTS_HANDLER TranslateResourceRequirements;
+} TRANSLATOR_INTERFACE, *PTRANSLATOR_INTERFACE;
+
+typedef VOID
+(FASTCALL *pHalExamineMBR)(
+  IN PDEVICE_OBJECT DeviceObject,
+  IN ULONG SectorSize,
+  IN ULONG MBRTypeIdentifier,
+  OUT PVOID *Buffer);
+
+typedef NTSTATUS
+(FASTCALL *pHalIoReadPartitionTable)(
+  IN PDEVICE_OBJECT DeviceObject,
+  IN ULONG SectorSize,
+  IN BOOLEAN ReturnRecognizedPartitions,
+  OUT struct _DRIVE_LAYOUT_INFORMATION **PartitionBuffer);
+
+typedef NTSTATUS
+(FASTCALL *pHalIoSetPartitionInformation)(
+  IN PDEVICE_OBJECT DeviceObject,
+  IN ULONG SectorSize,
+  IN ULONG PartitionNumber,
+  IN ULONG PartitionType);
 
 typedef NTSTATUS
 (FASTCALL *pHalIoWritePartitionTable)(
@@ -1349,6 +469,28 @@ typedef NTSTATUS
   IN ULONG NumberOfHeads,
   IN struct _DRIVE_LAYOUT_INFORMATION *PartitionBuffer);
 
+typedef PBUS_HANDLER
+(FASTCALL *pHalHandlerForBus)(
+  IN INTERFACE_TYPE InterfaceType,
+  IN ULONG BusNumber);
+
+typedef VOID
+(FASTCALL *pHalReferenceBusHandler)(
+  IN PBUS_HANDLER BusHandler);
+
+typedef NTSTATUS
+(NTAPI *pHalQuerySystemInformation)(
+  IN HAL_QUERY_INFORMATION_CLASS InformationClass,
+  IN ULONG BufferSize,
+  IN OUT PVOID Buffer,
+  OUT PULONG ReturnedLength);
+
+typedef NTSTATUS
+(NTAPI *pHalSetSystemInformation)(
+  IN HAL_SET_INFORMATION_CLASS InformationClass,
+  IN ULONG BufferSize,
+  IN PVOID Buffer);
+
 typedef NTSTATUS
 (NTAPI *pHalQueryBusSlots)(
   IN PBUS_HANDLER BusHandler,
@@ -1360,12 +502,6 @@ typedef NTSTATUS
 (NTAPI *pHalInitPnpDriver)(
   VOID);
 
-typedef struct _PM_DISPATCH_TABLE {
-  ULONG Signature;
-  ULONG Version;
-  PVOID Function[1];
-} PM_DISPATCH_TABLE, *PPM_DISPATCH_TABLE;
-
 typedef NTSTATUS
 (NTAPI *pHalInitPowerManagement)(
   IN PPM_DISPATCH_TABLE PmDriverDispatchTable,
@@ -1405,7 +541,12 @@ typedef NTSTATUS
   IN PHYSICAL_ADDRESS PhysicalAddress,
   IN LARGE_INTEGER NumberOfBytes);
 
-typedef BOOLEAN
+typedef VOID
+(NTAPI *pHalEndOfBoot)(
+  VOID);
+
+typedef
+BOOLEAN
 (NTAPI *pHalTranslateBusAddress)(
   IN INTERFACE_TYPE InterfaceType,
   IN ULONG BusNumber,
@@ -1413,7 +554,8 @@ typedef BOOLEAN
   IN OUT PULONG AddressSpace,
   OUT PPHYSICAL_ADDRESS TranslatedAddress);
 
-typedef NTSTATUS
+typedef
+NTSTATUS
 (NTAPI *pHalAssignSlotResources)(
   IN PUNICODE_STRING RegistryPath,
   IN PUNICODE_STRING DriverClassName OPTIONAL,
@@ -1424,24 +566,23 @@ typedef NTSTATUS
   IN ULONG SlotNumber,
   IN OUT PCM_RESOURCE_LIST *AllocatedResources);
 
-typedef VOID
+typedef
+VOID
 (NTAPI *pHalHaltSystem)(
   VOID);
 
-typedef BOOLEAN
+typedef
+BOOLEAN
 (NTAPI *pHalResetDisplay)(
   VOID);
 
-typedef struct _MAP_REGISTER_ENTRY {
-  PVOID MapRegister;
-  BOOLEAN WriteToDevice;
-} MAP_REGISTER_ENTRY, *PMAP_REGISTER_ENTRY;
-
-typedef UCHAR
+typedef
+UCHAR
 (NTAPI *pHalVectorToIDTEntry)(
   ULONG Vector);
 
-typedef BOOLEAN
+typedef
+BOOLEAN
 (NTAPI *pHalFindBusAddressTranslation)(
   IN PHYSICAL_ADDRESS BusAddress,
   IN OUT PULONG AddressSpace,
@@ -1449,33 +590,94 @@ typedef BOOLEAN
   IN OUT PULONG_PTR Context,
   IN BOOLEAN NextBus);
 
-typedef VOID
-(NTAPI *pHalEndOfBoot)(
-  VOID);
+typedef
+NTSTATUS
+(NTAPI *pKdSetupPciDeviceForDebugging)(
+  IN PVOID LoaderBlock OPTIONAL,
+  IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice);
+
+typedef
+NTSTATUS
+(NTAPI *pKdReleasePciDeviceForDebugging)(
+  IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice);
+
+typedef
+PVOID
+(NTAPI *pKdGetAcpiTablePhase0)(
+  IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
+  IN ULONG Signature);
 
-typedef PVOID
+typedef
+PVOID
 (NTAPI *pHalGetAcpiTable)(
   IN ULONG Signature,
   IN PCSTR OemId OPTIONAL,
   IN PCSTR OemTableId OPTIONAL);
+  
+typedef
+VOID
+(NTAPI *pKdCheckPowerButton)(
+  VOID);
 
-#if defined(_IA64_)
-typedef NTSTATUS
-(*pHalGetErrorCapList)(
-  IN OUT PULONG CapsListLength,
-  IN OUT PUCHAR ErrorCapList);
+#if (NTDDI_VERSION >= NTDDI_VISTA)
+typedef
+PVOID
+(NTAPI *pKdMapPhysicalMemory64)(
+  IN PHYSICAL_ADDRESS PhysicalAddress,
+  IN ULONG NumberPages,
+  IN BOOLEAN FlushCurrentTLB);
 
-typedef NTSTATUS
-(*pHalInjectError)(
-  IN ULONG BufferLength,
-  IN PUCHAR Buffer);
+typedef
+VOID
+(NTAPI *pKdUnmapVirtualAddress)(
+  IN PVOID VirtualAddress,
+  IN ULONG NumberPages,
+  IN BOOLEAN FlushCurrentTLB);
+#else
+typedef
+PVOID
+(NTAPI *pKdMapPhysicalMemory64)(
+  IN PHYSICAL_ADDRESS PhysicalAddress,
+  IN ULONG NumberPages);
+
+typedef
+VOID
+(NTAPI *pKdUnmapVirtualAddress)(
+  IN PVOID VirtualAddress,
+  IN ULONG NumberPages);
 #endif
 
-typedef VOID
+
+typedef
+ULONG
+(NTAPI *pKdGetPciDataByOffset)(
+  IN ULONG BusNumber,
+  IN ULONG SlotNumber,
+  OUT PVOID Buffer,
+  IN ULONG Offset,
+  IN ULONG Length);
+
+typedef
+ULONG
+(NTAPI *pKdSetPciDataByOffset)(
+  IN ULONG BusNumber,
+  IN ULONG SlotNumber,
+  IN PVOID Buffer,
+  IN ULONG Offset,
+  IN ULONG Length);
+
+typedef BOOLEAN
+(NTAPI *PHAL_RESET_DISPLAY_PARAMETERS)(
+  IN ULONG Columns,
+  IN ULONG Rows);
+
+typedef
+VOID
 (NTAPI *PCI_ERROR_HANDLER_CALLBACK)(
   VOID);
 
-typedef VOID
+typedef
+VOID
 (NTAPI *pHalSetPciErrorHandlerCallback)(
   IN PCI_ERROR_HANDLER_CALLBACK Callback);
 
@@ -1549,3808 +751,1967 @@ extern NTKERNELAPI HAL_DISPATCH HalDispatchTable;
 #define HalMirrorPhysicalMemory         HALDISPATCH->HalMirrorPhysicalMemory
 #define HalEndOfBoot                    HALDISPATCH->HalEndOfBoot
 #define HalMirrorVerify                 HALDISPATCH->HalMirrorVerify
-#define HalGetCachedAcpiTable           HALDISPATCH->HalGetCachedAcpiTable
-#define HalSetPciErrorHandlerCallback   HALDISPATCH->HalSetPciErrorHandlerCallback
-#if defined(_IA64_)
-#define HalGetErrorCapList              HALDISPATCH->HalGetErrorCapList
-#define HalInjectError                  HALDISPATCH->HalInjectError
-#endif
-
-typedef struct _HAL_BUS_INFORMATION {
-  INTERFACE_TYPE BusType;
-  BUS_DATA_TYPE ConfigurationType;
-  ULONG BusNumber;
-  ULONG Reserved;
-} HAL_BUS_INFORMATION, *PHAL_BUS_INFORMATION;
-
-typedef struct _HAL_PROFILE_SOURCE_INFORMATION {
-  KPROFILE_SOURCE Source;
-  BOOLEAN Supported;
-  ULONG Interval;
-} HAL_PROFILE_SOURCE_INFORMATION, *PHAL_PROFILE_SOURCE_INFORMATION;
-
-typedef struct _HAL_PROFILE_SOURCE_INFORMATION_EX {
-  KPROFILE_SOURCE Source;
-  BOOLEAN Supported;
-  ULONG_PTR Interval;
-  ULONG_PTR DefInterval;
-  ULONG_PTR MaxInterval;
-  ULONG_PTR MinInterval;
-} HAL_PROFILE_SOURCE_INFORMATION_EX, *PHAL_PROFILE_SOURCE_INFORMATION_EX;
 
-typedef struct _HAL_PROFILE_SOURCE_INTERVAL {
-  KPROFILE_SOURCE Source;
-  ULONG_PTR Interval;
-} HAL_PROFILE_SOURCE_INTERVAL, *PHAL_PROFILE_SOURCE_INTERVAL;
+typedef struct _FILE_ALIGNMENT_INFORMATION {
+  ULONG AlignmentRequirement;
+} FILE_ALIGNMENT_INFORMATION, *PFILE_ALIGNMENT_INFORMATION;
 
-typedef struct _HAL_PROFILE_SOURCE_LIST {
-  KPROFILE_SOURCE Source;
-  PWSTR Description;
-} HAL_PROFILE_SOURCE_LIST, *PHAL_PROFILE_SOURCE_LIST;
+typedef struct _FILE_NAME_INFORMATION {
+  ULONG FileNameLength;
+  WCHAR FileName[1];
+} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
 
-typedef enum _HAL_DISPLAY_BIOS_INFORMATION {
-  HalDisplayInt10Bios,
-  HalDisplayEmulatedBios,
-  HalDisplayNoBios
-} HAL_DISPLAY_BIOS_INFORMATION, *PHAL_DISPLAY_BIOS_INFORMATION;
 
-typedef struct _HAL_POWER_INFORMATION {
-  ULONG TBD;
-} HAL_POWER_INFORMATION, *PHAL_POWER_INFORMATION;
+typedef struct _FILE_ATTRIBUTE_TAG_INFORMATION {
+  ULONG FileAttributes;
+  ULONG ReparseTag;
+} FILE_ATTRIBUTE_TAG_INFORMATION, *PFILE_ATTRIBUTE_TAG_INFORMATION;
 
-typedef struct _HAL_PROCESSOR_SPEED_INFO {
-  ULONG ProcessorSpeed;
-} HAL_PROCESSOR_SPEED_INFORMATION, *PHAL_PROCESSOR_SPEED_INFORMATION;
+typedef struct _FILE_DISPOSITION_INFORMATION {
+  BOOLEAN DeleteFile;
+} FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION;
 
-typedef struct _HAL_CALLBACKS {
-  PCALLBACK_OBJECT SetSystemInformation;
-  PCALLBACK_OBJECT BusCheck;
-} HAL_CALLBACKS, *PHAL_CALLBACKS;
+typedef struct _FILE_END_OF_FILE_INFORMATION {
+  LARGE_INTEGER EndOfFile;
+} FILE_END_OF_FILE_INFORMATION, *PFILE_END_OF_FILE_INFORMATION;
 
-typedef struct _HAL_PROCESSOR_FEATURE {
-  ULONG UsableFeatureBits;
-} HAL_PROCESSOR_FEATURE;
+typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION {
+  LARGE_INTEGER ValidDataLength;
+} FILE_VALID_DATA_LENGTH_INFORMATION, *PFILE_VALID_DATA_LENGTH_INFORMATION;
 
-typedef NTSTATUS
-(NTAPI *PHALIOREADWRITEHANDLER)(
-  IN BOOLEAN fRead,
-  IN ULONG dwAddr,
-  IN ULONG dwSize,
-  IN OUT PULONG pdwData);
+typedef union _FILE_SEGMENT_ELEMENT {
+  PVOID64 Buffer;
+  ULONGLONG Alignment;
+}FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT;
 
-typedef struct _HAL_AMLI_BAD_IO_ADDRESS_LIST {
-  ULONG BadAddrBegin;
-  ULONG BadAddrSize;
-  ULONG OSVersionTrigger;
-  PHALIOREADWRITEHANDLER IOHandler;
-} HAL_AMLI_BAD_IO_ADDRESS_LIST, *PHAL_AMLI_BAD_IO_ADDRESS_LIST;
+#define SE_UNSOLICITED_INPUT_PRIVILEGE    6
 
-#if defined(_X86_) || defined(_IA64_) || defined(_AMD64_)
-
-typedef VOID
-(NTAPI *PHALMCAINTERFACELOCK)(
-  VOID);
-
-typedef VOID
-(NTAPI *PHALMCAINTERFACEUNLOCK)(
-  VOID);
-
-typedef NTSTATUS
-(NTAPI *PHALMCAINTERFACEREADREGISTER)(
-  IN UCHAR BankNumber,
-  IN OUT PVOID Exception);
-
-typedef struct _HAL_MCA_INTERFACE {
-  PHALMCAINTERFACELOCK Lock;
-  PHALMCAINTERFACEUNLOCK Unlock;
-  PHALMCAINTERFACEREADREGISTER ReadRegister;
-} HAL_MCA_INTERFACE;
-
-typedef enum {
-  ApicDestinationModePhysical = 1,
-  ApicDestinationModeLogicalFlat,
-  ApicDestinationModeLogicalClustered,
-  ApicDestinationModeUnknown
-} HAL_APIC_DESTINATION_MODE, *PHAL_APIC_DESTINATION_MODE;
-
-#if defined(_AMD64_)
-
-struct _KTRAP_FRAME;
-struct _KEXCEPTION_FRAME;
-
-typedef ERROR_SEVERITY
-(NTAPI *PDRIVER_EXCPTN_CALLBACK)(
-  IN PVOID Context,
-  IN struct _KTRAP_FRAME *TrapFrame,
-  IN struct _KEXCEPTION_FRAME *ExceptionFrame,
-  IN PMCA_EXCEPTION Exception);
-
-#endif
-
-#if defined(_X86_) || defined(_IA64_)
-typedef
-#if defined(_IA64_)
-ERROR_SEVERITY
-#else
-VOID
-#endif
-(NTAPI *PDRIVER_EXCPTN_CALLBACK)(
-  IN PVOID Context,
-  IN PMCA_EXCEPTION BankLog);
+#if (NTDDI_VERSION >= NTDDI_WIN2K)
+NTSYSAPI
+ULONGLONG
+NTAPI
+VerSetConditionMask(
+  IN ULONGLONG ConditionMask,
+  IN ULONG TypeMask,
+  IN UCHAR Condition);
 #endif
 
-typedef PDRIVER_EXCPTN_CALLBACK PDRIVER_MCA_EXCEPTION_CALLBACK;
-
-typedef struct _MCA_DRIVER_INFO {
-  PDRIVER_MCA_EXCEPTION_CALLBACK ExceptionCallback;
-  PKDEFERRED_ROUTINE DpcCallback;
-  PVOID DeviceContext;
-} MCA_DRIVER_INFO, *PMCA_DRIVER_INFO;
-
-typedef struct _HAL_ERROR_INFO {
-  ULONG Version;
-  ULONG InitMaxSize;
-  ULONG McaMaxSize;
-  ULONG McaPreviousEventsCount;
-  ULONG McaCorrectedEventsCount;
-  ULONG McaKernelDeliveryFails;
-  ULONG McaDriverDpcQueueFails;
-  ULONG McaReserved;
-  ULONG CmcMaxSize;
-  ULONG CmcPollingInterval;
-  ULONG CmcInterruptsCount;
-  ULONG CmcKernelDeliveryFails;
-  ULONG CmcDriverDpcQueueFails;
-  ULONG CmcGetStateFails;
-  ULONG CmcClearStateFails;
-  ULONG CmcReserved;
-  ULONGLONG CmcLogId;
-  ULONG CpeMaxSize;
-  ULONG CpePollingInterval;
-  ULONG CpeInterruptsCount;
-  ULONG CpeKernelDeliveryFails;
-  ULONG CpeDriverDpcQueueFails;
-  ULONG CpeGetStateFails;
-  ULONG CpeClearStateFails;
-  ULONG CpeInterruptSources;
-  ULONGLONG CpeLogId;
-  ULONGLONG KernelReserved[4];
-} HAL_ERROR_INFO, *PHAL_ERROR_INFO;
-
-#define HAL_MCE_INTERRUPTS_BASED ((ULONG)-1)
-#define HAL_MCE_DISABLED          ((ULONG)0)
-
-#define HAL_CMC_INTERRUPTS_BASED  HAL_MCE_INTERRUPTS_BASED
-#define HAL_CMC_DISABLED          HAL_MCE_DISABLED
-
-#define HAL_CPE_INTERRUPTS_BASED  HAL_MCE_INTERRUPTS_BASED
-#define HAL_CPE_DISABLED          HAL_MCE_DISABLED
-
-#define HAL_MCA_INTERRUPTS_BASED  HAL_MCE_INTERRUPTS_BASED
-#define HAL_MCA_DISABLED          HAL_MCE_DISABLED
-
-typedef VOID
-(NTAPI *PDRIVER_CMC_EXCEPTION_CALLBACK)(
-  IN PVOID Context,
-  IN PCMC_EXCEPTION CmcLog);
-
-typedef VOID
-(NTAPI *PDRIVER_CPE_EXCEPTION_CALLBACK)(
-  IN PVOID Context,
-  IN PCPE_EXCEPTION CmcLog);
-
-typedef struct _CMC_DRIVER_INFO {
-  PDRIVER_CMC_EXCEPTION_CALLBACK ExceptionCallback;
-  PKDEFERRED_ROUTINE DpcCallback;
-  PVOID DeviceContext;
-} CMC_DRIVER_INFO, *PCMC_DRIVER_INFO;
-
-typedef struct _CPE_DRIVER_INFO {
-  PDRIVER_CPE_EXCEPTION_CALLBACK ExceptionCallback;
-  PKDEFERRED_ROUTINE DpcCallback;
-  PVOID DeviceContext;
-} CPE_DRIVER_INFO, *PCPE_DRIVER_INFO;
-
-#endif // defined(_X86_) || defined(_IA64_) || defined(_AMD64_)
-
-#if defined(_IA64_)
+#define VER_SET_CONDITION(ConditionMask, TypeBitMask, ComparisonType)  \
+        ((ConditionMask) = VerSetConditionMask((ConditionMask), \
+        (TypeBitMask), (ComparisonType)))
 
-typedef NTSTATUS
-(*HALSENDCROSSPARTITIONIPI)(
-  IN USHORT ProcessorID,
-  IN UCHAR HardwareVector);
+/* RtlVerifyVersionInfo() TypeMask */
 
-typedef NTSTATUS
-(*HALRESERVECROSSPARTITIONINTERRUPTVECTOR)(
-  OUT PULONG Vector,
-  OUT PKIRQL Irql,
-  IN OUT PGROUP_AFFINITY Affinity,
-  OUT PUCHAR HardwareVector);
+#define VER_MINORVERSION                  0x0000001
+#define VER_MAJORVERSION                  0x0000002
+#define VER_BUILDNUMBER                   0x0000004
+#define VER_PLATFORMID                    0x0000008
+#define VER_SERVICEPACKMINOR              0x0000010
+#define VER_SERVICEPACKMAJOR              0x0000020
+#define VER_SUITENAME                     0x0000040
+#define VER_PRODUCT_TYPE                  0x0000080
 
-typedef VOID
-(*HALFREECROSSPARTITIONINTERRUPTVECTOR)(
-  IN ULONG Vector,
-  IN PGROUP_AFFINITY Affinity);
+/* RtlVerifyVersionInfo() ComparisonType */
 
-typedef struct _HAL_CROSS_PARTITION_IPI_INTERFACE {
-  HALSENDCROSSPARTITIONIPI HalSendCrossPartitionIpi;
-  HALRESERVECROSSPARTITIONINTERRUPTVECTOR HalReserveCrossPartitionInterruptVector;
-  HALFREECROSSPARTITIONINTERRUPTVECTOR HalFreeCrossPartitionInterruptVector;
-} HAL_CROSS_PARTITION_IPI_INTERFACE;
+#define VER_EQUAL                       1
+#define VER_GREATER                     2
+#define VER_GREATER_EQUAL               3
+#define VER_LESS                        4
+#define VER_LESS_EQUAL                  5
+#define VER_AND                         6
+#define VER_OR                          7
 
-#define HAL_CROSS_PARTITION_IPI_INTERFACE_MINIMUM_SIZE \
-    FIELD_OFFSET(HAL_CROSS_PARTITION_IPI_INTERFACE,    \
-                 HalFreeCrossPartitionInterruptVector)
+#define VER_CONDITION_MASK              7
+#define VER_NUM_BITS_PER_CONDITION_MASK 3
 
-#endif /* defined(_IA64_) */
+typedef struct _IMAGE_INFO {
+  _ANONYMOUS_UNION union {
+    ULONG Properties;
+    _ANONYMOUS_STRUCT struct {
+      ULONG ImageAddressingMode:8;
+      ULONG SystemModeImage:1;
+      ULONG ImageMappedToAllPids:1;
+      ULONG ExtendedInfoPresent:1;
+      ULONG Reserved:22;
+    } DUMMYSTRUCTNAME;
+  } DUMMYUNIONNAME;
+  PVOID ImageBase;
+  ULONG ImageSelector;
+  SIZE_T ImageSize;
+  ULONG ImageSectionNumber;
+} IMAGE_INFO, *PIMAGE_INFO;
 
-typedef struct _HAL_PLATFORM_INFORMATION {
-  ULONG PlatformFlags;
-} HAL_PLATFORM_INFORMATION, *PHAL_PLATFORM_INFORMATION;
+#define IMAGE_ADDRESSING_MODE_32BIT       3
 
-#define HAL_PLATFORM_DISABLE_WRITE_COMBINING      0x01L
-#define HAL_PLATFORM_DISABLE_PTCG                 0x04L
-#define HAL_PLATFORM_DISABLE_UC_MAIN_MEMORY       0x08L
-#define HAL_PLATFORM_ENABLE_WRITE_COMBINING_MMIO  0x10L
-#define HAL_PLATFORM_ACPI_TABLES_CACHED           0x20L
+typedef enum _BUS_DATA_TYPE {
+  ConfigurationSpaceUndefined = -1,
+  Cmos,
+  EisaConfiguration,
+  Pos,
+  CbusConfiguration,
+  PCIConfiguration,
+  VMEConfiguration,
+  NuBusConfiguration,
+  PCMCIAConfiguration,
+  MPIConfiguration,
+  MPSAConfiguration,
+  PNPISAConfiguration,
+  SgiInternalConfiguration,
+  MaximumBusDataType
+} BUS_DATA_TYPE, *PBUS_DATA_TYPE;
 
-/******************************************************************************
- *                              Kernel Types                                  *
- ******************************************************************************/
+typedef struct _NT_TIB {
+  struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;
+  PVOID StackBase;
+  PVOID StackLimit;
+  PVOID SubSystemTib;
+  _ANONYMOUS_UNION union {
+    PVOID FiberData;
+    ULONG Version;
+  } DUMMYUNIONNAME;
+  PVOID ArbitraryUserPointer;
+  struct _NT_TIB *Self;
+} NT_TIB, *PNT_TIB;
 
-#define NX_SUPPORT_POLICY_ALWAYSOFF 0
-#define NX_SUPPORT_POLICY_ALWAYSON 1
-#define NX_SUPPORT_POLICY_OPTIN 2
-#define NX_SUPPORT_POLICY_OPTOUT 3
+typedef struct _NT_TIB32 {
+  ULONG ExceptionList;
+  ULONG StackBase;
+  ULONG StackLimit;
+  ULONG SubSystemTib;
+  __GNU_EXTENSION union {
+    ULONG FiberData;
+    ULONG Version;
+  };
+  ULONG ArbitraryUserPointer;
+  ULONG Self;
+} NT_TIB32,*PNT_TIB32;
 
-typedef VOID
-(NTAPI *PEXPAND_STACK_CALLOUT)(
-  IN PVOID Parameter OPTIONAL);
+typedef struct _NT_TIB64 {
+  ULONG64 ExceptionList;
+  ULONG64 StackBase;
+  ULONG64 StackLimit;
+  ULONG64 SubSystemTib;
+  __GNU_EXTENSION union {
+    ULONG64 FiberData;
+    ULONG Version;
+  };
+  ULONG64 ArbitraryUserPointer;
+  ULONG64 Self;
+} NT_TIB64,*PNT_TIB64;
 
-typedef VOID
-(NTAPI *PTIMER_APC_ROUTINE)(
-  IN PVOID TimerContext,
-  IN ULONG TimerLowValue,
-  IN LONG TimerHighValue);
+typedef enum _PROCESSINFOCLASS {
+  ProcessBasicInformation,
+  ProcessQuotaLimits,
+  ProcessIoCounters,
+  ProcessVmCounters,
+  ProcessTimes,
+  ProcessBasePriority,
+  ProcessRaisePriority,
+  ProcessDebugPort,
+  ProcessExceptionPort,
+  ProcessAccessToken,
+  ProcessLdtInformation,
+  ProcessLdtSize,
+  ProcessDefaultHardErrorMode,
+  ProcessIoPortHandlers,
+  ProcessPooledUsageAndLimits,
+  ProcessWorkingSetWatch,
+  ProcessUserModeIOPL,
+  ProcessEnableAlignmentFaultFixup,
+  ProcessPriorityClass,
+  ProcessWx86Information,
+  ProcessHandleCount,
+  ProcessAffinityMask,
+  ProcessPriorityBoost,
+  ProcessDeviceMap,
+  ProcessSessionInformation,
+  ProcessForegroundInformation,
+  ProcessWow64Information,
+  ProcessImageFileName,
+  ProcessLUIDDeviceMapsEnabled,
+  ProcessBreakOnTermination,
+  ProcessDebugObjectHandle,
+  ProcessDebugFlags,
+  ProcessHandleTracing,
+  ProcessIoPriority,
+  ProcessExecuteFlags,
+  ProcessTlsInformation,
+  ProcessCookie,
+  ProcessImageInformation,
+  ProcessCycleTime,
+  ProcessPagePriority,
+  ProcessInstrumentationCallback,
+  ProcessThreadStackAllocation,
+  ProcessWorkingSetWatchEx,
+  ProcessImageFileNameWin32,
+  ProcessImageFileMapping,
+  ProcessAffinityUpdateMode,
+  ProcessMemoryAllocationMode,
+  ProcessGroupInformation,
+  ProcessTokenVirtualizationEnabled,
+  ProcessConsoleHostProcess,
+  ProcessWindowInformation,
+  MaxProcessInfoClass
+} PROCESSINFOCLASS;
 
-typedef enum _TIMER_SET_INFORMATION_CLASS {
-  TimerSetCoalescableTimer,
-  MaxTimerInfoClass 
-} TIMER_SET_INFORMATION_CLASS;
+typedef enum _THREADINFOCLASS {
+  ThreadBasicInformation,
+  ThreadTimes,
+  ThreadPriority,
+  ThreadBasePriority,
+  ThreadAffinityMask,
+  ThreadImpersonationToken,
+  ThreadDescriptorTableEntry,
+  ThreadEnableAlignmentFaultFixup,
+  ThreadEventPair_Reusable,
+  ThreadQuerySetWin32StartAddress,
+  ThreadZeroTlsCell,
+  ThreadPerformanceCount,
+  ThreadAmILastThread,
+  ThreadIdealProcessor,
+  ThreadPriorityBoost,
+  ThreadSetTlsArrayAddress,
+  ThreadIsIoPending,
+  ThreadHideFromDebugger,
+  ThreadBreakOnTermination,
+  ThreadSwitchLegacyState,
+  ThreadIsTerminated,
+  ThreadLastSystemCall,
+  ThreadIoPriority,
+  ThreadCycleTime,
+  ThreadPagePriority,
+  ThreadActualBasePriority,
+  ThreadTebInformation,
+  ThreadCSwitchMon,
+  ThreadCSwitchPmu,
+  ThreadWow64Context,
+  ThreadGroupInformation,
+  ThreadUmsInformation,
+  ThreadCounterProfiling,
+  ThreadIdealProcessorEx,
+  MaxThreadInfoClass
+} THREADINFOCLASS;
 
-#if (NTDDI_VERSION >= NTDDI_WIN7)
-typedef struct _TIMER_SET_COALESCABLE_TIMER_INFO {
-  IN LARGE_INTEGER DueTime;
-  IN PTIMER_APC_ROUTINE TimerApcRoutine OPTIONAL;
-  IN PVOID TimerContext OPTIONAL;
-  IN struct _COUNTED_REASON_CONTEXT *WakeContext OPTIONAL;
-  IN ULONG Period OPTIONAL;
-  IN ULONG TolerableDelay;
-  OUT PBOOLEAN PreviousState OPTIONAL;
-} TIMER_SET_COALESCABLE_TIMER_INFO, *PTIMER_SET_COALESCABLE_TIMER_INFO;
-#endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
-
-#define XSTATE_LEGACY_FLOATING_POINT        0
-#define XSTATE_LEGACY_SSE                   1
-#define XSTATE_GSSE                         2
-
-#define XSTATE_MASK_LEGACY_FLOATING_POINT   (1i64 << (XSTATE_LEGACY_FLOATING_POINT))
-#define XSTATE_MASK_LEGACY_SSE              (1i64 << (XSTATE_LEGACY_SSE))
-#define XSTATE_MASK_LEGACY                  (XSTATE_MASK_LEGACY_FLOATING_POINT | XSTATE_MASK_LEGACY_SSE)
-#define XSTATE_MASK_GSSE                    (1i64 << (XSTATE_GSSE))
-
-#define MAXIMUM_XSTATE_FEATURES             64
-
-typedef struct _XSTATE_FEATURE {
-  ULONG Offset;
-  ULONG Size;
-} XSTATE_FEATURE, *PXSTATE_FEATURE;
-
-typedef struct _XSTATE_CONFIGURATION {
-  ULONG64 EnabledFeatures;
-  ULONG Size;
-  ULONG OptimizedSave:1;
-  XSTATE_FEATURE Features[MAXIMUM_XSTATE_FEATURES];
-} XSTATE_CONFIGURATION, *PXSTATE_CONFIGURATION;
+typedef struct _PROCESS_BASIC_INFORMATION {
+  NTSTATUS ExitStatus;
+  struct _PEB *PebBaseAddress;
+  ULONG_PTR AffinityMask;
+  KPRIORITY BasePriority;
+  ULONG_PTR UniqueProcessId;
+  ULONG_PTR InheritedFromUniqueProcessId;
+} PROCESS_BASIC_INFORMATION,*PPROCESS_BASIC_INFORMATION;
 
-#define MAX_WOW64_SHARED_ENTRIES 16
+typedef struct _PROCESS_WS_WATCH_INFORMATION {
+  PVOID FaultingPc;
+  PVOID FaultingVa;
+} PROCESS_WS_WATCH_INFORMATION, *PPROCESS_WS_WATCH_INFORMATION;
 
-typedef struct _KUSER_SHARED_DATA {
-  ULONG TickCountLowDeprecated;
-  ULONG TickCountMultiplier;
-  volatile KSYSTEM_TIME InterruptTime;
-  volatile KSYSTEM_TIME SystemTime;
-  volatile KSYSTEM_TIME TimeZoneBias;
-  USHORT ImageNumberLow;
-  USHORT ImageNumberHigh;
-  WCHAR NtSystemRoot[260];
-  ULONG MaxStackTraceDepth;
-  ULONG CryptoExponent;
-  ULONG TimeZoneId;
-  ULONG LargePageMinimum;
-  ULONG Reserved2[7];
-  NT_PRODUCT_TYPE NtProductType;
-  BOOLEAN ProductTypeIsValid;
-  ULONG NtMajorVersion;
-  ULONG NtMinorVersion;
-  BOOLEAN ProcessorFeatures[PROCESSOR_FEATURE_MAX];
-  ULONG Reserved1;
-  ULONG Reserved3;
-  volatile ULONG TimeSlip;
-  ALTERNATIVE_ARCHITECTURE_TYPE AlternativeArchitecture;
-  ULONG AltArchitecturePad[1];
-  LARGE_INTEGER SystemExpirationDate;
-  ULONG SuiteMask;
-  BOOLEAN KdDebuggerEnabled;
-#if (NTDDI_VERSION >= NTDDI_WINXPSP2)
-  UCHAR NXSupportPolicy;
-#endif
-  volatile ULONG ActiveConsoleId;
-  volatile ULONG DismountCount;
-  ULONG ComPlusPackage;
-  ULONG LastSystemRITEventTickCount;
-  ULONG NumberOfPhysicalPages;
-  BOOLEAN SafeBootMode;
-#if (NTDDI_VERSION >= NTDDI_WIN7)
-  union {
-    UCHAR TscQpcData;
+typedef struct _PROCESS_DEVICEMAP_INFORMATION {
+  __GNU_EXTENSION union {
     struct {
-      UCHAR TscQpcEnabled:1;
-      UCHAR TscQpcSpareFlag:1;
-      UCHAR TscQpcShift:6;
-    } DUMMYSTRUCTNAME;
-  } DUMMYUNIONNAME;
-  UCHAR TscQpcPad[2];
-#endif
-#if (NTDDI_VERSION >= NTDDI_VISTA)
-  union {
-    ULONG SharedDataFlags;
-    struct {
-      ULONG DbgErrorPortPresent:1;
-      ULONG DbgElevationEnabled:1;
-      ULONG DbgVirtEnabled:1;
-      ULONG DbgInstallerDetectEnabled:1;
-      ULONG DbgSystemDllRelocated:1;
-      ULONG DbgDynProcessorEnabled:1;
-      ULONG DbgSEHValidationEnabled:1;
-      ULONG SpareBits:25;
-    } DUMMYSTRUCTNAME2;
-  } DUMMYUNIONNAME2;
-#else
-  ULONG TraceLogging;
-#endif
-  ULONG DataFlagsPad[1];
-  ULONGLONG TestRetInstruction;
-  ULONG SystemCall;
-  ULONG SystemCallReturn;
-  ULONGLONG SystemCallPad[3];
-  _ANONYMOUS_UNION union {
-    volatile KSYSTEM_TIME TickCount;
-    volatile ULONG64 TickCountQuad;
-    _ANONYMOUS_STRUCT struct {
-      ULONG ReservedTickCountOverlay[3];
-      ULONG TickCountPad[1];
-    } DUMMYSTRUCTNAME;
-  } DUMMYUNIONNAME3;
-  ULONG Cookie;
-  ULONG CookiePad[1];
-#if (NTDDI_VERSION >= NTDDI_WS03)
-  LONGLONG ConsoleSessionForegroundProcessId;
-  ULONG Wow64SharedInformation[MAX_WOW64_SHARED_ENTRIES];
-#endif
-#if (NTDDI_VERSION >= NTDDI_VISTA)
-#if (NTDDI_VERSION >= NTDDI_WIN7)
-  USHORT UserModeGlobalLogger[16];
-#else
-  USHORT UserModeGlobalLogger[8];
-  ULONG HeapTracingPid[2];
-  ULONG CritSecTracingPid[2];
-#endif
-  ULONG ImageFileExecutionOptions;
-#if (NTDDI_VERSION >= NTDDI_VISTASP1)
-  ULONG LangGenerationCount;
-#else
-  /* 4 bytes padding */
-#endif
-  ULONGLONG Reserved5;
-  volatile ULONG64 InterruptTimeBias;
-#endif
-#if (NTDDI_VERSION >= NTDDI_WIN7)
-  volatile ULONG64 TscQpcBias;
-  volatile ULONG ActiveProcessorCount;
-  volatile USHORT ActiveGroupCount;
-  USHORT Reserved4;
-  volatile ULONG AitSamplingValue;
-  volatile ULONG AppCompatFlag;
-  ULONGLONG SystemDllNativeRelocation;
-  ULONG SystemDllWowRelocation;
-  ULONG XStatePad[1];
-  XSTATE_CONFIGURATION XState;
-#endif
-} KUSER_SHARED_DATA, *PKUSER_SHARED_DATA;
-
-#if (NTDDI_VERSION >= NTDDI_VISTA)
-extern NTSYSAPI volatile CCHAR KeNumberProcessors;
-#elif (NTDDI_VERSION >= NTDDI_WINXP)
-extern NTSYSAPI CCHAR KeNumberProcessors;
-#else
-extern PCCHAR KeNumberProcessors;
-#endif
-
-
-/******************************************************************************
- *                          Kernel Debugger Types                             *
- ******************************************************************************/
-typedef struct _DEBUG_DEVICE_ADDRESS {
-  UCHAR Type;
-  BOOLEAN Valid;
-  UCHAR Reserved[2];
-  PUCHAR TranslatedAddress;
-  ULONG Length;
-} DEBUG_DEVICE_ADDRESS, *PDEBUG_DEVICE_ADDRESS;
-
-typedef struct _DEBUG_MEMORY_REQUIREMENTS {
-  PHYSICAL_ADDRESS Start;
-  PHYSICAL_ADDRESS MaxEnd;
-  PVOID VirtualAddress;
-  ULONG Length;
-  BOOLEAN Cached;
-  BOOLEAN Aligned;
-} DEBUG_MEMORY_REQUIREMENTS, *PDEBUG_MEMORY_REQUIREMENTS;
-
-typedef struct _DEBUG_DEVICE_DESCRIPTOR {
-  ULONG Bus;
-  ULONG Slot;
-  USHORT Segment;
-  USHORT VendorID;
-  USHORT DeviceID;
-  UCHAR BaseClass;
-  UCHAR SubClass;
-  UCHAR ProgIf;
-  BOOLEAN Initialized;
-  BOOLEAN Configured;
-  DEBUG_DEVICE_ADDRESS BaseAddress[6];
-  DEBUG_MEMORY_REQUIREMENTS Memory;
-} DEBUG_DEVICE_DESCRIPTOR, *PDEBUG_DEVICE_DESCRIPTOR;
-
-typedef NTSTATUS
-(NTAPI *pKdSetupPciDeviceForDebugging)(
-  IN PVOID LoaderBlock OPTIONAL,
-  IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice);
-
-typedef NTSTATUS
-(NTAPI *pKdReleasePciDeviceForDebugging)(
-  IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice);
-
-typedef PVOID
-(NTAPI *pKdGetAcpiTablePhase0)(
-  IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
-  IN ULONG Signature);
-
-typedef VOID
-(NTAPI *pKdCheckPowerButton)(
-  VOID);
-
-#if (NTDDI_VERSION >= NTDDI_VISTA)
-typedef PVOID
-(NTAPI *pKdMapPhysicalMemory64)(
-  IN PHYSICAL_ADDRESS PhysicalAddress,
-  IN ULONG NumberPages,
-  IN BOOLEAN FlushCurrentTLB);
-
-typedef VOID
-(NTAPI *pKdUnmapVirtualAddress)(
-  IN PVOID VirtualAddress,
-  IN ULONG NumberPages,
-  IN BOOLEAN FlushCurrentTLB);
-#else
-typedef PVOID
-(NTAPI *pKdMapPhysicalMemory64)(
-  IN PHYSICAL_ADDRESS PhysicalAddress,
-  IN ULONG NumberPages);
-
-typedef VOID
-(NTAPI *pKdUnmapVirtualAddress)(
-  IN PVOID VirtualAddress,
-  IN ULONG NumberPages);
-#endif
-
-typedef ULONG
-(NTAPI *pKdGetPciDataByOffset)(
-  IN ULONG BusNumber,
-  IN ULONG SlotNumber,
-  OUT PVOID Buffer,
-  IN ULONG Offset,
-  IN ULONG Length);
-
-typedef ULONG
-(NTAPI *pKdSetPciDataByOffset)(
-  IN ULONG BusNumber,
-  IN ULONG SlotNumber,
-  IN PVOID Buffer,
-  IN ULONG Offset,
-  IN ULONG Length);
-/******************************************************************************
- *                         Memory manager Types                               *
- ******************************************************************************/
-
-typedef struct _PHYSICAL_MEMORY_RANGE {
-  PHYSICAL_ADDRESS BaseAddress;
-  LARGE_INTEGER NumberOfBytes;
-} PHYSICAL_MEMORY_RANGE, *PPHYSICAL_MEMORY_RANGE;
-
-typedef NTSTATUS
-(NTAPI *PMM_ROTATE_COPY_CALLBACK_FUNCTION)(
-  IN PMDL DestinationMdl,
-  IN PMDL SourceMdl,
-  IN PVOID Context);
-
-typedef enum _MM_ROTATE_DIRECTION {
-  MmToFrameBuffer,
-  MmToFrameBufferNoCopy,
-  MmToRegularMemory,
-  MmToRegularMemoryNoCopy,
-  MmMaximumRotateDirection
-} MM_ROTATE_DIRECTION, *PMM_ROTATE_DIRECTION;
-
-
-/******************************************************************************
- *                           Process Manager Types                            *
- ******************************************************************************/
-
-#define QUOTA_LIMITS_HARDWS_MIN_ENABLE  0x00000001
-#define QUOTA_LIMITS_HARDWS_MIN_DISABLE 0x00000002
-#define QUOTA_LIMITS_HARDWS_MAX_ENABLE  0x00000004
-#define QUOTA_LIMITS_HARDWS_MAX_DISABLE 0x00000008
-#define QUOTA_LIMITS_USE_DEFAULT_LIMITS 0x00000010
-
-typedef struct _QUOTA_LIMITS {
-  SIZE_T PagedPoolLimit;
-  SIZE_T NonPagedPoolLimit;
-  SIZE_T MinimumWorkingSetSize;
-  SIZE_T MaximumWorkingSetSize;
-  SIZE_T PagefileLimit;
-  LARGE_INTEGER TimeLimit;
-} QUOTA_LIMITS, *PQUOTA_LIMITS;
-
-typedef union _RATE_QUOTA_LIMIT {
-  ULONG RateData;
-  struct {
-    ULONG RatePercent:7;
-    ULONG Reserved0:25;
-  } DUMMYSTRUCTNAME;
-} RATE_QUOTA_LIMIT, *PRATE_QUOTA_LIMIT;
-
-typedef struct _QUOTA_LIMITS_EX {
-  SIZE_T PagedPoolLimit;
-  SIZE_T NonPagedPoolLimit;
-  SIZE_T MinimumWorkingSetSize;
-  SIZE_T MaximumWorkingSetSize;
-  SIZE_T PagefileLimit;
-  LARGE_INTEGER TimeLimit;
-  SIZE_T WorkingSetLimit;
-  SIZE_T Reserved2;
-  SIZE_T Reserved3;
-  SIZE_T Reserved4;
-  ULONG Flags;
-  RATE_QUOTA_LIMIT CpuRateLimit;
-} QUOTA_LIMITS_EX, *PQUOTA_LIMITS_EX;
-
-typedef struct _IO_COUNTERS {
-  ULONGLONG ReadOperationCount;
-  ULONGLONG WriteOperationCount;
-  ULONGLONG OtherOperationCount;
-  ULONGLONG ReadTransferCount;
-  ULONGLONG WriteTransferCount;
-  ULONGLONG OtherTransferCount;
-} IO_COUNTERS, *PIO_COUNTERS;
-
-typedef struct _VM_COUNTERS {
-  SIZE_T PeakVirtualSize;
-  SIZE_T VirtualSize;
-  ULONG PageFaultCount;
-  SIZE_T PeakWorkingSetSize;
-  SIZE_T WorkingSetSize;
-  SIZE_T QuotaPeakPagedPoolUsage;
-  SIZE_T QuotaPagedPoolUsage;
-  SIZE_T QuotaPeakNonPagedPoolUsage;
-  SIZE_T QuotaNonPagedPoolUsage;
-  SIZE_T PagefileUsage;
-  SIZE_T PeakPagefileUsage;
-} VM_COUNTERS, *PVM_COUNTERS;
-
-typedef struct _VM_COUNTERS_EX {
-  SIZE_T PeakVirtualSize;
-  SIZE_T VirtualSize;
-  ULONG PageFaultCount;
-  SIZE_T PeakWorkingSetSize;
-  SIZE_T WorkingSetSize;
-  SIZE_T QuotaPeakPagedPoolUsage;
-  SIZE_T QuotaPagedPoolUsage;
-  SIZE_T QuotaPeakNonPagedPoolUsage;
-  SIZE_T QuotaNonPagedPoolUsage;
-  SIZE_T PagefileUsage;
-  SIZE_T PeakPagefileUsage;
-  SIZE_T PrivateUsage;
-} VM_COUNTERS_EX, *PVM_COUNTERS_EX;
-
-#define MAX_HW_COUNTERS 16
-#define THREAD_PROFILING_FLAG_DISPATCH  0x00000001
-
-typedef enum _HARDWARE_COUNTER_TYPE {
-  PMCCounter,
-  MaxHardwareCounterType
-} HARDWARE_COUNTER_TYPE, *PHARDWARE_COUNTER_TYPE;
-
-typedef struct _HARDWARE_COUNTER {
-  HARDWARE_COUNTER_TYPE Type;
-  ULONG Reserved;
-  ULONG64 Index;
-} HARDWARE_COUNTER, *PHARDWARE_COUNTER;
-
-typedef struct _POOLED_USAGE_AND_LIMITS {
-  SIZE_T PeakPagedPoolUsage;
-  SIZE_T PagedPoolUsage;
-  SIZE_T PagedPoolLimit;
-  SIZE_T PeakNonPagedPoolUsage;
-  SIZE_T NonPagedPoolUsage;
-  SIZE_T NonPagedPoolLimit;
-  SIZE_T PeakPagefileUsage;
-  SIZE_T PagefileUsage;
-  SIZE_T PagefileLimit;
-} POOLED_USAGE_AND_LIMITS, *PPOOLED_USAGE_AND_LIMITS;
-
-typedef struct _PROCESS_ACCESS_TOKEN {
-  HANDLE Token;
-  HANDLE Thread;
-} PROCESS_ACCESS_TOKEN, *PPROCESS_ACCESS_TOKEN;
-
-#define PROCESS_EXCEPTION_PORT_ALL_STATE_BITS     0x00000003UL
-#define PROCESS_EXCEPTION_PORT_ALL_STATE_FLAGS    ((ULONG_PTR)((1UL << PROCESS_EXCEPTION_PORT_ALL_STATE_BITS) - 1))
-
-typedef struct _PROCESS_EXCEPTION_PORT {
-  IN HANDLE ExceptionPortHandle;
-  IN OUT ULONG StateFlags;
-} PROCESS_EXCEPTION_PORT, *PPROCESS_EXCEPTION_PORT;
-
-typedef VOID
-(NTAPI *PCREATE_PROCESS_NOTIFY_ROUTINE)(
-  IN HANDLE ParentId,
-  IN HANDLE ProcessId,
-  IN BOOLEAN Create);
-
-typedef struct _PS_CREATE_NOTIFY_INFO {
-  IN SIZE_T Size;
-  union {
-    IN ULONG Flags;
+      HANDLE DirectoryHandle;
+    } Set;
     struct {
-      IN ULONG FileOpenNameAvailable:1;
-      IN ULONG Reserved:31;
-    };
+      ULONG DriveMap;
+      UCHAR DriveType[32];
+    } Query;
   };
-  IN HANDLE ParentProcessId;
-  IN CLIENT_ID CreatingThreadId;
-  IN OUT struct _FILE_OBJECT *FileObject;
-  IN PCUNICODE_STRING ImageFileName;
-  IN PCUNICODE_STRING CommandLine OPTIONAL;
-  IN OUT NTSTATUS CreationStatus;
-} PS_CREATE_NOTIFY_INFO, *PPS_CREATE_NOTIFY_INFO;
-
-typedef VOID
-(NTAPI *PCREATE_PROCESS_NOTIFY_ROUTINE_EX)(
-  IN OUT PEPROCESS Process,
-  IN HANDLE ProcessId,
-  IN PPS_CREATE_NOTIFY_INFO CreateInfo OPTIONAL);
-
-typedef VOID
-(NTAPI *PCREATE_THREAD_NOTIFY_ROUTINE)(
-  IN HANDLE ProcessId,
-  IN HANDLE ThreadId,
-  IN BOOLEAN Create);
-
-#define IMAGE_ADDRESSING_MODE_32BIT       3
-
-typedef struct _IMAGE_INFO {
-  _ANONYMOUS_UNION union {
-    ULONG Properties;
-    _ANONYMOUS_STRUCT struct {
-      ULONG ImageAddressingMode:8;
-      ULONG SystemModeImage:1;
-      ULONG ImageMappedToAllPids:1;
-      ULONG ExtendedInfoPresent:1;
-      ULONG Reserved:21;
-    } DUMMYSTRUCTNAME;
-  } DUMMYUNIONNAME;
-  PVOID ImageBase;
-  ULONG ImageSelector;
-  SIZE_T ImageSize;
-  ULONG ImageSectionNumber;
-} IMAGE_INFO, *PIMAGE_INFO;
-
-typedef struct _IMAGE_INFO_EX {
-  SIZE_T Size;
-  IMAGE_INFO ImageInfo;
-  struct _FILE_OBJECT *FileObject;
-} IMAGE_INFO_EX, *PIMAGE_INFO_EX;
-
-typedef VOID
-(NTAPI *PLOAD_IMAGE_NOTIFY_ROUTINE)(
-  IN PUNICODE_STRING FullImageName,
-  IN HANDLE ProcessId,
-  IN PIMAGE_INFO ImageInfo);
-
-#define THREAD_CSWITCH_PMU_DISABLE  FALSE
-#define THREAD_CSWITCH_PMU_ENABLE   TRUE
-
-#define PROCESS_LUID_DOSDEVICES_ONLY 0x00000001
-
-#define PROCESS_HANDLE_TRACING_MAX_STACKS 16
+} PROCESS_DEVICEMAP_INFORMATION, *PPROCESS_DEVICEMAP_INFORMATION;
 
-typedef struct _NT_TIB {
-  struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;
-  PVOID StackBase;
-  PVOID StackLimit;
-  PVOID SubSystemTib;
-  _ANONYMOUS_UNION union {
-    PVOID FiberData;
-    ULONG Version;
-  } DUMMYUNIONNAME;
-  PVOID ArbitraryUserPointer;
-  struct _NT_TIB *Self;
-} NT_TIB, *PNT_TIB;
-
-typedef struct _NT_TIB32 {
-  ULONG ExceptionList;
-  ULONG StackBase;
-  ULONG StackLimit;
-  ULONG SubSystemTib;
-  __GNU_EXTENSION union {
-    ULONG FiberData;
-    ULONG Version;
-  };
-  ULONG ArbitraryUserPointer;
-  ULONG Self;
-} NT_TIB32,*PNT_TIB32;
-
-typedef struct _NT_TIB64 {
-  ULONG64 ExceptionList;
-  ULONG64 StackBase;
-  ULONG64 StackLimit;
-  ULONG64 SubSystemTib;
-  __GNU_EXTENSION union {
-    ULONG64 FiberData;
-    ULONG Version;
-  };
-  ULONG64 ArbitraryUserPointer;
-  ULONG64 Self;
-} NT_TIB64,*PNT_TIB64;
-
-typedef enum _PROCESSINFOCLASS {
-  ProcessBasicInformation,
-  ProcessQuotaLimits,
-  ProcessIoCounters,
-  ProcessVmCounters,
-  ProcessTimes,
-  ProcessBasePriority,
-  ProcessRaisePriority,
-  ProcessDebugPort,
-  ProcessExceptionPort,
-  ProcessAccessToken,
-  ProcessLdtInformation,
-  ProcessLdtSize,
-  ProcessDefaultHardErrorMode,
-  ProcessIoPortHandlers,
-  ProcessPooledUsageAndLimits,
-  ProcessWorkingSetWatch,
-  ProcessUserModeIOPL,
-  ProcessEnableAlignmentFaultFixup,
-  ProcessPriorityClass,
-  ProcessWx86Information,
-  ProcessHandleCount,
-  ProcessAffinityMask,
-  ProcessPriorityBoost,
-  ProcessDeviceMap,
-  ProcessSessionInformation,
-  ProcessForegroundInformation,
-  ProcessWow64Information,
-  ProcessImageFileName,
-  ProcessLUIDDeviceMapsEnabled,
-  ProcessBreakOnTermination,
-  ProcessDebugObjectHandle,
-  ProcessDebugFlags,
-  ProcessHandleTracing,
-  ProcessIoPriority,
-  ProcessExecuteFlags,
-  ProcessTlsInformation,
-  ProcessCookie,
-  ProcessImageInformation,