## Physical Device Driver Reference

[prev][next][parent][TOC]

### Generic IOCtl Commands

OS/2 device drivers are used to access the I/O hardware. The IOCtl functions provide a method for an application, or subsystem, to send device -specific control commands to a physical device driver. These IOCtls are subfunctions that are issued through the DosDevIOCtl API function request. The DosDevIOCtl function request can be used only by OS/2 applications; the INT 21h IOCtl request can be used only by DOS applications.

The category and function fields are as follows. Each code is contained in a byte:

Category Code

0xxx xxxx OS/2-defined

1xxx xxxx User-defined

_xxx xxxx Code.

Function Code

0xxx xxxx Return error, if unsupported

1xxx xxxx Ignore, if unsupported

x0xx xxxx Intercepted by the OS/2 operating system

x1xx xxxx Passed to driver

xx0x xxxx Sends data and commands to device

xx1x xxxx Queries data and information from device

___x xxxx Subfunction.

Notice that the send/query data bit is intended only to standardize the function set; it plays no critical role. Some functions can contain both command and query elements. Such commands are defined as sends data.