Manually applying Gunnars patch became it's easier this way - and a good chance to...
[reactos.git] / reactos / include / ddk / iotypes.h
index 1a78f8e..1426a4e 100644 (file)
@@ -1,5 +1,5 @@
-/* $Id: iotypes.h,v 1.33 2002/01/26 17:59:25 ekohl Exp $
- * 
+/* $Id: iotypes.h,v 1.44 2002/11/07 02:44:49 robd Exp $
+ *
  */
 
 #ifndef __INCLUDE_DDK_IOTYPES_H
@@ -205,32 +205,32 @@ typedef struct
          {
             PHYSICAL_ADDRESS Start;
             ULONG Length;
-         } Port;
+         } __attribute__((packed)) Port;
        struct
          {
             ULONG Level;
             ULONG Vector;
             ULONG Affinity;
-         } Interrupt;
+         } __attribute__((packed))Interrupt;
        struct
          {
             PHYSICAL_ADDRESS Start;
             ULONG Length;
-         } Memory;
+         } __attribute__((packed))Memory;
        struct
          {
             ULONG Channel;
             ULONG Port;
             ULONG Reserved1;
-         } Dma;
+         } __attribute__((packed))Dma;
        struct
          {
             ULONG DataSize;
             ULONG Reserved1;
             ULONG Reserved2;
-         } DeviceSpecificData;
-     } u;
-} CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
+         } __attribute__((packed))DeviceSpecificData;
+     } __attribute__((packed)) u;
+} __attribute__((packed)) CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
 
 typedef struct
 {
@@ -238,14 +238,14 @@ typedef struct
    USHORT Revision;
    ULONG Count;
    CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1];
-} CM_PARTIAL_RESOURCE_LIST;
+} __attribute__((packed))CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST;
 
 typedef struct
 {
    INTERFACE_TYPE InterfaceType;
    ULONG BusNumber;
    CM_PARTIAL_RESOURCE_LIST PartialResourceList;
-} CM_FULL_RESOURCE_DESCRIPTOR;
+} __attribute__((packed)) CM_FULL_RESOURCE_DESCRIPTOR;
 
 typedef struct
 {
@@ -304,7 +304,12 @@ typedef struct __attribute__((packed)) _IO_STACK_LOCATION
        {
          struct _VPB* Vpb;
          struct _DEVICE_OBJECT* DeviceObject;
-       } Mount;
+       } MountVolume;
+      struct
+       {
+         struct _VPB* Vpb;
+         struct _DEVICE_OBJECT* DeviceObject;
+       } VerifyVolume;
       struct
        {
          ULONG Length;
@@ -366,6 +371,12 @@ typedef struct __attribute__((packed)) _IO_STACK_LOCATION
          PDEVICE_CAPABILITIES Capabilities;
        } DeviceCapabilities;
 
+      // Parameters for IRP_MN_FILTER_RESOURCE_REQUIREMENTS
+      struct
+       {
+      PIO_RESOURCE_REQUIREMENTS_LIST IoResourceRequirementList;
+    } FilterResourceRequirements;
+
       // Parameters for IRP_MN_QUERY_ID
       struct
        {
@@ -415,20 +426,36 @@ typedef struct __attribute__((packed)) _IO_STACK_LOCATION
          PCM_RESOURCE_LIST AllocatedResourcesTranslated;
        } StartDevice;
 
-      // Parameters for IRP_MN_SCSI_CLASS
+      /* Parameters for IRP_MN_SCSI_CLASS */
       struct
        {
          struct _SCSI_REQUEST_BLOCK *Srb;
        } Scsi;
 
+         //byte range file locking
+         struct 
+       {
+      PLARGE_INTEGER Length;
+      ULONG Key;
+      LARGE_INTEGER ByteOffset;
+    } LockControl;
+
+      /* Paramters for other calls */
+      struct
+       {
+         PVOID Argument1;
+         PVOID Argument2;
+         PVOID Argument3;
+         PVOID Argument4;
+       } Others;
     } Parameters;
   
   struct _DEVICE_OBJECT* DeviceObject;
   struct _FILE_OBJECT* FileObject;
-  
+
   PIO_COMPLETION_ROUTINE CompletionRoutine;
   PVOID CompletionContext;
-  
+
 } __attribute__((packed)) IO_STACK_LOCATION, *PIO_STACK_LOCATION;
 
 
@@ -656,13 +683,6 @@ typedef struct _DEVICE_OBJECT
    PVOID Reserved;
 } DEVICE_OBJECT, *PDEVICE_OBJECT;
 
-/*
- * Dispatch routine type declaration
- */
-typedef NTSTATUS STDCALL
-(*PDRIVER_DISPATCH)(struct _DEVICE_OBJECT*,
-                   IRP*);
-
 
 /*
  * Fast i/o routine type declaration
@@ -713,16 +733,26 @@ typedef struct _FAST_IO_DISPATCH {
 /*
  * Dispatch routine type declaration
  */
+typedef NTSTATUS STDCALL
+(*PDRIVER_DISPATCH)(IN struct _DEVICE_OBJECT *DeviceObject,
+                  IN struct _IRP *Irp);
+
+/*
+ * StartIo routine type declaration
+ */
 typedef VOID STDCALL
 (*PDRIVER_STARTIO)(IN PDEVICE_OBJECT DeviceObject,
                   IN PIRP Irp);
 
 /*
- * Dispatch routine type declaration
+ * Unload routine type declaration
  */
-typedef NTSTATUS STDCALL
-(*PDRIVER_UNLOAD)(struct _DRIVER_OBJECT*);
+typedef VOID STDCALL
+(*PDRIVER_UNLOAD)(IN struct _DRIVER_OBJECT *DriverObject);
 
+/*
+ * AddDevice routine type declaration
+ */
 typedef NTSTATUS STDCALL
 (*PDRIVER_ADD_DEVICE)(IN struct _DRIVER_OBJECT *DriverObject,
                      IN struct _DEVICE_OBJECT *PhysicalDeviceObject);
@@ -742,7 +772,7 @@ struct _FAST_IO_DISPATCH_TABLE
 {
        ULONG                   Count;
        PFAST_IO_DISPATCH       Dispatch;
-       
+
 } FAST_IO_DISPATCH_TABLE, * PFAST_IO_DISPATCH_TABLE;
 #endif
 
@@ -793,6 +823,9 @@ typedef VOID STDCALL
 (*PIO_TIMER_ROUTINE)(PDEVICE_OBJECT DeviceObject,
                     PVOID Context);
 
+typedef struct _IO_WORKITEM *PIO_WORKITEM;
+typedef VOID (*PIO_WORKITEM_ROUTINE)(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context);
+
 #if WINDOWS_STRUCTS_DOESNT_ALREADY_DEFINE_THIS
 typedef struct _PARTITION_INFORMATION
 {