[PSDK/DDK]: Last couple of fixes to headers. Classpnp can compile (and link) now.
[reactos.git] / reactos / include / psdk / ntddstor.h
index d73ba47..3d5081e 100644 (file)
@@ -80,6 +80,8 @@ DEFINE_GUID(GUID_DEVINTERFACE_HIDDEN_VOLUME,
 
 #endif /* defined(DEFINE_GUID) */
 
+#ifndef _WINIOCTL_
+
 #define IOCTL_STORAGE_BASE                FILE_DEVICE_MASS_STORAGE
 
 #define IOCTL_STORAGE_CHECK_VERIFY \
@@ -88,20 +90,32 @@ DEFINE_GUID(GUID_DEVINTERFACE_HIDDEN_VOLUME,
 #define IOCTL_STORAGE_CHECK_VERIFY2 \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0200, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
+#define IOCTL_STORAGE_MEDIA_REMOVAL \
+  CTL_CODE(IOCTL_STORAGE_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
+
 #define IOCTL_STORAGE_EJECT_MEDIA \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS)
 
-#define IOCTL_STORAGE_EJECTION_CONTROL \
-  CTL_CODE(IOCTL_STORAGE_BASE, 0x0250, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_STORAGE_LOAD_MEDIA \
+  CTL_CODE(IOCTL_STORAGE_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
+
+#define IOCTL_STORAGE_LOAD_MEDIA2 \
+  CTL_CODE(IOCTL_STORAGE_BASE, 0x0203, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
+#define IOCTL_STORAGE_RESERVE \
+  CTL_CODE(IOCTL_STORAGE_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
+
+#define IOCTL_STORAGE_RELEASE \
+  CTL_CODE(IOCTL_STORAGE_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
 
 #define IOCTL_STORAGE_FIND_NEW_DEVICES \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
 
-#define IOCTL_STORAGE_GET_DEVICE_NUMBER \
-  CTL_CODE(IOCTL_STORAGE_BASE, 0x0420, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_STORAGE_EJECTION_CONTROL \
+  CTL_CODE(IOCTL_STORAGE_BASE, 0x0250, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
-#define IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER \
-  CTL_CODE(IOCTL_STORAGE_BASE, 0x0304, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_STORAGE_MCN_CONTROL \
+  CTL_CODE(IOCTL_STORAGE_BASE, 0x0251, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
 #define IOCTL_STORAGE_GET_MEDIA_TYPES \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0300, METHOD_BUFFERED, FILE_ANY_ACCESS)
@@ -109,29 +123,22 @@ DEFINE_GUID(GUID_DEVINTERFACE_HIDDEN_VOLUME,
 #define IOCTL_STORAGE_GET_MEDIA_TYPES_EX \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0301, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
-#define IOCTL_STORAGE_LOAD_MEDIA \
-  CTL_CODE(IOCTL_STORAGE_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_STORAGE_LOAD_MEDIA2 \
-  CTL_CODE(IOCTL_STORAGE_BASE, 0x0203, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_STORAGE_RESET_BUS \
+  CTL_CODE(IOCTL_STORAGE_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS)
 
-#define IOCTL_STORAGE_MCN_CONTROL \
-  CTL_CODE(IOCTL_STORAGE_BASE, 0x0251, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#define IOCTL_STORAGE_RESET_DEVICE \
+  CTL_CODE(IOCTL_STORAGE_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS)
 
-#define IOCTL_STORAGE_MEDIA_REMOVAL \
-  CTL_CODE(IOCTL_STORAGE_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
+#define IOCTL_STORAGE_GET_DEVICE_NUMBER \
+  CTL_CODE(IOCTL_STORAGE_BASE, 0x0420, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
 #define IOCTL_STORAGE_PREDICT_FAILURE \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0440, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
-#define IOCTL_STORAGE_QUERY_PROPERTY \
-  CTL_CODE(IOCTL_STORAGE_BASE, 0x0500, METHOD_BUFFERED, FILE_ANY_ACCESS)
+#endif /* _WINIOCTL_ */
 
-#define IOCTL_STORAGE_RELEASE \
-  CTL_CODE(IOCTL_STORAGE_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
-
-#define IOCTL_STORAGE_RESERVE \
-  CTL_CODE(IOCTL_STORAGE_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
+#define IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER \
+  CTL_CODE(IOCTL_STORAGE_BASE, 0x0304, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
 #define IOCTL_STORAGE_GET_HOTPLUG_INFO \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0305, METHOD_BUFFERED, FILE_ANY_ACCESS)
@@ -139,10 +146,10 @@ DEFINE_GUID(GUID_DEVINTERFACE_HIDDEN_VOLUME,
 #define IOCTL_STORAGE_SET_HOTPLUG_INFO \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0306, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
 
-#define IOCTL_STORAGE_RESET_BUS \
+#define OBSOLETE_IOCTL_STORAGE_RESET_BUS \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
 
-#define IOCTL_STORAGE_RESET_DEVICE \
+#define OBSOLETE_IOCTL_STORAGE_RESET_DEVICE \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
 
 #define IOCTL_STORAGE_BREAK_RESERVATION \
@@ -157,6 +164,9 @@ DEFINE_GUID(GUID_DEVINTERFACE_HIDDEN_VOLUME,
 #define IOCTL_STORAGE_READ_CAPACITY \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0450, METHOD_BUFFERED, FILE_READ_ACCESS)
 
+#define IOCTL_STORAGE_QUERY_PROPERTY \
+  CTL_CODE(IOCTL_STORAGE_BASE, 0x0500, METHOD_BUFFERED, FILE_ANY_ACCESS)
+
 #define IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0501, METHOD_BUFFERED, FILE_WRITE_ACCESS)
 
@@ -172,12 +182,6 @@ DEFINE_GUID(GUID_DEVINTERFACE_HIDDEN_VOLUME,
 #define IOCTL_STORAGE_CHECK_PRIORITY_HINT_SUPPORT \
   CTL_CODE(IOCTL_STORAGE_BASE, 0x0620, METHOD_BUFFERED, FILE_ANY_ACCESS)
 
-#define OBSOLETE_IOCTL_STORAGE_RESET_BUS \
-  CTL_CODE(IOCTL_STORAGE_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
-#define OBSOLETE_IOCTL_STORAGE_RESET_DEVICE \
-  CTL_CODE(IOCTL_STORAGE_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
-
 #define RECOVERED_WRITES_VALID         0x00000001
 #define UNRECOVERED_WRITES_VALID       0x00000002
 #define RECOVERED_READS_VALID          0x00000004
@@ -242,7 +246,7 @@ typedef struct _STORAGE_BREAK_RESERVATION_REQUEST {
   UCHAR Lun;
 } STORAGE_BREAK_RESERVATION_REQUEST, *PSTORAGE_BREAK_RESERVATION_REQUEST;
 
-#ifndef _WINIOCTL_H
+#ifndef _WINIOCTL_
 typedef struct _PREVENT_MEDIA_REMOVAL {
   BOOLEAN PreventMediaRemoval;
 } PREVENT_MEDIA_REMOVAL, *PPREVENT_MEDIA_REMOVAL;
@@ -624,7 +628,7 @@ typedef struct _STORAGE_MEDIA_SERIAL_NUMBER_DATA {
 typedef struct _PERSISTENT_RESERVE_COMMAND {
   ULONG Version;
   ULONG Size;
-  _ANONYMOUS_UNION union {
+  __MINGW_EXTENSION union {
     struct {
       UCHAR ServiceAction:5;
       UCHAR Reserved1:3;