Device Request 17H: Get Logical Device

Blk► Gen► 
 This asks the driver to identify which logical drive ID is currently is
 use for a physical drive unit.  This is in support for DOS's "phantom
 floppy" feature.

  Offset Size Contents
  ▀▀▀▀▀▀ ▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
   +0      1  bLen         0dH (length of this request packet)
   +1      1  bUnitNo      INPUT: unit number of drive to check
                           OUTPUT: active drive number (1=A, 2=B, etc)
   +2      1  bCmd         17H (command code)
   +3      2  rStatus      OUTPUT: Device Status Word must fill before exit
   +5H     8  res          (reserved)
          13               size of this structure

     bUnitNo  On entry, this is a drive unit number (or instance, 0 is the
              first drive supported by the drive, 1 is the second, etc).

              On return, the field must contain the drive ID number (1=A,
              2=B, etc.) of the logical drive that is currently active on
              this unit.

              Use the ID passed in the most recent DvRq 18H request OR
              return 00H if you don't support logical (phantom) drives.

     rStatus  On exit, the driver must place a DevStatusWord here.  Always
              set the Done bit (bit 8).  On an error, set the Done bit and
              the Error bit (bit 15) and put a Device Error Code in the low

   Notes: ■ Only device drivers capable of handling Get/Set Logical drive
            requests need support this (see Device Attribute bit 6).

          ■ This is the device driver "catch point" for DOS fn 440eH (IOCTL
            query logical drive).

          ■ The "phantom floppy" concept lets DOS pretend (for instance)
            that a one-diskette-drive system actually has a drive A and a
            drive B.  For instance, if the user types: Dir B:, then DOS
            prompts the user to "Insert diskette for drive B:" and sends
            DvRq 18H (set logical device) to the driver.

See Also: Device Requests
          Installable Device Drivers