Copy STORAGE_READ_CAPACITY struct from ntddstor.h
Peter Schorn (peterschorn) reports:
In winioctl.h the macro IOCTL_STORAGE_READ_CAPACITY is defined
but the definition of STORAGE_READ_CAPACITY is missing.
diff --git a/mingw-w64-headers/include/winioctl.h b/mingw-w64-headers/include/winioctl.h
index e93317b..8eea890 100644
--- a/mingw-w64-headers/include/winioctl.h
+++ b/mingw-w64-headers/include/winioctl.h
@@ -165,6 +165,14 @@
#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)
+typedef struct _STORAGE_READ_CAPACITY {
+ ULONG Version;
+ ULONG Size;
+ ULONG BlockLength;
+ LARGE_INTEGER NumberOfBlocks;
+ LARGE_INTEGER DiskLength;
+} STORAGE_READ_CAPACITY, *PSTORAGE_READ_CAPACITY;
+
#if (_WIN32_WINNT >= 0x0601)
#define IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES CTL_CODE(IOCTL_STORAGE_BASE, 0x0501, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define DeviceDsmActionFlag_NonDestructive 0x80000000