Professional Documents
Culture Documents
Ioctl1 PDF
Ioctl1 PDF
IOCTL$ Function
Purpose:
To allow GW-BASIC to read a "control data" string from an open character device driver.
Syntax:
IOCTL$([#]file number)
Comments:
file number is the file number open to the device.
The IOCTL$ function is generally used to get acknowledgement that an IOCTL statement
succeeded or failed. It is also used to get device information, such as device width after an IOCTL
statement requests it.
Examples:
10 'GW is a possible command
20 'for get device width
30 OPEN "\DEV\MYLPT" AS#1
40 IOCTYL#1, "GW"
50 'Save it in WID
60 WID=VAL(IOCTL$(#1))
file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/IOCTLS.html28/03/2004 21.29.33