W32API: Various DDK fixes

Filip Navara <xnavara-VIXq6x/[email protected]> Sun, 26 Sep 2004 20:33:47 +0200
Newsgroups gmane.comp.gnu.mingw.patches
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------090404090701040303060604
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

2004-05-29  Filip Navara  <xnavara-VIXq6x/[email protected]>

    * include/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
    d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, mcd.h, miniport.h,
    mountdev.h, mountmgr.h, ndis.h, ndistapi.h, ndiswan.h, netpnp.h,
    newdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h, ntddcdvd.h,
    ntddchgr.h, ntdddisk.h, ntddkbd.h, ntddmou.h, ntddpar.h, ntddpcm.h,
    ntddscsi.h, ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h,
    ntddvdeo.h, ntddvol.h, ntpoapi.h, parallel.h, pfhook.h, poclass.h,
    scsi.h, scsiscan.h, smbus.h, srb.h, storport.h, tdiinfo.h,
    tdikrnl.h, tvout.h, upssvc.h, usb.h, usb100.h, usbdi.h, usbioctl.h,
    usbiodef.h, usbscan.h, usbuser.h, videoagp.h, winddi.h, winddk.h,
    winnt4.h, ws2san.h): Fixed packing.
    * include/atm.h (ATM_TRAFFIC_DESCRIPTOR_IE): Fixed declaration.
    * include/hidclass.h (HID_INTERFACE_HIDPARSE,
    HID_INTERFACE_NOTIFY_PNP): Likewise.
    * include/ndis.h (NDIS_DMA_BLOCK, CO_FLOW_PARAMETERS): Likewise.
    (NdisQueryPacketLength): Added macro. Thanks to Art Yerkes
    <[email protected]>.
    * include/usb100.h (USB_CONFIGURATION_DESCRIPTOR): Fixed
    declaration.
    * include/winddi.h (PATHDATA, GLYPHPOS): Likewise.
    * include/winddk.h (PDRIVER_CONTROL, PDRIVER_LIST_CONTROL,
    PDRIVER_ADD_DEVICE, PIO_COMPLETION_ROUTINE, PDRIVER_CANCEL,
    PKDEFERRED_ROUTINE, PDRIVER_DISPATCH, PIO_DPC_ROUTINE,
    PMM_DLL_INITIALIZE, PMM_DLL_UNLOAD, PDRIVER_ENTRY,
    PDRIVER_INITIALIZE, PKSERVICE_ROUTINE, PIO_TIMER_ROUTINE,
    PDRIVER_REINITIALIZE, PDRIVER_STARTIO, PKSYNCHRONIZE_ROUTINE,
    PDRIVER_UNLOAD, DRIVER_OBJECT): Fixed callback declarations.
    (struct FILE_BASIC_INFORMATION): Renamed to _FILE_BASIC_INFORMATION.
    (SYNCH_LEVEL): Added definition.
    (KPCR, KPCR_TIB): Fixed declaration.
    (Interlocked[Push/Pop]EntrySList): Declare only if winbase.h isn't
    included and _WIN32_WINNT >= 0x0501.
    (RtlEqualLuid): Fixed macro definition.
    (KfLowerIrql, KfRaiseIrql): Declare and use instead of KeLowerIrql and
    KeRaiseIrql on i386 architectures.


--------------090404090701040303060604
Content-Type: text/x-patch;
 name="ddk.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="ddk.diff"

2004-05-29  Filip Navara  <xnavara-VIXq6x/[email protected]>

	* include/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
	d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, mcd.h, miniport.h,
	mountdev.h, mountmgr.h, ndis.h, ndistapi.h, ndiswan.h, netpnp.h,
	newdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h, ntddcdvd.h,
	ntddchgr.h, ntdddisk.h, ntddkbd.h, ntddmou.h, ntddpar.h, ntddpcm.h,
	ntddscsi.h, ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h,
	ntddvdeo.h, ntddvol.h, ntpoapi.h, parallel.h, pfhook.h, poclass.h,
	scsi.h, scsiscan.h, smbus.h, srb.h, storport.h, tdiinfo.h,
	tdikrnl.h, tvout.h, upssvc.h, usb.h, usb100.h, usbdi.h, usbioctl.h,
	usbiodef.h, usbscan.h, usbuser.h, videoagp.h, winddi.h, winddk.h,
	winnt4.h, ws2san.h): Fixed packing.
	* include/atm.h (ATM_TRAFFIC_DESCRIPTOR_IE): Fixed declaration.
	* include/hidclass.h (HID_INTERFACE_HIDPARSE,
	HID_INTERFACE_NOTIFY_PNP): Likewise.
	* include/ndis.h (NDIS_DMA_BLOCK, CO_FLOW_PARAMETERS): Likewise.
	(NdisQueryPacketLength): Added macro. Thanks to Art Yerkes
	<[email protected]>.
	* include/usb100.h (USB_CONFIGURATION_DESCRIPTOR): Fixed
	declaration.
	* include/winddi.h (PATHDATA, GLYPHPOS): Likewise.
	* include/winddk.h (PDRIVER_CONTROL, PDRIVER_LIST_CONTROL,
	PDRIVER_ADD_DEVICE, PIO_COMPLETION_ROUTINE, PDRIVER_CANCEL,
	PKDEFERRED_ROUTINE, PDRIVER_DISPATCH, PIO_DPC_ROUTINE,
	PMM_DLL_INITIALIZE, PMM_DLL_UNLOAD, PDRIVER_ENTRY,
	PDRIVER_INITIALIZE, PKSERVICE_ROUTINE, PIO_TIMER_ROUTINE,
	PDRIVER_REINITIALIZE, PDRIVER_STARTIO, PKSYNCHRONIZE_ROUTINE,
	PDRIVER_UNLOAD, DRIVER_OBJECT): Fixed callback declarations.
	(struct FILE_BASIC_INFORMATION): Renamed to _FILE_BASIC_INFORMATION.
	(SYNCH_LEVEL): Added definition.
	(KPCR, KPCR_TIB): Fixed declaration.
	(Interlocked[Push/Pop]EntrySList): Declare only if winbase.h isn't
	included and _WIN32_WINNT >= 0x0501.
	(RtlEqualLuid): Fixed macro definition.
	(KfLowerIrql, KfRaiseIrql): Declare and use instead of KeLowerIrql and
	KeRaiseIrql on i386 architectures.

--- include/ddk/atm.h	Thu Jul 31 23:06:26 2003
+++ include/ddk/atm.h	Mon Jun 14 18:01:48 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 typedef ULONG	ATM_ADDRESSTYPE;
 
 #define SAP_TYPE_NSAP			                1
@@ -431,6 +429,7 @@
 typedef struct _ATM_TRAFFIC_DESCRIPTOR_IE {
   ATM_TRAFFIC_DESCRIPTOR  ForwardTD;
   ATM_TRAFFIC_DESCRIPTOR  BackwardTD;
+  BOOLEAN  BestEffort;
 } ATM_TRAFFIC_DESCRIPTOR_IE, *PATM_TRAFFIC_DESCRIPTOR_IE;
 
 /* ATM_TRANSIT_NETWORK_SELECTION_IE.TypeOfNetworkId constants */
@@ -500,8 +499,6 @@
   ULONG  NumberOfAddressesReturned;
   ATM_ADDRESS  Address[1];
 } ATM_SERVICE_ADDRESS_LIST, *PATM_SERVICE_ADDRESS_LIST;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/batclass.h	Wed Mar 26 21:28:02 2003
+++ include/ddk/batclass.h	Mon Jun 14 18:02:06 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 #if defined(_BATTERYCLASS_)
@@ -292,8 +290,6 @@
 DDKAPI
 BatteryClassUnload(
   IN PVOID  ClassData);
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/cfg.h	Thu Jan  1 15:03:38 2004
+++ include/ddk/cfg.h	Mon Jun 14 18:03:48 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #define CM_PROB_NOT_CONFIGURED		  				0x00000001
 #define CM_PROB_DEVLOADER_FAILED            0x00000002
 #define CM_PROB_OUT_OF_MEMORY               0x00000003
@@ -133,8 +131,6 @@
   PNP_VetoNonDisableable,
   PNP_VetoLegacyDriver
 } PNP_VETO_TYPE, *PPNP_VETO_TYPE;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/cfgmgr32.h	Wed Jul 16 19:49:02 2003
+++ include/ddk/cfgmgr32.h	Mon Jun 14 18:08:02 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 #if defined(_CFGMGR32_)
@@ -43,6 +41,8 @@
 
 #include "cfg.h"
 
+#include <pshpack1.h>
+
 #define CR_SUCCESS                  			0x00000000
 #define CR_DEFAULT                        0x00000001
 #define CR_OUT_OF_MEMORY                  0x00000002
@@ -1524,7 +1524,7 @@
 CMP_WaitNoPendingInstallEvents(
   IN DWORD dwTimeout);
 
-#pragma pack(pop)
+#include <poppack.h>
 
 #ifdef __cplusplus
 }
--- include/ddk/d4drvif.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/d4drvif.h	Mon Jun 14 18:10:28 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "d4iface.h"
 
@@ -98,8 +96,6 @@
   ULONG  ulOffset;
   ULONG  ulTimeout;
 } DOT4_DRIVER_CMD, *PDOT4_DRIVER_CMD;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/d4iface.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/d4iface.h	Mon Jun 14 18:11:38 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 #define DOT4_MAX_CHANNELS                 128
@@ -78,8 +76,6 @@
   ULONG  ulPacketBytesWritten;
   ULONG  ulPacketBytesRead;
 } DOT4_WMI_XFER_INFO, *PDOT4_WMI_XFER_INFO;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ddkmapi.h	Wed Jul 16 19:49:02 2003
+++ include/ddk/ddkmapi.h	Mon Jun 14 18:13:14 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 #if defined(_DXAPI_)
@@ -328,8 +326,6 @@
   HANDLE  hVideoPort;
   DWORD  dwStartField;
 } DDSETSKIPFIELD, FAR *LPDDSETSKIPFIELD;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/hidclass.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/hidclass.h	Mon Jun 14 20:01:18 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "hidpi.h"
 
@@ -112,25 +110,31 @@
 } HID_DRIVER_CONFIG, *PHID_DRIVER_CONFIG;
 
 typedef struct _HID_INTERFACE_HIDPARSE {
-#if 0
-/* FIXME: COM stuff */
 #ifdef __cplusplus
   INTERFACE  i;
 #else
-  INTERFACE;
-#endif
+  /* GCC doesn't support including unnamed structs, so INTERFACE is
+     expanded here */
+  USHORT  Size;
+  USHORT  Version;
+  PVOID  Context;
+  PINTERFACE_REFERENCE  InterfaceReference;
+  PINTERFACE_DEREFERENCE  InterfaceDereference;
 #endif
   PHIDP_GETCAPS  HidpGetCaps;
 } HID_INTERFACE_HIDPARSE, *PHID_INTERFACE_HIDPARSE;
 
 typedef struct _HID_INTERFACE_NOTIFY_PNP {
-#if 0
-/* FIXME: COM stuff */
 #ifdef __cplusplus
   INTERFACE  i;
 #else
-  INTERFACE;
-#endif
+  /* GCC doesn't support including unnamed structs, so INTERFACE is
+     expanded here */
+  USHORT  Size;
+  USHORT  Version;
+  PVOID  Context;
+  PINTERFACE_REFERENCE  InterfaceReference;
+  PINTERFACE_DEREFERENCE  InterfaceDereference;
 #endif
   PHID_STATUS_CHANGE  StatusChangeFn;
   PVOID  CallbackContext;
@@ -141,8 +145,6 @@
   ULONG  reportBufferLen;
   UCHAR  reportId;
 } HID_XFER_PACKET, *PHID_XFER_PACKET;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/hidpi.h	Wed Jul 16 19:49:02 2003
+++ include/ddk/hidpi.h	Mon Jun 14 19:58:36 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "hidusage.h"
 
@@ -598,8 +596,6 @@
   OUT PUSAGE  BreakUsageList,
   OUT PUSAGE  MakeUsageList,
   IN ULONG  UsageListLength);
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/mcd.h	Fri Jan 23 12:38:02 2004
+++ include/ddk/mcd.h	Mon Jun 14 20:03:52 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "srb.h"
 #include "scsi.h"
@@ -137,8 +135,6 @@
   IN PDRIVER_OBJECT  DriverObject,
   IN PUNICODE_STRING  RegistryPath,
   IN PMCD_INIT_DATA  MCDInitData);
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/miniport.h	Thu Dec 19 00:34:26 2002
+++ include/ddk/miniport.h	Mon Jun 14 17:59:56 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define EMULATOR_READ_ACCESS              0x01
 #define EMULATOR_WRITE_ACCESS             0x02
 
@@ -72,8 +69,6 @@
   IN ULONG  ReadBank,
   IN ULONG  WriteBank,
   IN PVOID  Context);
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/mountdev.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/mountdev.h	Mon Jun 14 20:04:44 2004
@@ -31,12 +31,9 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "mountmgr.h"
 
-
 #define IOCTL_MOUNTDEV_QUERY_DEVICE_NAME \
   CTL_CODE(MOUNTDEVCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
@@ -74,8 +71,6 @@
   USHORT  NewUniqueIdOffset;
   USHORT  NewUniqueIdLength;
 } MOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY_OUTPUT;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/mountmgr.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/mountmgr.h	Mon Jun 14 20:05:32 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 DEFINE_GUID(MOUNTDEV_MOUNTED_DEVICE_GUID,
 	0x53f5630d, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
 
@@ -134,8 +131,6 @@
   USHORT  TargetVolumeNameOffset;
   USHORT  TargetVolumeNameLength;
 } MOUNTMGR_VOLUME_MOUNT_POINT, *PMOUNTMGR_VOLUME_MOUNT_POINT;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ndis.h	Wed Jul 16 19:49:02 2003
+++ include/ddk/ndis.h	Mon Jun 14 18:26:02 2004
@@ -37,8 +37,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "ntddndis.h"
 #include "netpnp.h"
@@ -537,6 +535,7 @@
   PVOID  MapRegisterBase;
   KEVENT  AllocationEvent;
   PADAPTER_OBJECT  SystemAdapterObject;
+  PVOID  Miniport;
   BOOLEAN  InProgress;
 } NDIS_DMA_BLOCK, *PNDIS_DMA_BLOCK;
 
@@ -703,10 +702,9 @@
   ULONG  PeakBandwidth;
   ULONG  Latency;
   ULONG  DelayVariation;
-  GUARANTEE  LevelOfGuarantee;
-  ULONG  CostOfCall;
-  ULONG  NetworkAvailability;
+  SERVICETYPE  ServiceType;
   ULONG  MaxSduSize;
+  ULONG  MinimumPolicedSize;
 } CO_FLOW_PARAMETERS, *PCO_FLOW_PARAMETERS;
 
 typedef struct _CO_SPECIFIC_PARAMETERS {
@@ -2026,6 +2024,48 @@
   } \
 }
 
+/*
+ * VOID
+ * NdisQueryPacketLength(
+ *   IN PNDIS_PACKET  Packet,
+ *   OUT PUINT  PhysicalBufferCount  OPTIONAL,
+ *   OUT PUINT  BufferCount  OPTIONAL,
+ *   OUT PNDIS_BUFFER  *FirstBuffer  OPTIONAL,
+ *   OUT PUINT  TotalPacketLength  OPTIONAL);
+ */
+#define NdisQueryPacketLength(Packet,                                     \
+                              TotalPacketLength)                          \
+{                                                                         \
+  if ((TotalPacketLength))                                                \
+  {                                                                       \
+    if (!(Packet)->Private.ValidCounts) {                                 \
+      UINT _Offset;                                                       \
+      UINT _PacketLength;                                                 \
+      PNDIS_BUFFER _NdisBuffer;                                           \
+      UINT _PhysicalBufferCount = 0;                                      \
+      UINT _TotalPacketLength   = 0;                                      \
+      UINT _Count               = 0;                                      \
+                                                                          \
+      for (_NdisBuffer = (Packet)->Private.Head;                          \
+        _NdisBuffer != (PNDIS_BUFFER)NULL;                                \
+        _NdisBuffer = _NdisBuffer->Next)                                  \
+      {                                                                   \
+        _PhysicalBufferCount += NDIS_BUFFER_TO_SPAN_PAGES(_NdisBuffer);   \
+        NdisQueryBufferOffset(_NdisBuffer, &_Offset, &_PacketLength);     \
+        _TotalPacketLength += _PacketLength;                              \
+        _Count++;                                                         \
+      }                                                                   \
+      (Packet)->Private.PhysicalCount = _PhysicalBufferCount;             \
+      (Packet)->Private.TotalLength   = _TotalPacketLength;               \
+      (Packet)->Private.Count         = _Count;                           \
+      (Packet)->Private.ValidCounts   = TRUE;                             \
+  }                                                                       \
+                                                                          \
+  if (TotalPacketLength)                                                  \
+      *((PUINT)TotalPacketLength) = (Packet)->Private.TotalLength;        \
+  } \
+}
+
 
 /*
  * VOID
@@ -5177,8 +5217,6 @@
 
 typedef	NDIS_MAC_CHARACTERISTICS        NDIS_WAN_MAC_CHARACTERISTICS;
 typedef	NDIS_WAN_MAC_CHARACTERISTICS    *PNDIS_WAN_MAC_CHARACTERISTICS;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ndistapi.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/ndistapi.h	Mon Jun 14 18:52:44 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ndis.h"
 
 #ifndef NDIS_TAPI_CURRENT_VERSION
@@ -1302,8 +1300,6 @@
   IN  NDIS_VAR_DATA_DESC  DestAddress;
   IN  NDIS_VAR_DATA_DESC  LineCallParams;
 } CO_AF_TAPI_MAKE_CALL_PARAMETERS, *PCO_AF_TAPI_MAKE_CALL_PARAMETERS;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ndiswan.h	Wed Jul 16 19:49:02 2003
+++ include/ddk/ndiswan.h	Mon Jun 14 18:53:12 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ndis.h"
 
 #define NDIS_USE_WAN_WRAPPER         			0x00000001
@@ -245,8 +243,6 @@
   OUT ULONG  BytesTransmittedCompressed;
   OUT ULONG  BytesReceivedCompressed;
 } NDIS_WAN_CO_GET_STATS_INFO, *PNDIS_WAN_CO_GET_STATS_INFO;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/netpnp.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/netpnp.h	Mon Jun 14 19:52:44 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 typedef enum _NET_PNP_EVENT_CODE {
   NetEventSetPower,
   NetEventQueryPower,
@@ -63,8 +61,6 @@
   NetDeviceStateD3,
   NetDeviceStateMaximum
 } NET_DEVICE_POWER_STATE, *PNET_DEVICE_POWER_STATE;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/newdev.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/newdev.h	Mon Jun 14 19:08:14 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 /* UpdateDriverForPlugAndPlayDevices.InstallFlags constants */
 #define INSTALLFLAG_FORCE                 0x00000001
 #define INSTALLFLAG_READONLY              0x00000002
@@ -60,8 +58,6 @@
 #else
 #define UpdateDriverForPlugAndPlayDevices UpdateDriverForPlugAndPlayDevicesA
 #endif /* UNICODE */
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntapi.h	Sun Apr 18 08:23:08 2004
+++ include/ddk/ntapi.h	Mon Jun 14 20:08:42 2004
@@ -34,13 +34,13 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include <stdarg.h>
 #include <winbase.h>
 #include "ntddk.h"
 #include "ntpoapi.h"
 
+#pragma pack(push,4)
+
 typedef struct _PEB *PPEB;
 
 /* FIXME: Unknown definitions */
diff -u include/ddk/ntdd8042.h include/ddk/ntdd8042.h
--- include/ddk/ntdd8042.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/ntdd8042.h	Mon Jun 14 18:30:52 2004
@@ -31,13 +31,10 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "ntddkbd.h"
 #include "ntddmou.h"
 
-
 #define IOCTL_INTERNAL_I8042_CONTROLLER_WRITE_BUFFER \
   CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0FF2, METHOD_NEITHER, FILE_ANY_ACCESS)
 
@@ -208,8 +205,6 @@
   IN PI8042_QUEUE_PACKET  QueueMousePacket;
   IN PVOID  CallContext;
 } INTERNAL_I8042_HOOK_MOUSE, *PINTERNAL_I8042_HOOK_MOUSE;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntddbeep.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/ntddbeep.h	Mon Jun 14 18:49:02 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define DD_BEEP_DEVICE_NAME               "\\Device\\Beep"
 #define DD_BEEP_DEVICE_NAME_U             L"\\Device\\Beep"
 
@@ -49,8 +46,6 @@
 
 #define BEEP_FREQUENCY_MINIMUM            0x25
 #define BEEP_FREQUENCY_MAXIMUM            0x7FFF
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntddcdrm.h	Wed Jul 16 19:49:02 2003
+++ include/ddk/ntddcdrm.h	Mon Jun 14 18:49:58 2004
@@ -31,12 +31,9 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "ntddstor.h"
 
-
 #define IOCTL_CDROM_BASE                  FILE_DEVICE_CD_ROM
 
 #define IOCTL_CDROM_CHECK_VERIFY \
@@ -342,8 +339,6 @@
 	ULONG  SectorCount;
 	TRACK_MODE_TYPE  TrackMode;
 } RAW_READ_INFO, *PRAW_READ_INFO;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntddcdvd.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/ntddcdvd.h	Mon Jun 14 18:48:34 2004
@@ -31,12 +31,9 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "ntddstor.h"
 
-
 #define IOCTL_DVD_BASE                    FILE_DEVICE_DVD
 
 #define IOCTL_DVD_END_SESSION \
@@ -77,12 +74,14 @@
   DvdMaxDescriptor
 } DVD_STRUCTURE_FORMAT, *PDVD_STRUCTURE_FORMAT;
 
+#include <pshpack1.h>
 typedef struct DVD_READ_STRUCTURE {
   LARGE_INTEGER  BlockByteOffset;
   DVD_STRUCTURE_FORMAT  Format;
   DVD_SESSION_ID  SessionId;
   UCHAR  LayerNumber;
 } DVD_READ_STRUCTURE, *PDVD_READ_STRUCTURE;
+#include <poppack.h>
 
 typedef struct _DVD_DESCRIPTOR_HEADER {
     USHORT Length;
@@ -90,6 +89,7 @@
     UCHAR Data[0];
 } DVD_DESCRIPTOR_HEADER, *PDVD_DESCRIPTOR_HEADER;
 
+#include <pshpack1.h>
 typedef struct _DVD_LAYER_DESCRIPTOR {
   UCHAR  BookVersion : 4;
   UCHAR  BookType : 4;
@@ -108,6 +108,7 @@
   UCHAR  BCAFlag : 1;
   UCHAR  Reserved6;
 } DVD_LAYER_DESCRIPTOR, *PDVD_LAYER_DESCRIPTOR;
+#include <poppack.h>
 
 typedef struct _DVD_COPYRIGHT_DESCRIPTOR {
   UCHAR  CopyrightProtectionType;
@@ -204,8 +205,6 @@
 	UCHAR  SystemRegion;
 	UCHAR  ResetCount;
 } DVD_REGION, *PDVD_REGION;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
diff -u include/ddk/ntddchgr.h include/ddk/ntddchgr.h
--- include/ddk/ntddchgr.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/ntddchgr.h	Mon Jun 14 18:43:00 2004
@@ -31,12 +31,9 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "ntddstor.h"
 
-
 #define DD_CHANGER_DEVICE_NAME            "\\Device\\Changer"
 #define DD_CHANGER_DEVICE_NAME_U          L"\\Device\\Changer"
 
@@ -348,8 +345,6 @@
 typedef struct _WMI_CHANGER_PROBLEM_DEVICE_ERROR {
   ULONG  ChangerProblemType;
 } WMI_CHANGER_PROBLEM_DEVICE_ERROR, *PWMI_CHANGER_PROBLEM_DEVICE_ERROR;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntdddisk.h	Wed Jul 16 19:49:02 2003
+++ include/ddk/ntdddisk.h	Mon Jun 14 18:42:38 2004
@@ -31,12 +31,9 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "ntddstor.h"
 
-
 #define DD_DISK_DEVICE_NAME               "\\Device\\UNKNOWN"
 #define DD_DISK_DEVICE_NAME_U             L"\\Device\\UNKNOWN"
 
@@ -454,6 +451,7 @@
 	UCHAR  bReserved;
 } IDEREGS, *PIDEREGS, *LPIDEREGS;
 
+#include <pshpack1.h>
 typedef struct _SENDCMDINPARAMS {
 	ULONG  cBufferSize;
 	IDEREGS  irDriveRegs;
@@ -462,6 +460,7 @@
 	ULONG  dwReserved[4];
 	UCHAR  bBuffer[1];
 } SENDCMDINPARAMS, *PSENDCMDINPARAMS, *LPSENDCMDINPARAMS;
+#include <poppack.h>
 
 /* DRIVERSTATUS.bDriverError constants */
 #define SMART_NO_ERROR                    0
@@ -495,11 +494,13 @@
 #define READ_THRESHOLD_BUFFER_SIZE        512
 #define SMART_LOG_SECTOR_SIZE             512
 
+#include <pshpack1.h>
 typedef struct _SENDCMDOUTPARAMS {
 	ULONG  cBufferSize;
 	DRIVERSTATUS  DriverStatus;
 	UCHAR  bBuffer[1];
 } SENDCMDOUTPARAMS, *PSENDCMDOUTPARAMS, *LPSENDCMDOUTPARAMS;
+#include <poppack.h>
 
 #define READ_ATTRIBUTES                   0xD0
 #define READ_THRESHOLDS                   0xD1
@@ -512,8 +513,6 @@
 #define DISABLE_SMART                     0xD9
 #define RETURN_SMART_STATUS               0xDA
 #define ENABLE_DISABLE_AUTO_OFFLINE       0xDB
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntddkbd.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/ntddkbd.h	Mon Jun 14 18:34:06 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define DD_KEYBOARD_DEVICE_NAME           "\\Device\\KeyboardClass"
 #define DD_KEYBOARD_DEVICE_NAME_U         L"\\Device\\KeyboardClass"
 
@@ -130,8 +127,6 @@
 	ULONG  ImeOpen;
 	ULONG  ImeConvMode;
 } KEYBOARD_IME_STATUS, *PKEYBOARD_IME_STATUS;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntddmou.h	Wed Jul 16 19:49:02 2003
+++ include/ddk/ntddmou.h	Mon Jun 14 18:33:06 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define DD_MOUSE_DEVICE_NAME              "\\Device\\PointerClass"
 #define DD_MOUSE_DEVICE_NAME_U            L"\\Device\\PointerClass"
 
@@ -110,8 +107,6 @@
   USHORT  SampleRate;
   ULONG  InputDataQueueLength;
 } MOUSE_ATTRIBUTES, *PMOUSE_ATTRIBUTES;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntddpar.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/ntddpar.h	Mon Jun 14 18:40:02 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 /* Parallel port device GUIDs */
 
 DEFINE_GUID (GUID_DEVINTERFACE_PARALLEL,
@@ -114,8 +111,6 @@
 #define ECP_HW_IRQ                        0x0200
 #define ECP_SW                            0x0400
 #define ECP_ANY                           0x0780
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntddpcm.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/ntddpcm.h	Mon Jun 14 18:37:54 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define IOCTL_PCMCIA_BASE                 FILE_DEVICE_CONTROLLER
 
 #define DD_PCMCIA_DEVICE_NAME             "\\\\.\\Pcmcia"
@@ -160,8 +157,6 @@
 	PPCMCIA_SET_VPP  SetVpp;
 	PPCMCIA_IS_WRITE_PROTECTED  IsWriteProtected;
 } PCMCIA_INTERFACE_STANDARD, *PPCMCIA_INTERFACE_STANDARD;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntddscsi.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/ntddscsi.h	Mon Jun 14 18:37:22 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define DD_SCSI_DEVICE_NAME               "\\Device\\ScsiPort"
 #define DD_SCSI_DEVICE_NAME_U             L"\\Device\\ScsiPort"
 
@@ -166,8 +163,6 @@
 	UCHAR  Spare1[2];
 	PVOID  DeviceObject;
 } DUMP_POINTERS, *PDUMP_POINTERS;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntddser.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/ntddser.h	Mon Jun 14 18:36:02 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 /* GUIDs */
 
 DEFINE_GUID(GUID_DEVINTERFACE_COMPORT,
@@ -444,8 +441,6 @@
   ULONG  ProviderSize;
   WCHAR  ProviderData[1];
 } SERIALCONFIG,*PSERIALCONFIG;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntddstor.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/ntddstor.h	Mon Jun 14 18:35:12 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define IOCTL_STORAGE_BASE                FILE_DEVICE_MASS_STORAGE
 
 #define IOCTL_STORAGE_CHECK_VERIFY \
@@ -328,8 +325,6 @@
   STORAGE_QUERY_TYPE  QueryType;
   UCHAR  AdditionalParameters[1];
 } STORAGE_PROPERTY_QUERY, *PSTORAGE_PROPERTY_QUERY;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntddtape.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/ntddtape.h	Mon Jun 14 17:54:32 2004
@@ -31,12 +31,9 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "ntddstor.h"
 
-
 #define DD_TAPE_DEVICE_NAME               "\\Device\\Tape"
 #define DD_TAPE_DEVICE_NAME_U             L"\\Device\\Tape"
 
@@ -74,8 +71,6 @@
   TapeDriveMediaLifeExpired, 
   TapeDriveSnappedTape
 } TAPE_DRIVE_PROBLEM_TYPE;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntddtdi.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/ntddtdi.h	Mon Jun 14 17:54:52 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define DD_TDI_DEVICE_NAME                "\\Device\\UNKNOWN"
 #define DD_TDI_DEVICE_NAME_U              L"\\Device\\UNKNOWN"
 
@@ -56,8 +53,6 @@
 #define IOCTL_TDI_ASSOCIATE_ADDRESS       _TDI_CONTROL_CODE(11, METHOD_BUFFERED)
 #define IOCTL_TDI_DISASSOCIATE_ADDRESS    _TDI_CONTROL_CODE(12, METHOD_BUFFERED)
 #define IOCTL_TDI_ACTION                  _TDI_CONTROL_CODE(13, METHOD_OUT_DIRECT)
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntddvdeo.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/ntddvdeo.h	Mon Jun 14 17:53:02 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 
@@ -434,8 +432,6 @@
 #define VIDEO_DUALVIEW_REMOVABLE          0x00000001
 #define VIDEO_DUALVIEW_PRIMARY            0x80000000
 #define VIDEO_DUALVIEW_SECONDARY          0x40000000
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntddvol.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/ntddvol.h	Mon Jun 14 17:58:30 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define IOCTL_VOLUME_BASE                 ((ULONG) 'V')
 
 #define IOCTL_VOLUME_LOGICAL_TO_PHYSICAL \
@@ -136,8 +133,6 @@
 	ULONG  NumberOfDisks;
 	ULONG  DiskNumbers[1];
 } VOLUME_FAILOVER_SET, *PVOLUME_FAILOVER_SET;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ntpoapi.h	Mon Jun  2 20:21:54 2003
+++ include/ddk/ntpoapi.h	Mon Jun 14 19:11:42 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "batclass.h"
 
@@ -223,9 +221,6 @@
   ULONG  MaxIdleState;
   ULONG  CurrentIdleState;
 } PROCESSOR_POWER_INFORMATION, *PPROCESSOR_POWER_INFORMATION;
-
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/parallel.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/parallel.h	Mon Jun 14 18:27:16 2004
@@ -31,12 +31,9 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "ntddpar.h"
 
-
 #define DD_PARALLEL_PORT_BASE_NAME        "ParallelPort"
 #define DD_PARALLEL_PORT_BASE_NAME_U      L"ParallelPort"
 
@@ -272,8 +269,6 @@
   PPARALLEL_TRYSELECT_DEVICE  ParallelTryselect;
   PPARALLEL_DESELECT_DEVICE  ParallelDeSelect;
 } PARCLASS_INFORMATION, *PPARCLASS_INFORMATION;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/pfhook.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/pfhook.h	Mon Jun 14 19:50:18 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define DD_IPFLTRDRVR_DEVICE_NAME         L"\\Device\\IPFILTERDRIVER"
 
 #define INVALID_PF_IF_INDEX               0xffffffff
@@ -71,8 +68,6 @@
 
 #define IOCTL_PF_SET_EXTENSION_POINTER \
   _IPFLTRDRVR_CTL_CODE(22, METHOD_BUFFERED, FILE_WRITE_ACCESS)
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/poclass.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/poclass.h	Mon Jun 14 19:43:44 2004
@@ -31,12 +31,9 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "batclass.h"
 
-
 DEFINE_GUID(GUID_CLASS_INPUT,
   0x4D1E55B2L, 0xF16F, 0x11CF, 0x88, 0xCB, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30);
 
@@ -113,8 +110,6 @@
 	ULONG  PBlkAddress;
 	UCHAR  PBlkLength;
 } PROCESSOR_OBJECT_INFO, *PPROCESSOR_OBJECT_INFO;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/scsi.h	Sat Mar  6 19:45:00 2004
+++ include/ddk/scsi.h	Mon Jun 14 18:59:52 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 typedef union _CDB {
@@ -1688,8 +1686,6 @@
   ASSERT(_val != 32); \
   (Bit) = _val; \
 }
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/scsiscan.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/scsiscan.h	Mon Jun 14 19:01:54 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define IOCTL_SCSISCAN_CMD \
   CTL_CODE(FILE_DEVICE_SCANNER, SCSISCAN_CMD_CODE, METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
 
@@ -125,8 +122,6 @@
   UCHAR  AdapterName[MAX_STRING];
   ULONG  Reserved;
 } SCSISCAN_INFO, *PSCSISCAN_INFO;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/smbus.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/smbus.h	Mon Jun 14 19:10:32 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #if !defined(SMBCLASS)
   #define SMBCLASSAPI DECLSPEC_IMPORT
 #else
@@ -184,8 +182,6 @@
 DDKAPI
 SmbClassUnlockDevice(
   IN PSMB_CLASS  SmbClass);
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/srb.h	Fri Mar 26 18:21:50 2004
+++ include/ddk/srb.h	Mon Jun 14 18:58:54 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 #if defined(_SCSIPORT_)
@@ -747,8 +745,6 @@
   IN ULONG DebugPrintLevel,
   IN PCCHAR DebugMessage,
   IN ...);
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/storport.h	Fri Jan 23 12:38:02 2004
+++ include/ddk/storport.h	Mon Jun 14 18:57:34 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "srb.h"
 
@@ -416,8 +414,6 @@
 #else
 #define DebugPrint(x)
 #endif
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/tdiinfo.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/tdiinfo.h	Mon Jun 14 19:46:14 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 typedef struct TDIEntityID {
   ULONG  tei_entity;
   ULONG  tei_instance;
@@ -105,8 +102,6 @@
   UINT  BufferSize;
   UCHAR  Buffer[1];
 } TCP_REQUEST_SET_INFORMATION_EX, *PTCP_REQUEST_SET_INFORMATION_EX;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/tdikrnl.h	Wed Jul 16 19:49:02 2003
+++ include/ddk/tdikrnl.h	Mon Jun 14 19:48:46 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "tdi.h"
 
@@ -1156,8 +1154,6 @@
 DDKAPI
 TdiUnmapBuffer(
   IN PMDL  MdlChain);
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/tvout.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/tvout.h	Mon Jun 14 19:09:16 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 /* VIDEOPARAMETERS.dwCommand constants */
 #define VP_COMMAND_GET                    0x00000001
 #define VP_COMMAND_SET                    0x00000002
@@ -111,8 +108,6 @@
   BYTE  bCP_APSTriggerBits;
   BYTE  bOEMCopyProtection[256];
 } VIDEOPARAMETERS, *PVIDEOPARAMETERS, FAR *LPVIDEOPARAMETERS;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/upssvc.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/upssvc.h	Mon Jun 14 19:08:56 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 #if defined(_APCUPS_)
@@ -88,8 +86,6 @@
 UPSWaitForStateChange(
   IN DWORD  aCurrentState,
   IN DWORD  anInterval);
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/usb.h	Wed Jul 16 19:49:02 2003
+++ include/ddk/usb.h	Mon Jun 14 19:14:06 2004
@@ -35,8 +35,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "usb100.h"
 
@@ -463,8 +461,6 @@
 	UCHAR  bVendorCode;
 	UCHAR  bPad;
 } OS_STRING, *POS_STRING;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/usb100.h	Fri Nov 15 00:08:16 2002
+++ include/ddk/usb100.h	Mon Jun 14 19:19:28 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define MAXIMUM_USB_STRING_LENGTH         255
 
 #define USB_DEVICE_CLASS_RESERVED           0x00
@@ -101,15 +98,18 @@
 #define USB_CONFIG_SELF_POWERED           0x40
 #define USB_CONFIG_REMOTE_WAKEUP          0x20
 
+#include <pshpack1.h>
 typedef struct _USB_CONFIGURATION_DESCRIPTOR { 
   UCHAR  bLength;
   UCHAR  bDescriptorType;
   USHORT  wTotalLength;
   UCHAR  bNumInterfaces;
+  UCHAR  bConfigurationValue;
   UCHAR  iConfiguration;
   UCHAR  bmAttributes;
   UCHAR  MaxPower;
 } USB_CONFIGURATION_DESCRIPTOR, *PUSB_CONFIGURATION_DESCRIPTOR;
+#include <poppack.h>
 
 typedef struct _USB_DEVICE_DESCRIPTOR { 
   UCHAR  bLength;
@@ -140,6 +140,7 @@
 #define USB_ENDPOINT_TYPE_BULK            0x02
 #define USB_ENDPOINT_TYPE_INTERRUPT       0x03
 
+#include <pshpack1.h>
 typedef struct _USB_ENDPOINT_DESCRIPTOR { 
   UCHAR  bLength;
   UCHAR  bDescriptorType;
@@ -148,6 +149,7 @@
   USHORT  wMaxPacketSize;
   UCHAR  bInterval;
 } USB_ENDPOINT_DESCRIPTOR, *PUSB_ENDPOINT_DESCRIPTOR;
+#include <poppack.h>
 
 #define USB_FEATURE_ENDPOINT_STALL        0x0000
 #define USB_FEATURE_REMOTE_WAKEUP         0x0001
@@ -170,6 +172,7 @@
   WCHAR  bString[1];
 } USB_STRING_DESCRIPTOR, *PUSB_STRING_DESCRIPTOR;
 
+#include <pshpack1.h>
 typedef struct _USB_HUB_DESCRIPTOR {
 	UCHAR  bDescriptorLength;
 	UCHAR  bDescriptorType;
@@ -179,6 +182,7 @@
 	UCHAR  bHubControlCurrent;
 	UCHAR  bRemoveAndPowerMask[64];
 } USB_HUB_DESCRIPTOR, *PUSB_HUB_DESCRIPTOR;
+#include <poppack.h>
 
 #define USB_SUPPORT_D0_COMMAND            0x01
 #define USB_SUPPORT_D1_COMMAND            0x02
@@ -209,6 +213,7 @@
 #define USB_FEATURE_INTERFACE_POWER_D2    0x0004
 #define USB_FEATURE_INTERFACE_POWER_D3    0x0005
 
+#include <pshpack1.h>
 typedef struct _USB_INTERFACE_POWER_DESCRIPTOR {
 	UCHAR  bLength;
 	UCHAR  bDescriptorType;
@@ -223,8 +228,7 @@
 	USHORT  TransitionTimeFromD2;
 	USHORT  TransitionTimeFromD3;
 } USB_INTERFACE_POWER_DESCRIPTOR, *PUSB_INTERFACE_POWER_DESCRIPTOR;
-
-#pragma pack(pop)
+#include <poppack.h>
 
 #ifdef __cplusplus
 }
--- include/ddk/usbdi.h	Thu Dec 19 00:34:26 2002
+++ include/ddk/usbdi.h	Mon Jun 14 19:37:22 2004
@@ -35,12 +35,9 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "usbioctl.h"
 
-
 #define USBDI_VERSION                     0x300
 
 #define USB_DEFAULT_DEVICE_ADDRESS        0
@@ -400,8 +397,6 @@
 		struct _URB_CONTROL_GET_CONFIGURATION_REQUEST  UrbControlGetConfigurationRequest;
 	};
 } URB, *PURB;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/usbioctl.h	Fri Nov 15 00:08:18 2002
+++ include/ddk/usbioctl.h	Mon Jun 14 19:39:52 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "usb100.h"
 #include "usbiodef.h"
@@ -151,6 +149,8 @@
 	DeviceInLegacyHub
 } USB_CONNECTION_STATUS, *PUSB_CONNECTION_STATUS;
 
+#include <pshpack1.h>
+
 typedef struct _USB_DESCRIPTOR_REQUEST {
 	ULONG  ConnectionIndex;
 	struct {
@@ -344,7 +344,7 @@
 	WCHAR  RootHubName[1];
 } USB_ROOT_HUB_NAME, *PUSB_ROOT_HUB_NAME;
 
-#pragma pack(pop)
+#include <poppack.h>
 
 #ifdef __cplusplus
 }
--- include/ddk/usbiodef.h	Fri Nov 15 00:08:18 2002
+++ include/ddk/usbiodef.h	Mon Jun 14 19:40:54 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 DEFINE_GUID(GUID_DEVINTERFACE_USB_HUB, \
   0xf18a0e88, 0xc30c, 0x11d0, 0x88, 0x15, 0x00, 0xa0, 0xc9, 0x06, 0xbe, 0xd8);
 
@@ -101,8 +98,6 @@
                                     (id), \
                                     METHOD_NEITHER, \
                                     FILE_ANY_ACCESS)
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/usbscan.h	Fri Nov 15 00:08:18 2002
+++ include/ddk/usbscan.h	Mon Jun 14 19:41:12 2004
@@ -31,11 +31,8 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define FILE_DEVICE_USB_SCAN              0x8000
 #define IOCTL_INDEX                       0x0800
 
@@ -153,8 +150,6 @@
 	WRITE_DATA_PIPE,
 	ALL_PIPE
 } PIPE_TYPE;
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/usbuser.h	Fri Nov 15 00:08:18 2002
+++ include/ddk/usbuser.h	Mon Jun 14 19:43:12 2004
@@ -31,12 +31,11 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "usb.h"
 #include "usbiodef.h"
 
+#include <pshpack1.h>
 
 #define USBUSER_VERSION                   0x0004
 
@@ -320,7 +319,7 @@
 	USB_USB2HW_VERSION_PARAMETERS  Parameters;
 } USBUSER_GET_USB2HW_VERSION, *PUSBUSER_GET_USB2HW_VERSION;
 
-#pragma pack(pop)
+#include <poppack.h>
 
 #ifdef __cplusplus
 }
--- include/ddk/videoagp.h	Thu Dec 19 00:34:26 2002
+++ include/ddk/videoagp.h	Mon Jun 14 17:51:02 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "video.h"
 
@@ -123,8 +121,6 @@
 VideoPortGetAgpServices(
 	IN  PVOID  HwDeviceExtension,
 	IN  PVIDEO_PORT_AGP_SERVICES  AgpServices);
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/winddi.h	Sun Apr 18 08:23:08 2004
+++ include/ddk/winddi.h	Mon Jun 14 17:44:30 2004
@@ -828,7 +828,7 @@
 typedef struct _PATHDATA {
   FLONG  flags;
   ULONG  count;
-  POINTFIX  pptfx;
+  POINTFIX  *glypptfx;
 } PATHDATA, *PPATHDATA;
 
 /* PATHOBJ.fl constants */
@@ -856,7 +856,7 @@
 typedef struct _GLYPHPOS {
   HGLYPH  hg;
   GLYPHDEF  *pgdf;
-  POINTL  *ptl;
+  POINTL  ptl;
 } GLYPHPOS, *PGLYPHPOS;
 
 typedef struct _GLYPHDATA {
@@ -4146,8 +4146,6 @@
   OUT VIDEOMEMORY  *pvmList,
   OUT DWORD  *pdwNumFourCCCodes,
   OUT DWORD  *pdwFourCC);
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/winddk.h	Wed Apr 14 22:06:58 2004
+++ include/ddk/winddk.h	Sun Jun 13 19:04:14 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 /*
 ** Definitions specific to this Device Driver Kit
 */
@@ -428,100 +426,100 @@
   DeallocateObjectKeepRegisters
 } IO_ALLOCATION_ACTION, *PIO_ALLOCATION_ACTION;
 
-typedef IO_ALLOCATION_ACTION DDKAPI
-(*PDRIVER_CONTROL)(
+typedef IO_ALLOCATION_ACTION
+(DDKAPI *PDRIVER_CONTROL)(
   IN struct _DEVICE_OBJECT  *DeviceObject,
   IN struct _IRP  *Irp,
   IN PVOID  MapRegisterBase,
   IN PVOID  Context);
 
-typedef VOID DDKAPI
-(*PDRIVER_LIST_CONTROL)(
+typedef VOID
+(DDKAPI *PDRIVER_LIST_CONTROL)(
   IN struct _DEVICE_OBJECT  *DeviceObject,
   IN struct _IRP  *Irp,
   IN struct _SCATTER_GATHER_LIST  *ScatterGather,
   IN PVOID  Context);
 
-typedef NTSTATUS DDKAPI
-(*PDRIVER_ADD_DEVICE)(
+typedef NTSTATUS
+(DDKAPI *PDRIVER_ADD_DEVICE)(
   IN struct _DRIVER_OBJECT  *DriverObject,
   IN struct _DEVICE_OBJECT  *PhysicalDeviceObject);
 
-typedef NTSTATUS DDKAPI
-(*PIO_COMPLETION_ROUTINE)(
+typedef NTSTATUS
+(DDKAPI *PIO_COMPLETION_ROUTINE)(
   IN struct _DEVICE_OBJECT  *DeviceObject,
   IN struct _IRP  *Irp,
   IN PVOID  Context);
 
-typedef VOID DDKAPI
-(*PDRIVER_CANCEL)(
+typedef VOID
+(DDKAPI *PDRIVER_CANCEL)(
   IN struct _DEVICE_OBJECT  *DeviceObject,
   IN struct _IRP  *Irp);
 
-typedef VOID DDKAPI
-(*PKDEFERRED_ROUTINE)(
+typedef VOID
+(DDKAPI *PKDEFERRED_ROUTINE)(
   IN struct _KDPC  *Dpc,
   IN PVOID  DeferredContext,
   IN PVOID  SystemArgument1,
   IN PVOID  SystemArgument2);
 
-typedef NTSTATUS DDKAPI
-(*PDRIVER_DISPATCH)(
+typedef NTSTATUS
+(DDKAPI *PDRIVER_DISPATCH)(
   IN struct _DEVICE_OBJECT  *DeviceObject,
   IN struct _IRP  *Irp);
 
-typedef VOID DDKAPI
-(*PIO_DPC_ROUTINE)(
+typedef VOID
+(DDKAPI *PIO_DPC_ROUTINE)(
   IN struct _KDPC  *Dpc,
   IN struct _DEVICE_OBJECT  *DeviceObject,
   IN struct _IRP  *Irp,
   IN PVOID  Context);
 
-typedef NTSTATUS DDKAPI
-(*PMM_DLL_INITIALIZE)(
+typedef NTSTATUS
+(DDKAPI *PMM_DLL_INITIALIZE)(
   IN PUNICODE_STRING  RegistryPath);
 
-typedef NTSTATUS DDKAPI
-(*PMM_DLL_UNLOAD)(
+typedef NTSTATUS
+(DDKAPI *PMM_DLL_UNLOAD)(
   VOID);
 
-typedef NTSTATUS DDKAPI
-(*PDRIVER_ENTRY)( 
+typedef NTSTATUS
+(DDKAPI *PDRIVER_ENTRY)( 
   IN struct _DRIVER_OBJECT  *DriverObject, 
   IN PUNICODE_STRING  RegistryPath); 
 
-typedef NTSTATUS DDKAPI
-(*PDRIVER_INITIALIZE)(
+typedef NTSTATUS
+(DDKAPI *PDRIVER_INITIALIZE)(
   IN struct _DRIVER_OBJECT  *DriverObject, 
   IN PUNICODE_STRING  RegistryPath);
 
-typedef BOOLEAN DDKAPI
-(*PKSERVICE_ROUTINE)(
+typedef BOOLEAN
+(DDKAPI *PKSERVICE_ROUTINE)(
   IN struct _KINTERRUPT  *Interrupt,
   IN PVOID  ServiceContext);
 
-typedef VOID DDKAPI
-(*PIO_TIMER_ROUTINE)(
+typedef VOID
+(DDKAPI *PIO_TIMER_ROUTINE)(
   IN struct _DEVICE_OBJECT  *DeviceObject,
   IN PVOID  Context);
 
-typedef VOID DDKAPI
-(*PDRIVER_REINITIALIZE)( 
+typedef VOID
+(DDKAPI *PDRIVER_REINITIALIZE)( 
   IN struct _DRIVER_OBJECT  *DriverObject, 
   IN PVOID  Context, 
   IN ULONG  Count); 
 
-typedef NTSTATUS DDKAPI
-(*PDRIVER_STARTIO)(
+typedef NTSTATUS
+(DDKAPI *PDRIVER_STARTIO)(
   IN struct _DEVICE_OBJECT  *DeviceObject,
   IN struct _IRP  *Irp);
 
-typedef BOOLEAN DDKAPI
-(*PKSYNCHRONIZE_ROUTINE)(
+typedef BOOLEAN
+(DDKAPI *PKSYNCHRONIZE_ROUTINE)(
   IN PVOID  SynchronizeContext);
 
-typedef VOID DDKAPI
-(*PDRIVER_UNLOAD)( 
+typedef VOID
+(DDKAPI *PDRIVER_UNLOAD)( 
   IN struct _DRIVER_OBJECT  *DriverObject); 
 
 
@@ -1094,6 +1092,7 @@
   UCHAR  MoreEntries : 1;
 } EISA_MEMORY_TYPE, *PEISA_MEMORY_TYPE;
 
+#include <pshpack1.h>
 typedef struct _EISA_MEMORY_CONFIGURATION {
   EISA_MEMORY_TYPE  ConfigurationByte;
   UCHAR  DataSize;
@@ -1101,6 +1100,7 @@
   UCHAR  AddressHighByte;
   USHORT  MemorySize;
 } EISA_MEMORY_CONFIGURATION, *PEISA_MEMORY_CONFIGURATION;
+#include <poppack.h>
 
 typedef struct _EISA_IRQ_DESCRIPTOR {
   UCHAR  Interrupt : 4;
@@ -1134,6 +1134,7 @@
   DMA_CONFIGURATION_BYTE1  ConfigurationByte1;
 } EISA_DMA_CONFIGURATION, *PEISA_DMA_CONFIGURATION;
 
+#include <pshpack1.h>
 typedef struct _EISA_PORT_DESCRIPTOR {
   UCHAR  NumberPorts : 5;
   UCHAR  Reserved : 1;
@@ -1145,6 +1146,7 @@
   EISA_PORT_DESCRIPTOR  Configuration;
   USHORT  PortAddress;
 } EISA_PORT_CONFIGURATION, *PEISA_PORT_CONFIGURATION;
+#include <poppack.h>
 
 typedef struct _CM_EISA_FUNCTION_INFORMATION {
   ULONG  CompressedId;
@@ -1243,6 +1245,7 @@
   ULONG  BusNumber;
 } PNP_BUS_INFORMATION, *PPNP_BUS_INFORMATION;
 
+#include <pshpack1.h>
 typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR {
   UCHAR Type;
   UCHAR ShareDisposition;
@@ -1373,6 +1376,7 @@
   USHORT  MaxHeads;
   USHORT  NumberDrives;
 } CM_INT13_DRIVE_PARAMETER, *PCM_INT13_DRIVE_PARAMETER;
+#include <poppack.h>
 
 typedef struct _CM_KEYBOARD_DEVICE_DATA {
   USHORT  Version;
@@ -1966,7 +1970,7 @@
   WCHAR  FileName[1];                                      
 } FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;           
 
-typedef struct FILE_BASIC_INFORMATION {
+typedef struct _FILE_BASIC_INFORMATION {
   LARGE_INTEGER  CreationTime;
   LARGE_INTEGER  LastAccessTime;
   LARGE_INTEGER  LastWriteTime;
@@ -2331,7 +2335,6 @@
   PFAST_IO_RELEASE_FOR_CCFLUSH  ReleaseForCcFlush;
 } FAST_IO_DISPATCH, *PFAST_IO_DISPATCH;
 
-/* NOTE: PVOID for methods to avoid 'assignment from incompatible pointer type' warning */
 typedef struct _DRIVER_OBJECT {
   CSHORT  Type;
   CSHORT  Size;
@@ -2343,11 +2346,11 @@
   PDRIVER_EXTENSION  DriverExtension;
   UNICODE_STRING  DriverName;
   PUNICODE_STRING  HardwareDatabase;
-  PVOID  FastIoDispatch;
-  PVOID  DriverInit;
-  PVOID  DriverStartIo;
-  PVOID  DriverUnload;
-  PVOID  MajorFunction[IRP_MJ_MAXIMUM_FUNCTION + 1];
+  PFAST_IO_DISPATCH  FastIoDispatch;
+  PDRIVER_INITIALIZE  DriverInit;
+  PDRIVER_STARTIO  DriverStartIo;
+  PDRIVER_UNLOAD  DriverUnload;
+  PDRIVER_DISPATCH  MajorFunction[IRP_MJ_MAXIMUM_FUNCTION + 1];
 } DRIVER_OBJECT;
 typedef struct _DRIVER_OBJECT *PDRIVER_OBJECT;
 
@@ -2443,6 +2446,7 @@
   PVOID  ProcessAuditId;
 } SECURITY_SUBJECT_CONTEXT, *PSECURITY_SUBJECT_CONTEXT;
 
+#include <pshpack4.h>
 typedef struct _ACCESS_STATE {
   LUID  OperationID;
   BOOLEAN  SecurityEvaluated;
@@ -2465,6 +2469,7 @@
   UNICODE_STRING  ObjectName;
   UNICODE_STRING  ObjectTypeName;
 } ACCESS_STATE, *PACCESS_STATE;
+#include <poppack.h>
 
 typedef struct _IO_SECURITY_CONTEXT {
   PSECURITY_QUALITY_OF_SERVICE  SecurityQos;
@@ -2523,6 +2528,7 @@
   PVOID  ReservePointer;
 } IO_CSQ, *PIO_CSQ;
 
+#include <pshpack4.h>
 typedef struct _IO_STACK_LOCATION {
   UCHAR  MajorFunction;
   UCHAR  MinorFunction;
@@ -2663,6 +2669,7 @@
   PIO_COMPLETION_ROUTINE  CompletionRoutine;
   PVOID  Context;
 } IO_STACK_LOCATION, *PIO_STACK_LOCATION;
+#include <poppack.h>
 
 /* IO_STACK_LOCATION.Control */
 
@@ -3703,6 +3710,7 @@
 #define LOW_LEVEL                          0
 #define APC_LEVEL                          1
 #define DISPATCH_LEVEL                     2
+#define SYNCH_LEVEL                       27
 #define PROFILE_LEVEL                     27
 #define CLOCK1_LEVEL                      28
 #define CLOCK2_LEVEL                      28
@@ -3720,31 +3728,31 @@
     DWORD  Version;             /* 10 */
   } DUMMYUNIONNAME;
   PVOID  ArbitraryUserPointer;  /* 14 */
-} KPCR_TIB, *PKPCR_TIB;         /* 18 */
+  struct _NT_TIB *Self;         /* 18 */
+} KPCR_TIB, *PKPCR_TIB;         /* 1C */
 
 #define PCR_MINOR_VERSION 1
 #define PCR_MAJOR_VERSION 1
 
 typedef struct _KPCR {
   KPCR_TIB  Tib;                /* 00 */
-  struct _KPCR  *Self;          /* 18 */
-  struct _KPRCB  *PCRCB;        /* 1C */
-  KIRQL  Irql;                  /* 20 */
-  ULONG  IRR;                   /* 24 */
-  ULONG  IrrActive;             /* 28 */
-  ULONG  IDR;                   /* 2C */
-  PVOID  KdVersionBlock;        /* 30 */
-  PUSHORT  IDT;                 /* 34 */
-  PUSHORT  GDT;                 /* 38 */
-  struct _KTSS  *TSS;           /* 3C */
-  USHORT  MajorVersion;         /* 40 */
-  USHORT  MinorVersion;         /* 42 */
-  KAFFINITY  SetMember;         /* 44 */
-  ULONG  StallScaleFactor;      /* 48 */
-  UCHAR  DebugActive;           /* 4C */
-  UCHAR  ProcessorNumber;       /* 4D */
-  UCHAR  Reserved[2];           /* 4E */
-} KPCR, *PKPCR;                 /* 50 */
+  struct _KPCR  *Self;          /* 1C */
+  struct _KPRCB  *PCRCB;        /* 20 */
+  KIRQL  Irql;                  /* 24 */
+  ULONG  IRR;                   /* 28 */
+  ULONG  IrrActive;             /* 2C */
+  ULONG  IDR;                   /* 30 */
+  PVOID  KdVersionBlock;        /* 34 */
+  PUSHORT  IDT;                 /* 38 */
+  PUSHORT  GDT;                 /* 3C */
+  struct _KTSS  *TSS;           /* 40 */
+  USHORT  MajorVersion;         /* 44 */
+  USHORT  MinorVersion;         /* 46 */
+  KAFFINITY  SetMember;         /* 48 */
+  ULONG  StallScaleFactor;      /* 4C */
+  UCHAR  SpareUnused;           /* 50 */
+  UCHAR  Number;                /* 51 */
+} KPCR, *PKPCR;                 /* 54 */
 
 typedef struct _KFLOATING_SAVE {
   ULONG  ControlWord;
@@ -4142,6 +4150,8 @@
   return Entry;
 }
 
+#if !defined(_WINBASE_H) || _WIN32_WINNT < 0x0501
+
 NTOSAPI
 PSLIST_ENTRY
 DDKFASTAPI
@@ -4155,6 +4165,8 @@
   IN PSLIST_HEADER  ListHead,
   IN PSLIST_ENTRY  ListEntry);
 
+#endif
+
 /*
  * USHORT
  * QueryDepthSList(
@@ -4398,12 +4410,12 @@
 /*
  * BOOLEAN
  * RtlEqualLuid( 
- *   IN LUID*  Luid1,
- *   IN LUID*  Luid2)
+ *   IN LUID  Luid1,
+ *   IN LUID  Luid2)
  */
-#define RtlEqualLuid(_Luid1,_Luid2) \
-  ((BOOLEAN) (((_Luid1)->LowPart == (_Luid2)->LowPart) \
-	      && ((_Luid1)->HighPart == (_Luid2)->HighPart)))
+#define RtlEqualLuid(_Luid1, \
+                     _Luid2) \
+  ((Luid1.LowPart == Luid2.LowPart) && (Luid1.HighPart == Luid2.HighPart))
 
 /*
  * ULONG
@@ -5790,8 +5802,6 @@
   IN PUSHORT  Register,
   IN USHORT  Value);
 
-
-
 /** I/O manager routines **/
 
 NTOSAPI
@@ -7116,14 +7126,11 @@
   OUT PKIRQL  OldIrql);
 
 /* System Service Dispatch Table */
-typedef struct _SSDT {
-  ULONG  SysCallPtr;
-} SSDT, *PSSDT;
+typedef PVOID (NTAPI * SSDT)(VOID);
+typedef SSDT * PSSDT;
 
 /* System Service Parameters Table */
-typedef struct _SSPT {
-  ULONG  ParamBytes;
-} SSPT, *PSSPT;
+typedef UCHAR SSPT, * PSSPT;
 
 typedef struct _SSDT_ENTRY {
 	PSSDT  SSDT;
@@ -7318,12 +7325,6 @@
   VOID);
 
 NTOSAPI
-VOID
-DDKAPI
-KeLowerIrql(
-  IN KIRQL  NewIrql);
-
-NTOSAPI
 NTSTATUS
 DDKAPI
 KePulseEvent(
@@ -7368,19 +7369,6 @@
   VOID);
 
 NTOSAPI
-VOID
-DDKAPI
-KeRaiseIrql(
-  IN KIRQL  NewIrql,
-  OUT PKIRQL  OldIrql);
-
-NTOSAPI
-KIRQL
-DDKAPI
-KeRaiseIrqlToDpcLevel(
-  VOID);
-
-NTOSAPI
 LONG
 DDKAPI
 KeReadStateEvent(
@@ -7606,7 +7594,44 @@
   IN BOOLEAN  Alertable,
   IN PLARGE_INTEGER  Timeout  OPTIONAL);
 
+#if defined(_X86_)
 
+NTOSAPI
+VOID
+FASTCALL
+KfLowerIrql(
+  IN KIRQL  NewIrql);
+
+NTOSAPI
+KIRQL
+FASTCALL
+KfRaiseIrql(
+  IN KIRQL  NewIrql);
+
+#define KeLowerIrql(a) KfLowerIrql(a)
+#define KeRaiseIrql(a,b) *(b) = KfRaiseIrql(a)
+
+#else
+
+NTOSAPI
+VOID
+DDKAPI
+KeLowerIrql(
+  IN KIRQL  NewIrql);
+
+NTOSAPI
+KIRQL
+DDKAPI
+KeRaiseIrql(
+  IN KIRQL  NewIrql);
+
+#endif
+
+NTOSAPI
+KIRQL
+DDKAPI
+KeRaiseIrqlToDpcLevel(
+  VOID);
 
 /** Memory manager routines **/
 
@@ -9091,8 +9126,6 @@
 extern NTOSAPI PBOOLEAN KdDebuggerEnabled;
 #define KD_DEBUGGER_ENABLED     *KdDebuggerEnabled
 #define KD_DEBUGGER_NOT_PRESENT *KdDebuggerNotPresent
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/winnt4.h	Wed Jul 16 19:49:02 2003
+++ include/ddk/winnt4.h	Mon Jun 14 17:35:18 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 typedef struct _ZONE_SEGMENT_HEADER {
   SINGLE_LIST_ENTRY  SegmentList;
   PVOID  Reserved;
@@ -598,8 +596,6 @@
 #define ExInterlockedExchangeUlong(Target, Value, Lock) Exfi386InterlockedExchangeUlong(Target, Value)
 
 #endif /* _X86_ */
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }
--- include/ddk/ws2san.h	Thu Dec 19 00:34:26 2002
+++ include/ddk/ws2san.h	Mon Jun 14 18:29:22 2004
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include <winsock2.h>
 #include "ntddk.h"
 
@@ -242,8 +240,6 @@
   OUT LPVOID  lpRdmaBufferDescriptor,
   IN OUT LPDWORD  lpdwDescriptorLength,
   OUT LPINT  lpErrno);
-
-#pragma pack(pop)
 
 #ifdef __cplusplus
 }

--------------090404090701040303060604--


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php