]> sourceware.org Git - newlib-cygwin.git/commitdiff
2004-09-29 Filip Navara <xnavara@volny.cz>
authorDanny Smith <dannysmith@users.sourceforge.net>
Tue, 28 Sep 2004 08:46:54 +0000 (08:46 +0000)
committerDanny Smith <dannysmith@users.sourceforge.net>
Tue, 28 Sep 2004 08:46:54 +0000 (08:46 +0000)
* include/ddk/(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/ddk/atm.h (ATM_TRAFFIC_DESCRIPTOR_IE): Fixed declaration.
* include/ddk/hidclass.h (HID_INTERFACE_HIDPARSE,
HID_INTERFACE_NOTIFY_PNP): Likewise.
* include/ddk/ndis.h (NDIS_DMA_BLOCK, CO_FLOW_PARAMETERS): Likewise.
(NdisQueryPacketLength): Added macro. Thanks to Art Yerkes
<ayerkes@speakeasy.net>.
* include/ddk/usb100.h (USB_CONFIGURATION_DESCRIPTOR): Fixed
declaration.
* include/ddk/winddi.h (PATHDATA, GLYPHPOS): Likewise.
* include/ddk/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.

62 files changed:
winsup/w32api/ChangeLog
winsup/w32api/include/ddk/atm.h
winsup/w32api/include/ddk/batclass.h
winsup/w32api/include/ddk/cfg.h
winsup/w32api/include/ddk/cfgmgr32.h
winsup/w32api/include/ddk/d4drvif.h
winsup/w32api/include/ddk/d4iface.h
winsup/w32api/include/ddk/ddkmapi.h
winsup/w32api/include/ddk/hidclass.h
winsup/w32api/include/ddk/hidpi.h
winsup/w32api/include/ddk/mcd.h
winsup/w32api/include/ddk/miniport.h
winsup/w32api/include/ddk/mountdev.h
winsup/w32api/include/ddk/mountmgr.h
winsup/w32api/include/ddk/ndis.h
winsup/w32api/include/ddk/ndistapi.h
winsup/w32api/include/ddk/ndiswan.h
winsup/w32api/include/ddk/netpnp.h
winsup/w32api/include/ddk/newdev.h
winsup/w32api/include/ddk/ntapi.h
winsup/w32api/include/ddk/ntdd8042.h
winsup/w32api/include/ddk/ntddbeep.h
winsup/w32api/include/ddk/ntddcdrm.h
winsup/w32api/include/ddk/ntddcdvd.h
winsup/w32api/include/ddk/ntddchgr.h
winsup/w32api/include/ddk/ntdddisk.h
winsup/w32api/include/ddk/ntddkbd.h
winsup/w32api/include/ddk/ntddmou.h
winsup/w32api/include/ddk/ntddpar.h
winsup/w32api/include/ddk/ntddpcm.h
winsup/w32api/include/ddk/ntddscsi.h
winsup/w32api/include/ddk/ntddser.h
winsup/w32api/include/ddk/ntddstor.h
winsup/w32api/include/ddk/ntddtape.h
winsup/w32api/include/ddk/ntddtdi.h
winsup/w32api/include/ddk/ntddvdeo.h
winsup/w32api/include/ddk/ntddvol.h
winsup/w32api/include/ddk/ntpoapi.h
winsup/w32api/include/ddk/parallel.h
winsup/w32api/include/ddk/pfhook.h
winsup/w32api/include/ddk/poclass.h
winsup/w32api/include/ddk/scsi.h
winsup/w32api/include/ddk/scsiscan.h
winsup/w32api/include/ddk/smbus.h
winsup/w32api/include/ddk/srb.h
winsup/w32api/include/ddk/storport.h
winsup/w32api/include/ddk/tdiinfo.h
winsup/w32api/include/ddk/tdikrnl.h
winsup/w32api/include/ddk/tvout.h
winsup/w32api/include/ddk/upssvc.h
winsup/w32api/include/ddk/usb.h
winsup/w32api/include/ddk/usb100.h
winsup/w32api/include/ddk/usbdi.h
winsup/w32api/include/ddk/usbioctl.h
winsup/w32api/include/ddk/usbiodef.h
winsup/w32api/include/ddk/usbscan.h
winsup/w32api/include/ddk/usbuser.h
winsup/w32api/include/ddk/videoagp.h
winsup/w32api/include/ddk/winddi.h
winsup/w32api/include/ddk/winddk.h
winsup/w32api/include/ddk/winnt4.h
winsup/w32api/include/ddk/ws2san.h

index b14a4422ef02927b9db1e4888bd03c8f73e39cb6..dccf7e4247152aee36815ac68e6311e1a513e2fd 100644 (file)
@@ -1,3 +1,41 @@
+2004-09-29  Filip Navara  <xnavara@volny.cz>
+
+       * include/ddk/(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/ddk/atm.h (ATM_TRAFFIC_DESCRIPTOR_IE): Fixed declaration.
+       * include/ddk/hidclass.h (HID_INTERFACE_HIDPARSE,
+       HID_INTERFACE_NOTIFY_PNP): Likewise.
+       * include/ddk/ndis.h (NDIS_DMA_BLOCK, CO_FLOW_PARAMETERS): Likewise.
+       (NdisQueryPacketLength): Added macro. Thanks to Art Yerkes
+       <ayerkes@speakeasy.net>.
+       * include/ddk/usb100.h (USB_CONFIGURATION_DESCRIPTOR): Fixed
+       declaration.
+       * include/ddk/winddi.h (PATHDATA, GLYPHPOS): Likewise.
+       * include/ddk/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.
+
 2004-09-06  Hosaka Yuji  <hos@tamanegi.org>
  
        * include/mshtml.h (IHTMLDocument2): Correct get_selection
index bf95bd98ad5f2688b361d31b797bc0dd45b06926..d302293851773a66d106d0e46edd272211772e6d 100644 (file)
@@ -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 {
 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 */
@@ -501,8 +500,6 @@ typedef struct _ATM_SERVICE_ADDRESS_LIST {
   ATM_ADDRESS  Address[1];
 } ATM_SERVICE_ADDRESS_LIST, *PATM_SERVICE_ADDRESS_LIST;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 1beef49113f18a384bd5c1c6ef5b6e589131eb59..6644727057ee2befa83444bcb8c72a2a04412654 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 #if defined(_BATTERYCLASS_)
@@ -293,8 +291,6 @@ DDKAPI
 BatteryClassUnload(
   IN PVOID  ClassData);
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index c2250247584d65bd86beb249645e95d60f5ec544..107bd4aae8519a74d2b18e41258c2bc4852818da 100644 (file)
@@ -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
@@ -134,8 +132,6 @@ typedef enum _PNP_VETO_TYPE {
   PNP_VetoLegacyDriver
 } PNP_VETO_TYPE, *PPNP_VETO_TYPE;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index a048bb4922f71046f0150ea2f3400227d85d672c..5249a22fc3e3bd849616c59a0e03bbae62f0d2d5 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 #if defined(_CFGMGR32_)
@@ -43,6 +41,8 @@ extern "C" {
 
 #include "cfg.h"
 
+#include <pshpack1.h>
+
 #define CR_SUCCESS                                     0x00000000
 #define CR_DEFAULT                        0x00000001
 #define CR_OUT_OF_MEMORY                  0x00000002
@@ -1524,7 +1524,7 @@ WINAPI
 CMP_WaitNoPendingInstallEvents(
   IN DWORD dwTimeout);
 
-#pragma pack(pop)
+#include <poppack.h>
 
 #ifdef __cplusplus
 }
index fff128694bfe096b43149f6750075f223201bed6..c10e781705a2d476d34cdd8f1bc1f15f0ba266ea 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "d4iface.h"
 
@@ -99,8 +97,6 @@ typedef struct _DOT4_DRIVER_CMD {
   ULONG  ulTimeout;
 } DOT4_DRIVER_CMD, *PDOT4_DRIVER_CMD;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 3cd511656b1f3ceb81667041833f1fbde51ec477..245bc4c82b9dc6518e7fe3023ea6d68954f7aff3 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 #define DOT4_MAX_CHANNELS                 128
@@ -79,8 +77,6 @@ typedef struct _DOT4_WMI_XFER_INFO {
   ULONG  ulPacketBytesRead;
 } DOT4_WMI_XFER_INFO, *PDOT4_WMI_XFER_INFO;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index feeff87639bcb478db3bfa5b8b5c4a68af4ffe49..e5d4fee1530cf82ded4fe2abe5d77c30b80007da 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 #if defined(_DXAPI_)
@@ -329,8 +327,6 @@ typedef struct _DDSETSKIPFIELD {
   DWORD  dwStartField;
 } DDSETSKIPFIELD, FAR *LPDDSETSKIPFIELD;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 8717fc5ef292056635b77370d081b5136c33609d..8d52e45b13571db588a82500d51ff7aba2a80076 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "hidpi.h"
 
@@ -112,25 +110,31 @@ typedef struct _HID_DRIVER_CONFIG {
 } 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;
@@ -142,8 +146,6 @@ typedef struct _HID_XFER_PACKET {
   UCHAR  reportId;
 } HID_XFER_PACKET, *PHID_XFER_PACKET;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 2f8ea5732365d42f03958f5fba2cc78c830f151e..d6021782f20ce85adf7ec88ef602df4bea76c216 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "hidusage.h"
 
@@ -599,8 +597,6 @@ HidP_UsageListDifference(
   OUT PUSAGE  MakeUsageList,
   IN ULONG  UsageListLength);
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index c5e2380cf4e3ec9795a922bc17cfbe30dafa2750..4a0e7db76231e601e7b933eb0642a6b4f3f2183a 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "srb.h"
 #include "scsi.h"
@@ -138,8 +136,6 @@ ChangerClassInitialize(
   IN PUNICODE_STRING  RegistryPath,
   IN PMCD_INIT_DATA  MCDInitData);
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 01bbd23a600f761a120350393e9744302d38f241..7a56cd1aba0735d738fe403871f74911a83659a8 100644 (file)
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define EMULATOR_READ_ACCESS              0x01
 #define EMULATOR_WRITE_ACCESS             0x02
 
@@ -73,8 +70,6 @@ typedef VOID DDKAPI
   IN ULONG  WriteBank,
   IN PVOID  Context);
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index d22d9be7ef0f3061abd953c65b3936bdf04bc4d7..1bfed03f3e190f1c2d1e694d563aa65513ce2a1e 100644 (file)
 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)
 
@@ -75,8 +72,6 @@ typedef struct _MOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY_OUTPUT {
   USHORT  NewUniqueIdLength;
 } MOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY_OUTPUT;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index ec5241c141ae5cb6866f59a21d194f059271073f..6a56db868e9a7bbe51383dcd21cba7c4616a45bb 100644 (file)
 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);
 
@@ -135,8 +132,6 @@ typedef struct _MOUNTMGR_VOLUME_MOUNT_POINT {
   USHORT  TargetVolumeNameLength;
 } MOUNTMGR_VOLUME_MOUNT_POINT, *PMOUNTMGR_VOLUME_MOUNT_POINT;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 216249df48e6aa425e81659851b1a59e4e855b9c..8ab5d5c989158a3ab4902fca29c7481da6ec347d 100644 (file)
@@ -37,8 +37,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "ntddndis.h"
 #include "netpnp.h"
@@ -537,6 +535,7 @@ typedef struct _NDIS_DMA_BLOCK {
   PVOID  MapRegisterBase;
   KEVENT  AllocationEvent;
   PADAPTER_OBJECT  SystemAdapterObject;
+  PVOID  Miniport;
   BOOLEAN  InProgress;
 } NDIS_DMA_BLOCK, *PNDIS_DMA_BLOCK;
 
@@ -703,10 +702,9 @@ typedef struct _CO_FLOW_PARAMETERS {
   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 @@ NdisFreeBuffer(
   } \
 }
 
+/*
+ * 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
@@ -5178,8 +5218,6 @@ typedef struct _NDIS_MAC_CHARACTERISTICS {
 typedef        NDIS_MAC_CHARACTERISTICS        NDIS_WAN_MAC_CHARACTERISTICS;
 typedef        NDIS_WAN_MAC_CHARACTERISTICS    *PNDIS_WAN_MAC_CHARACTERISTICS;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 774f42af9f2bad364128fea284079129486b049d..97bd442bd8c715058a8496e8de64904a2a90c40e 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ndis.h"
 
 #ifndef NDIS_TAPI_CURRENT_VERSION
@@ -1303,8 +1301,6 @@ typedef struct _CO_AF_TAPI_MAKE_CALL_PARAMETERS {
   IN  NDIS_VAR_DATA_DESC  LineCallParams;
 } CO_AF_TAPI_MAKE_CALL_PARAMETERS, *PCO_AF_TAPI_MAKE_CALL_PARAMETERS;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index a3156d5a98cffb1e6204ccf9fd483a8bb1e54a08..66fb0de6edb2e2a17a4b3620ca51501800e70fc0 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ndis.h"
 
 #define NDIS_USE_WAN_WRAPPER                           0x00000001
@@ -246,8 +244,6 @@ typedef struct _NDIS_WAN_CO_GET_STATS_INFO {
   OUT ULONG  BytesReceivedCompressed;
 } NDIS_WAN_CO_GET_STATS_INFO, *PNDIS_WAN_CO_GET_STATS_INFO;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 32f305d0323e36d1c03e2faa55d4a2f974c28068..09ea55e182ba64d0ae8a19444596c74f3b41501e 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 typedef enum _NET_PNP_EVENT_CODE {
   NetEventSetPower,
   NetEventQueryPower,
@@ -64,8 +62,6 @@ typedef enum _NET_DEVICE_POWER_STATE {
   NetDeviceStateMaximum
 } NET_DEVICE_POWER_STATE, *PNET_DEVICE_POWER_STATE;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 7f618ded04551d6dbc072fa8a4778dae2c26b95d..9e31779000971b090a8e8ebfb02c6dce87814713 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 /* UpdateDriverForPlugAndPlayDevices.InstallFlags constants */
 #define INSTALLFLAG_FORCE                 0x00000001
 #define INSTALLFLAG_READONLY              0x00000002
@@ -61,8 +59,6 @@ UpdateDriverForPlugAndPlayDevicesW(
 #define UpdateDriverForPlugAndPlayDevices UpdateDriverForPlugAndPlayDevicesA
 #endif /* UNICODE */
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index c653e765b3af7630d261d44e46d90e06d989030b..ba4bedb8c626f4c7912b9ea30e2d60009e2536eb 100644 (file)
 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 */
index 7696c8e273414d66533ba22d271dd2ed58c94e39..b9947b162e147ca957aab00145fccb7b36490e26 100644 (file)
 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)
 
@@ -209,8 +206,6 @@ typedef struct _INTERNAL_I8042_HOOK_MOUSE {
   IN PVOID  CallContext;
 } INTERNAL_I8042_HOOK_MOUSE, *PINTERNAL_I8042_HOOK_MOUSE;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index b82b6274eaf03dc35a2a21f688647bf54e4365fd..6052a094858b547c2b8b5fb858a0850aba51b9f5 100644 (file)
 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"
 
@@ -50,8 +47,6 @@ typedef struct _BEEP_SET_PARAMETERS {
 #define BEEP_FREQUENCY_MINIMUM            0x25
 #define BEEP_FREQUENCY_MAXIMUM            0x7FFF
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 82bf815c2b470c2d36113fe308e25a2609bd6b89..49cf29dd2c59c0e3bd788230818495fe4852465c 100644 (file)
 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 \
@@ -343,8 +340,6 @@ typedef struct __RAW_READ_INFO {
        TRACK_MODE_TYPE  TrackMode;
 } RAW_READ_INFO, *PRAW_READ_INFO;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 48a106badcc492484b316bf9a1df948f553ed2f6..82c2a60ff224300efc49a7146d4c1fffd25a176c 100644 (file)
 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 @@ typedef enum DVD_STRUCTURE_FORMAT {
   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 @@ typedef struct _DVD_DESCRIPTOR_HEADER {
     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 @@ typedef struct _DVD_LAYER_DESCRIPTOR {
   UCHAR  BCAFlag : 1;
   UCHAR  Reserved6;
 } DVD_LAYER_DESCRIPTOR, *PDVD_LAYER_DESCRIPTOR;
+#include <poppack.h>
 
 typedef struct _DVD_COPYRIGHT_DESCRIPTOR {
   UCHAR  CopyrightProtectionType;
@@ -205,8 +206,6 @@ typedef struct _DVD_REGION {
        UCHAR  ResetCount;
 } DVD_REGION, *PDVD_REGION;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 7cd6cfafdfc4c61a5aae5b027b13b161a8a3f63c..8c9e81e8196225b474f73db26360bd0eb7a15511 100644 (file)
 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"
 
@@ -349,8 +346,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
 }
 #endif
index 205046928f9a7569dd454e7d424958ea92465d22..daf75c0870eebaa2f73dcb460330d5798a2a006b 100644 (file)
 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 @@ typedef struct _IDEREGS {
        UCHAR  bReserved;
 } IDEREGS, *PIDEREGS, *LPIDEREGS;
 
+#include <pshpack1.h>
 typedef struct _SENDCMDINPARAMS {
        ULONG  cBufferSize;
        IDEREGS  irDriveRegs;
@@ -462,6 +460,7 @@ typedef struct _SENDCMDINPARAMS {
        ULONG  dwReserved[4];
        UCHAR  bBuffer[1];
 } SENDCMDINPARAMS, *PSENDCMDINPARAMS, *LPSENDCMDINPARAMS;
+#include <poppack.h>
 
 /* DRIVERSTATUS.bDriverError constants */
 #define SMART_NO_ERROR                    0
@@ -495,11 +494,13 @@ typedef struct _DRIVERSTATUS {
 #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
@@ -513,8 +514,6 @@ typedef struct _SENDCMDOUTPARAMS {
 #define RETURN_SMART_STATUS               0xDA
 #define ENABLE_DISABLE_AUTO_OFFLINE       0xDB
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 9a1a358a371943c0dfc12c575913f14684f3980e..93bc690b5c84067cd20a81fa47d321eb4a64a673 100644 (file)
 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"
 
@@ -131,8 +128,6 @@ typedef struct _KEYBOARD_IME_STATUS {
        ULONG  ImeConvMode;
 } KEYBOARD_IME_STATUS, *PKEYBOARD_IME_STATUS;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 457b9d96e9e39c227e0ab4f905db5088f14ebb41..fcf9445abd6412f96bba908aeba6d9dc1b62b6d7 100644 (file)
 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"
 
@@ -111,8 +108,6 @@ typedef struct _MOUSE_ATTRIBUTES {
   ULONG  InputDataQueueLength;
 } MOUSE_ATTRIBUTES, *PMOUSE_ATTRIBUTES;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 2f88c39c432b79e3372b23db154a1cc2f4255fa4..1b423650cd0daa3d4c543591a7d0f24f0b8c1b02 100644 (file)
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 /* Parallel port device GUIDs */
 
 DEFINE_GUID (GUID_DEVINTERFACE_PARALLEL,
@@ -115,8 +112,6 @@ typedef struct _PARCLASS_NEGOTIATION_MASK {
 #define ECP_SW                            0x0400
 #define ECP_ANY                           0x0780
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index f16e33d3507f4ce988886c70c7d86f71c3dd45ee..22ef5dd95258718be4e5e652f993a3fbd9b27181 100644 (file)
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define IOCTL_PCMCIA_BASE                 FILE_DEVICE_CONTROLLER
 
 #define DD_PCMCIA_DEVICE_NAME             "\\\\.\\Pcmcia"
@@ -161,8 +158,6 @@ typedef struct _PCMCIA_INTERFACE_STANDARD {
        PPCMCIA_IS_WRITE_PROTECTED  IsWriteProtected;
 } PCMCIA_INTERFACE_STANDARD, *PPCMCIA_INTERFACE_STANDARD;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index c580ae3c60afefd072260a3de11cd88b14dcf87a..11629cbaa59205f47d825502223d34c6680b2a5b 100644 (file)
 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"
 
@@ -167,8 +164,6 @@ typedef struct _DUMP_POINTERS {
        PVOID  DeviceObject;
 } DUMP_POINTERS, *PDUMP_POINTERS;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 1a3fb1c092cbca0592457dbeab0f8cf0806d70cf..cc0bd2a9f82c48a322e9580b30fb633b59250655 100644 (file)
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 /* GUIDs */
 
 DEFINE_GUID(GUID_DEVINTERFACE_COMPORT,
@@ -445,8 +442,6 @@ typedef struct _SERIALCONFIG {
   WCHAR  ProviderData[1];
 } SERIALCONFIG,*PSERIALCONFIG;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 6875cd190cc4f808136839f8be53079859bed078..232834aab09efdbe0639c8ae1c8b032a23d11f1f 100644 (file)
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define IOCTL_STORAGE_BASE                FILE_DEVICE_MASS_STORAGE
 
 #define IOCTL_STORAGE_CHECK_VERIFY \
@@ -329,8 +326,6 @@ typedef struct _STORAGE_PROPERTY_QUERY {
   UCHAR  AdditionalParameters[1];
 } STORAGE_PROPERTY_QUERY, *PSTORAGE_PROPERTY_QUERY;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 4cc88691f6a521675b4b8a8aa24b3efe08c60f9a..1b3b049909873afa2258b96201235d9af2a087c3 100644 (file)
 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"
 
@@ -75,8 +72,6 @@ typedef enum _TAPE_DRIVE_PROBLEM_TYPE {
   TapeDriveSnappedTape
 } TAPE_DRIVE_PROBLEM_TYPE;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 5ff5ad0643ff078c69681be8433743808986cbea..e907670060d7d6bda84c5e5b36e82242a28fad38 100644 (file)
 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"
 
@@ -57,8 +54,6 @@ extern "C" {
 #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
 }
 #endif
index e8afdbc2c7ebb6bdfa23defb1a489035ae7911c6..2027de0b076aa5b05fb53d7e444e7783cf4d529b 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 
@@ -435,8 +433,6 @@ typedef struct _VIDEO_HARDWARE_STATE {
 #define VIDEO_DUALVIEW_PRIMARY            0x80000000
 #define VIDEO_DUALVIEW_SECONDARY          0x40000000
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index a5d9064be4af82f771098a377656e3c7bd85f4c5..bc0932a98e3911bbff031e3ad2296ddf90b61e35 100644 (file)
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define IOCTL_VOLUME_BASE                 ((ULONG) 'V')
 
 #define IOCTL_VOLUME_LOGICAL_TO_PHYSICAL \
@@ -137,8 +134,6 @@ typedef struct _VOLUME_FAILOVER_SET {
        ULONG  DiskNumbers[1];
 } VOLUME_FAILOVER_SET, *PVOLUME_FAILOVER_SET;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index d33de714037f95d93faf0b80f41b72a73183faac..9c854bf237ae5a1e1999cfea28fcdbc8d6538fdb 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "batclass.h"
 
@@ -224,9 +222,6 @@ typedef struct _PROCESSOR_POWER_INFORMATION {
   ULONG  CurrentIdleState;
 } PROCESSOR_POWER_INFORMATION, *PPROCESSOR_POWER_INFORMATION;
 
-
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 1c7d72f10845f75cabdea87f87c416f46d1e2a5b..d6a2429aff3de866acef5c45dc4a9872998138bf 100644 (file)
 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"
 
@@ -273,8 +270,6 @@ typedef struct _PARCLASS_INFORMATION {
   PPARALLEL_DESELECT_DEVICE  ParallelDeSelect;
 } PARCLASS_INFORMATION, *PPARCLASS_INFORMATION;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 571b63ef66b2f54d2ba2fe37e0f53107c9cae884..57e3973bb2827e1a9f299a4ebca364dcfb1825eb 100644 (file)
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define DD_IPFLTRDRVR_DEVICE_NAME         L"\\Device\\IPFILTERDRIVER"
 
 #define INVALID_PF_IF_INDEX               0xffffffff
@@ -72,8 +69,6 @@ typedef struct _PF_SET_EXTENSION_HOOK_INFO {
 #define IOCTL_PF_SET_EXTENSION_POINTER \
   _IPFLTRDRVR_CTL_CODE(22, METHOD_BUFFERED, FILE_WRITE_ACCESS)
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 8de537884e71717a1205280f93972abdc1b3cea5..2a45ad22e3f904998dbb1ba25c0ce3b62c49cd4a 100644 (file)
 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);
 
@@ -114,8 +111,6 @@ typedef struct _PROCESSOR_OBJECT_INFO {
        UCHAR  PBlkLength;
 } PROCESSOR_OBJECT_INFO, *PPROCESSOR_OBJECT_INFO;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 2042eb1ad677a95af40360607466c4f41021eb7d..65adcdd3a9066deffe513d775fb04c09f0ac53ca 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 typedef union _CDB {
@@ -1689,8 +1687,6 @@ typedef union _TWO_BYTE {
   (Bit) = _val; \
 }
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 8d32ad34209a9f929e6cb283cb09812a5214c1e5..546832883787ca669d9ec45741e9a718da561a5a 100644 (file)
 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)
 
@@ -126,8 +123,6 @@ typedef struct _SCSISCAN_INFO {
   ULONG  Reserved;
 } SCSISCAN_INFO, *PSCSISCAN_INFO;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 5444d374d664b97c5710824c942bc75862cf5196..6531c15dc4a711ee7f55ccbf2d5ce381b3a86927 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #if !defined(SMBCLASS)
   #define SMBCLASSAPI DECLSPEC_IMPORT
 #else
@@ -185,8 +183,6 @@ DDKAPI
 SmbClassUnlockDevice(
   IN PSMB_CLASS  SmbClass);
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 43648df15bbc7adae2885dc617a460d7e44ca47c..052d1682bad2697d77c93eebfd6e6afcdc7b9f64 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 #if defined(_SCSIPORT_)
@@ -748,8 +746,6 @@ ScsiDebugPrint(
   IN PCCHAR DebugMessage,
   IN ...);
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index a97fc7a4e1ea76a479bf6f9a84050253df1a3077..f4f9d3cccc445bb79a4488e05c75d4f707f267f0 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "srb.h"
 
@@ -417,8 +415,6 @@ StorPortSynchronizeAccess(
 #define DebugPrint(x)
 #endif
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index a6248c880a71186077d8cd61e3303c238071d312..ba7e1e787e153ca2b2d9fc3d0ca2330208f8507f 100644 (file)
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 typedef struct TDIEntityID {
   ULONG  tei_entity;
   ULONG  tei_instance;
@@ -106,8 +103,6 @@ typedef struct _TCP_REQUEST_SET_INFORMATION_EX {
   UCHAR  Buffer[1];
 } TCP_REQUEST_SET_INFORMATION_EX, *PTCP_REQUEST_SET_INFORMATION_EX;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 7e684702afc20ace1e05c1f7550730c9bdb961e3..a019e7d23b363a37cfe95395086f2efc2304da31 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "tdi.h"
 
@@ -1157,8 +1155,6 @@ DDKAPI
 TdiUnmapBuffer(
   IN PMDL  MdlChain);
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 740022a27bfdc87b2732eeb3417cc5b096718382..0310ae46386c33a64856e236c194717b6dcc795f 100644 (file)
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 /* VIDEOPARAMETERS.dwCommand constants */
 #define VP_COMMAND_GET                    0x00000001
 #define VP_COMMAND_SET                    0x00000002
@@ -112,8 +109,6 @@ typedef struct _VIDEOPARAMETERS {
   BYTE  bOEMCopyProtection[256];
 } VIDEOPARAMETERS, *PVIDEOPARAMETERS, FAR *LPVIDEOPARAMETERS;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 4e6f62e2d738c30ccf604f8c01f1146e208907e9..404c25a38c2fcebaa876d928ee324f0651eae181 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
 #if defined(_APCUPS_)
@@ -89,8 +87,6 @@ UPSWaitForStateChange(
   IN DWORD  aCurrentState,
   IN DWORD  anInterval);
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index f3439352b9f3491868da5599a929b30aa51f9812..18dac4c8ffd5f4186a7fc34b19aa041804263007 100644 (file)
@@ -35,8 +35,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "usb100.h"
 
@@ -464,8 +462,6 @@ typedef struct _OS_STRING {
        UCHAR  bPad;
 } OS_STRING, *POS_STRING;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index df28f1712edf372a28f1bbee83bdafc5cbdca39f..53b774ba296aed5ff489adfb3a7679812b2b5fd3 100644 (file)
 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 @@ typedef struct _USB_COMMON_DESCRIPTOR {
 #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 @@ typedef struct _USB_DEVICE_DESCRIPTOR {
 #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 @@ typedef struct _USB_ENDPOINT_DESCRIPTOR {
   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 @@ typedef struct _USB_STRING_DESCRIPTOR {
   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 @@ typedef struct _USB_HUB_DESCRIPTOR {
        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 @@ typedef struct _USB_CONFIGURATION_POWER_DESCRIPTOR {
 #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 @@ typedef struct _USB_INTERFACE_POWER_DESCRIPTOR {
        USHORT  TransitionTimeFromD2;
        USHORT  TransitionTimeFromD3;
 } USB_INTERFACE_POWER_DESCRIPTOR, *PUSB_INTERFACE_POWER_DESCRIPTOR;
-
-#pragma pack(pop)
+#include <poppack.h>
 
 #ifdef __cplusplus
 }
index 7caca07a7654cd6b3510f7cf521ecf6adf9b7fb3..99d24754146278dcc4aa4fc5f49630ace037b2b8 100644 (file)
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "usbioctl.h"
 
-
 #define USBDI_VERSION                     0x300
 
 #define USB_DEFAULT_DEVICE_ADDRESS        0
@@ -401,8 +398,6 @@ typedef struct _URB {
        };
 } URB, *PURB;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index f0ab90aa0e2fd19c2cc2b25895e896be60d76f12..abd30b6ada8c3aed2689db5470233eb7730972e7 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "usb100.h"
 #include "usbiodef.h"
@@ -151,6 +149,8 @@ typedef enum _USB_CONNECTION_STATUS {
        DeviceInLegacyHub
 } USB_CONNECTION_STATUS, *PUSB_CONNECTION_STATUS;
 
+#include <pshpack1.h>
+
 typedef struct _USB_DESCRIPTOR_REQUEST {
        ULONG  ConnectionIndex;
        struct {
@@ -344,7 +344,7 @@ typedef struct _USB_ROOT_HUB_NAME {
        WCHAR  RootHubName[1];
 } USB_ROOT_HUB_NAME, *PUSB_ROOT_HUB_NAME;
 
-#pragma pack(pop)
+#include <poppack.h>
 
 #ifdef __cplusplus
 }
index 4a801e393817727b16b7721731f84012f1cb595a..5faa3443154f117f9bc8ea27a35452cb2f950c8a 100644 (file)
 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);
 
@@ -102,8 +99,6 @@ DEFINE_GUID(GUID_USB_WMI_STD_NOTIFICATION,
                                     METHOD_NEITHER, \
                                     FILE_ANY_ACCESS)
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 938c7066a5d4cc51312c9c1c84f5f73aca623dcd..d9a0b8ab16fd144387751dcb22856dd25685320b 100644 (file)
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 
-
 #define FILE_DEVICE_USB_SCAN              0x8000
 #define IOCTL_INDEX                       0x0800
 
@@ -154,8 +151,6 @@ typedef enum _PIPE_TYPE {
        ALL_PIPE
 } PIPE_TYPE;
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index feacddac379232250b4acbefec3a45fde548935d..4c4b9e9a80df3fd6c7817015a004a5c1e920918c 100644 (file)
 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 @@ typedef struct _USBUSER_GET_USB2HW_VERSION {
        USB_USB2HW_VERSION_PARAMETERS  Parameters;
 } USBUSER_GET_USB2HW_VERSION, *PUSBUSER_GET_USB2HW_VERSION;
 
-#pragma pack(pop)
+#include <poppack.h>
 
 #ifdef __cplusplus
 }
index 89886f809da48c4988c4f1fd3d69e71bf0259e76..60f48baa81f3507ea3cd98af0249c4a8c10ba149 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include "ntddk.h"
 #include "video.h"
 
@@ -124,8 +122,6 @@ VideoPortGetAgpServices(
        IN  PVOID  HwDeviceExtension,
        IN  PVIDEO_PORT_AGP_SERVICES  AgpServices);
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index c658f4910ae4d14813d7740fb453c360e4eba754..3aa8f346d71fa60aa3792f7ce20d0c7c4328b53c 100644 (file)
@@ -828,7 +828,7 @@ typedef struct _GDIINFO {
 typedef struct _PATHDATA {
   FLONG  flags;
   ULONG  count;
-  POINTFIX  pptfx;
+  POINTFIX  *glypptfx;
 } PATHDATA, *PPATHDATA;
 
 /* PATHOBJ.fl constants */
@@ -856,7 +856,7 @@ typedef union _GLYPHDEF {
 typedef struct _GLYPHPOS {
   HGLYPH  hg;
   GLYPHDEF  *pgdf;
-  POINTL  *ptl;
+  POINTL  ptl;
 } GLYPHPOS, *PGLYPHPOS;
 
 typedef struct _GLYPHDATA {
@@ -4147,8 +4147,6 @@ DrvGetDirectDrawInfo(
   OUT DWORD  *pdwNumFourCCCodes,
   OUT DWORD  *pdwFourCC);
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 985303378d3d26bb06aca5afa51039b880e11474..3af7b61ca3c8a57d39b5f460a2241464333f2924 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 /*
 ** Definitions specific to this Device Driver Kit
 */
@@ -428,100 +426,100 @@ typedef enum _IO_ALLOCATION_ACTION {
   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 @@ typedef struct _EISA_MEMORY_TYPE {
   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 @@ typedef struct _EISA_MEMORY_CONFIGURATION {
   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 @@ typedef struct _EISA_DMA_CONFIGURATION {
   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 @@ typedef struct _EISA_PORT_CONFIGURATION {
   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 @@ typedef struct _PNP_BUS_INFORMATION {
   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 @@ typedef struct _CM_INT13_DRIVE_PARAMETER {
   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 @@ typedef struct _FILE_NAME_INFORMATION {
   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 @@ typedef struct _FAST_IO_DISPATCH {
   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 @@ typedef struct _DRIVER_OBJECT {
   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 @@ typedef struct _SECURITY_SUBJECT_CONTEXT {
   PVOID  ProcessAuditId;
 } SECURITY_SUBJECT_CONTEXT, *PSECURITY_SUBJECT_CONTEXT;
 
+#include <pshpack4.h>
 typedef struct _ACCESS_STATE {
   LUID  OperationID;
   BOOLEAN  SecurityEvaluated;
@@ -2465,6 +2469,7 @@ typedef struct _ACCESS_STATE {
   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 @@ typedef struct _IO_CSQ {
   PVOID  ReservePointer;
 } IO_CSQ, *PIO_CSQ;
 
+#include <pshpack4.h>
 typedef struct _IO_STACK_LOCATION {
   UCHAR  MajorFunction;
   UCHAR  MinorFunction;
@@ -2663,6 +2669,7 @@ typedef struct _IO_STACK_LOCATION {
   PIO_COMPLETION_ROUTINE  CompletionRoutine;
   PVOID  Context;
 } IO_STACK_LOCATION, *PIO_STACK_LOCATION;
+#include <poppack.h>
 
 /* IO_STACK_LOCATION.Control */
 
@@ -3703,6 +3710,7 @@ typedef ULONG PFN_NUMBER, *PPFN_NUMBER;
 #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 @@ typedef struct _KPCR_TIB {
     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 @@ RemoveTailList(
   return Entry;
 }
 
+#if !defined(_WINBASE_H) || _WIN32_WINNT < 0x0501
+
 NTOSAPI
 PSLIST_ENTRY
 DDKFASTAPI
@@ -4155,6 +4165,8 @@ InterlockedPushEntrySList(
   IN PSLIST_HEADER  ListHead,
   IN PSLIST_ENTRY  ListEntry);
 
+#endif
+
 /*
  * USHORT
  * QueryDepthSList(
@@ -4398,12 +4410,12 @@ RtlDeleteRegistryValue(
 /*
  * 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 @@ WRITE_REGISTER_USHORT(
   IN PUSHORT  Register,
   IN USHORT  Value);
 
-
-
 /** I/O manager routines **/
 
 NTOSAPI
@@ -7116,14 +7126,11 @@ KeAcquireSpinLock(
   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;
@@ -7317,12 +7324,6 @@ DDKAPI
 KeLeaveCriticalRegion(
   VOID);
 
-NTOSAPI
-VOID
-DDKAPI
-KeLowerIrql(
-  IN KIRQL  NewIrql);
-
 NTOSAPI
 NTSTATUS
 DDKAPI
@@ -7367,19 +7368,6 @@ DDKAPI
 KeQueryTimeIncrement(
   VOID);
 
-NTOSAPI
-VOID
-DDKAPI
-KeRaiseIrql(
-  IN KIRQL  NewIrql,
-  OUT PKIRQL  OldIrql);
-
-NTOSAPI
-KIRQL
-DDKAPI
-KeRaiseIrqlToDpcLevel(
-  VOID);
-
 NTOSAPI
 LONG
 DDKAPI
@@ -7606,7 +7594,44 @@ KeWaitForSingleObject(
   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 **/
 
@@ -9092,8 +9117,6 @@ extern NTOSAPI PBOOLEAN KdDebuggerEnabled;
 #define KD_DEBUGGER_ENABLED     *KdDebuggerEnabled
 #define KD_DEBUGGER_NOT_PRESENT *KdDebuggerNotPresent
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 0c73231cb32b2655d34a8f8451d7878faefe6937..3f8424381375ee9216c2a67ada26b9a2ed574de3 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 typedef struct _ZONE_SEGMENT_HEADER {
   SINGLE_LIST_ENTRY  SegmentList;
   PVOID  Reserved;
@@ -599,8 +597,6 @@ Exfi386InterlockedExchangeUlong(
 
 #endif /* _X86_ */
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
index 29a21181d8d84b055bfc53d6cce490f3a232b1d1..de392c0fa42ad0dfee4cdcf87323eed98ceec9d4 100644 (file)
@@ -31,8 +31,6 @@
 extern "C" {
 #endif
 
-#pragma pack(push,4)
-
 #include <winsock2.h>
 #include "ntddk.h"
 
@@ -243,8 +241,6 @@ typedef int WSPAPI
   IN OUT LPDWORD  lpdwDescriptorLength,
   OUT LPINT  lpErrno);
 
-#pragma pack(pop)
-
 #ifdef __cplusplus
 }
 #endif
This page took 0.127609 seconds and 5 git commands to generate.