此IOCTL 使用IOCTL_DISK_GET_DRIVE_GEOMETRY获取DISK_GEOMETRY结构,使用IOCTL_DISK_GET_LENGTH_INFO获取GET_LENGTH_INFORMATION结构。 这两个 IOCTL 都支持在 disk.sys 级别使用。 要求 展开表 要求值 Headerntdddisk.h (包括 Ntdddisk.h) 反馈 此页面是否有帮助?
IOCTL_DISK_GET_DRIVE_GEOMETRY已被IOCTL_DISK_GET_DRIVE_GEOMETRY_EX取代,它會擷取其他資訊。 若要執行這項作業,請使用下列參數呼叫DeviceIoControl函式。 C++ BOOLDeviceIoControl( (HANDLE) hDevice,// handle to deviceIOCTL_DISK_GET_DRIVE_GEOMETRY,// dwIoControlCodeNULL,// lpInBuffer0,// nInBufferSize...
BOOLDeviceIoControl( (HANDLE) hDevice,// handle to deviceIOCTL_DISK_GET_DRIVE_GEOMETRY_EX,// dwIoControlCodeNULL,// lpInBuffer0,// nInBufferSize(LPVOID) lpOutBuffer,// output buffer(DWORD) nOutBufferSize,// size of output buffer(LPDWORD) lpBytesReturned,// number of bytes returned(LPOVERLAPP...
IOCTL_DISK_CREATE_DISK IOCTL IOCTL_DISK_DELETE_DRIVE_LAYOUT IOCTL IOCTL_DISK_FORMAT_TRACKS IOCTL IOCTL_DISK_FORMAT_TRACKS_EX IOCTL IOCTL_DISK_GET_CACHE_INFORMATION IOCTL IOCTL_DISK_GET_DISK_ATTRIBUTES IOCTL IOCTL_DISK_GET_DRIVE_GEOMETRY IOCTL IOCTL_DISK_GET_DRIVE_GEOMETRY_EX IOCTL IOCTL_DISK_G...
estructura de GET_LENGTH_INFORMATION IOCTL_DISK_CREATE_DISK IOCTL IOCTL_DISK_DELETE_DRIVE_LAYOUT IOCTL IOCTL_DISK_FORMAT_TRACKS IOCTL IOCTL_DISK_FORMAT_TRACKS_EX IOCTL IOCTL_DISK_GET_CACHE_INFORMATION IOCTL IOCTL_DISK_GET_DISK_ATTRIBUTES IOCTL IOCTL_DISK_GET_DRIVE_GEOMETRY IOCTL IOCTL_DISK_GET_D...
你要想获取U盘的真实容量,建议你用IOCTL_DISK_GET_DRIVE_GEOMETRY_EX指令,给你个小例子。BOOL GetDriveGeometryEX(LPWSTR wszPath, DISK_GEOMETRY_EX *pdg){ HANDLE hDevice = INVALID_HANDLE_VALUE; // handle to the drive to be examined BOOL bResult = FALSE; // results flag...
GET_DISK_ATTRIBUTES 结构 GET_LENGTH_INFORMATION结构 IOCTL_DISK_CREATE_DISK IOCTL IOCTL_DISK_DELETE_DRIVE_LAYOUT IOCTL IOCTL_DISK_FORMAT_TRACKS IOCTL IOCTL_DISK_FORMAT_TRACKS_EX IOCTL IOCTL_DISK_GET_CACHE_INFORMATION IOCTL IOCTL_DISK_GET_DISK_ATTRIBUTES IOCTL IOCTL_DISK_GET_DRIVE_GEOMETRY IOCTL IOCTL...
DISK_GEOMETRY disk_geometry; DeviceIoControl(hDev, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0, &disk_geometry, sizeof(disk_geometry), NULL, NULL); printf(" 柱面数量: %d\n", disk_geometry.Cylinders); //柱面数量 printf(" 介质类型: %d\n", disk_geometry.MediaType); //介质类型 ...
DISK_GEOMETRY disk_geometry; DeviceIoControl(hDev, IOCTL_DISK_GET_DRIVE_GEOMETRY, NULL, 0, &disk_geometry, sizeof(disk_geometry), NULL, NULL); printf(" 柱面数量: %d\n", disk_geometry.Cylinders); //柱面数量 printf(" 介质类型: %d\n", disk_geometry.MediaType); //介质类型 ...
BOOLDeviceIoControl( (HANDLE) hDevice,// handle to deviceIOCTL_DISK_GET_DRIVE_GEOMETRY_EX,// dwIoControlCodeNULL,// lpInBuffer0,// nInBufferSize(LPVOID) lpOutBuffer,// output buffer(DWORD) nOutBufferSize,// size of output buffer(LPDWORD) lpBytesReturned,// number of bytes returned(...