I was running my exe under Windows 7 and ReactOS 0.4.4 (the latter in an VirtualBox machine).
I noticed that the function DeviceIoControl(..IOCTL_DISK_GET_DRIVE_GEOMETRY_EX..) fails in ReactOS. The error message says something like "specified struture size too short".
The structure passed to this function is:
The structure is aligned on 1 byte boundary.
It has a size of 33 bytes.
The follwoing code works in Windows 7 (32 bit).
It also works when I specify sizeof(geometry_ex) -1 as parameter 6.
It fails when I specify sizeof(geometry_ex) -2 as parameter 6.
This means Windows 7 checks the specified size of the output structure and fills this structure depending on the available size.
When the size is 32 then DISK_GEOMETRY_EX.Data is probably not filled by Windows 7.
ReactOS, on the other hand, fails if the specified size is 33.
This behaviour of ReactOS is different from Windows 7.