bas7advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
IOCTL$ Function Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
IOCTL$ returns current status information from a device driver.
 
IOCTL$([#]filenumber%)
 
Usage Notes
    ■ The IOCTL$ function is most frequently used to test whether an IOCTL
      statement succeeded or failed, or to obtain current status information.
    ■ You can use IOCTL$ to ask a communications device to return the
      current baud rate, information on the last error, logical line
      width, and so on. The exact information returned depends on
      the specific device driver. See the device driver documentation to
      find out what status information the device driver can send.
 
Important
    ■ The IOCTL statement is not available in OS/2 protected mode.
      However, you can achieve the same effect by directly invoking
      the DosDevIOCtl OS/2 function.
    ■ BASIC devices ( LPTn, COMn, SCRN, CONS, PIPE) and DOS block
      devices (A through Z) do not support IOCTL.
    ■ The IOCTL$ function works only if all of the following conditions
      are met:
 
      1. The device driver is installed.
      2. The device driver states that it processes IOCTL strings.
         See the documentation for the driver.
      3. BASIC performs an OPEN operation on a file on that device, and
         the file is still open.
 
      Most standard DOS device drivers do not process IOCTL strings,
      and you must determine if the specific driver accepts the command.
      If the driver does not process IOCTL strings, BASIC generates the
      error message, "Illegal Function Call."