advr.hlp (Topic list)
IOCTL$ Function, IOCTL Statement Details
  Summary  Details  Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 IOCTL$([#]filenumber%)
 IOCTL [#]filenumber%, string$
 
 Usage Notes
   ■ The IOCTL$ function is most frequently used to:
     • Test whether an IOCTL statement succeeded or failed
     • Obtain current status information
 
   ■ The IOCTL statement works only if all of the following conditions are
     met:
     • The device driver is installed
     • The device driver states that it processes IOCTL strings
     • Visual Basic performs an OPEN operation on a file on that device and
       the file is still open
 
   ■ An IOCTL control data string can be up to 32,767 bytes long.
 
   ■ ICOTL control strings and the information returned by IOCTL$ depend
     on the device driver. See your device-driver documentation for more
     information about IOCTL control strings and what is returned by
     IOCTL$.
 
   ■ Since most standard MS-DOS device drivers do not process IOCTL strings,
     you must determine if the specific driver accepts the command. If the
     driver does not process IOCTL strings, Visual Basic generates the error
     message, "Illegal Function Call."
 
   ■ Visual Basic devices (LPTn, COMn, SCRN, CONS, PIPE) and MS-DOS block
     devices (A - Z) do not support IOCTL.
 
   ■ 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.