Set Logical Device (Device-Driver Function 18h)

LOGDEVICEREQUEST STRUC

ldrLength db ? ;length of record, in bytes

ldrUnit db ? ;unit number

ldrFunction db 18h ;function number

ldrStatus dw ? ;status

ldrReserved db 8 dup(?) ;reserved

LOGDEVICEREQUEST ENDS

Set Logical Device (Device-Driver Function 18h) sets the active drive number to the drive specified by the ldrUnit field.

This function is used for block-device drivers only.

Fields

ldrLength

Specifies the length, in bytes, of the LOGDEVICEREQUEST structure.

ldrUnit

Specifies the device to make active. This field contains a zero-based drive number.

ldrFunction

Specifies the Set Logical Device function: 18h.

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.

Comment

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.”

See Also

Device-Driver Function 17h Get Logical Device
Interrupt 21h Function 440Fh Set Logical Drive Map