LOGDEVICEREQUEST STRUC
ldrLength db ? ;length of record, in bytes
ldrUnit db ? ;INPUT: unit number for drive to check
;OUTPUT: active drive number
ldrFunction db 17h ;function number
ldrStatus dw ? ;status
ldrReserved db 8 dup(?) ;reserved
LOGDEVICEREQUEST ENDS
Get Logical Device (Device-Driver Function 17h) returns the active drive number for the specified drive.
This function is used for block-device drivers only.
ldrLength
Specifies the length, in bytes, of the LOGDEVICEREQUEST structure.
ldrUnit
Contains the device number to check and receives the active drive number. The following table describes input and output:
Input/Output | Description |
Input | Specifies the drive number to check. The driver must determine whether the unit associated with this drive number has any other logical-drive numbers. |
Output | Specifies the active drive number (1=A, 2=B, 3=C, etc.). The driver must set this field to the drive number set by the most recent call to Set Logical Device (Device-Driver Function 18h) or to zero if the specified drive has no other logical-drive numbers. |
ldrFunction
Specifies the Get Logical Device function: 17h.
ldrStatus
Specifies the status of the completed function. If the function is successful, the driver must set the done bit (bit 8). Otherwise, the driver must set both the error and done bits (bits 15 and 8) and copy an error value to the low-order byte.
ldrReserved
Reserved. Do not use.
MS-DOS calls this function only if bit 6 is set in the dhAttributes field of the driver's DEVICEHEADER structure. For a full description of the DEVICEHEADER structure, see Section 9.9, “Structures.”
Device-Driver Function 18h Set Logical Device
Interrupt 21h Function 440Eh Get Logical Drive Map