[Windows 95 only.]
Returns the volume label, serial number and file system for the specified drive.
mov bx, Drive ;See below
mov ch, DeviceCat ;See below
mov cl, 66h ;Get Media ID
mov dx, seg MediaID ;See below
mov ds, dx
mov dx, offset MediaID ;ds:dx points to MID structure
mov ax, 440Dh ;IOCTL for block device
int 21h
jc error_handler ;carry set means error
Value | Description |
---|---|
08h | FAT32, FAT16, or FAT12 drive. |
48h | FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later. |
Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.
MID STRUC
midInfoLevel dw 0 ;information level
midSerialNum dd ? ;serial number
midVolLabel db 11 dup (?) ;ASCII volume label
midFileSysType db 8 dup (?) ;file system type
MID ENDS
If the function is successful, clears the carry flag, and fills in the parameter block (an MID structure) with information about the disk. Otherwise, sets the carry flag and sets the AX register to one of the following error values.
Value | Name |
---|---|
0001h | ERROR_INVALID_FUNCTION |
0002h | ERROR_FILE_NOT_FOUND |
0005h | ERROR_ACCESS_DENIED |
Get Media ID returns 0002h (ERROR_FILE_NOT_FOUND) if the specified drive number is invalid.