Compatibility: 2.0+
Expects: AX    4400H
BX    file handle  (device or disk file)
                                                                  
Returns: AX    error code  if CF is set to CY
DX    IOCTL device info (if no error)
                                                                  
Info: Checks to see if a handle represents a device or a disk file and
obtains information about that device or file.

See IOCTL device info for a layout of the 16-bit return value.

If the handle is a disk file:
DX bit 7 is clear (0)
DX bit 6 is set if the file is "dirty" (has been written to)
DX bits 0-5 represent a drive number (0=A, 1=B, etc.)

If the handle is a device:
DX bit 7 is set (1)
DX bits 0-6 are device information flags
DX bits 8-15 are the same as bits 8-15 of the Device Attribute
(the rDevAttr field of the driver's DevHdrRec structure).

Notes:   This is often used to see if Standard I/O has been redirected.
For instance, if handle 01H (standard output) represents a disk
file rather than the CON device, you may wish to output
different information and perhaps send some extra messages to
handle 02H (Standard Error device).

See Also: Fn 44H (IOCTL)
Fn 4401H (Set Device/File Flags)
- -

DOS Fn 4400H: IOCTL Query Device/File Flags