I need to get a capacity of inserted DVD disk.
DeviceIoControl function call with IOCTL_DISK_GET_DRIVE_GEOMETRY_EX parameter writes 4128768 bytes as a size of DVD what, obviously, is wrong result. Code was taken from https://docs.microsoft.com/en-us/windows/win32/devio/calling-deviceiocontrol.
Another solution was to determine disk read or write speed via ckMMC lib's Device interface and return size depending on it's type. But it isn't reliable solution since speed can vary on different CD/DVD drives.
Maybe, I'm missing something with DeviceIoControl usage and it can return me correct result or there exists better approach to calculate DVD disk's capacity.