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 Statement Details
◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
IOCTL transmits a control data string to a device driver.
IOCTL [#]filenumber%, string$
Usage Notes
■ An IOCTL control data string can be up to 32,767 bytes long.
Important
■ The IOCTL statement 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."
■ BASIC devices ( LPTn, COMn, SCRN, CONS, PIPE) and DOS block
devices (A through Z) do not support IOCTL.
■ 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.