Changeset 8969 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- May 20, 2008 6:07:25 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk
r8760 r8969 32 32 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000,) \ 33 33 $(if $(VBOX_WITH_AHCI),VBOX_WITH_AHCI,) 34 VBoxManage_DEFS.win.x86 = _WIN32_WINNT=0x0500 34 35 VBoxManage_SOURCES = \ 35 36 VBoxManage.cpp \ -
trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
r8835 r8969 788 788 uint64_t cbSize = 0; 789 789 #ifdef RT_OS_WINDOWS 790 /* Windows NT has no IOCTL_DISK_GET_LENGTH_INFORMATION ioctl. This was 791 * added to Windows XP, so we have to use the available info from DriveGeo. 792 * Note that we cannot simply use IOCTL_DISK_GET_DRIVE_GEOMETRY as it 793 * yields a slightly different result than IOCTL_DISK_GET_LENGTH_INFO. 794 * We call IOCTL_DISK_GET_DRIVE_GEOMETRY first as we need to check the media 795 * type anyway, and if IOCTL_DISK_GET_LENGTH_INFORMATION is supported 796 * we will later override cbSize. 797 */ 790 798 DISK_GEOMETRY DriveGeo; 791 799 DWORD cbDriveGeo; 792 /* Windows NT has no IOCTL_DISK_GET_LENGTH_INFORMATION ioctl. This was793 * added to Windows XP, so use the available info from DriveGeo. */794 800 if (DeviceIoControl((HANDLE)RawFile, 795 801 IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0, … … 805 811 else 806 812 return VERR_MEDIA_NOT_RECOGNIZED; 813 814 GET_LENGTH_INFORMATION DiskLenInfo; 815 DWORD junk; 816 if (DeviceIoControl((HANDLE)RawFile, 817 IOCTL_DISK_GET_LENGTH_INFO, NULL, 0, 818 &DiskLenInfo, sizeof(DiskLenInfo), &junk, (LPOVERLAPPED)NULL)) 819 { 820 /* IOCTL_DISK_GET_LENGTH_INFO is supported -- override cbSize. */ 821 cbSize = DiskLenInfo.Length.QuadPart; 822 } 807 823 } 808 824 else
Note:
See TracChangeset
for help on using the changeset viewer.