I/O Control Codes

Many types of stream interface device drivers use I/O control codes to implement parts of their functionality. I/O control codes are a generic method for extending the functionality of a stream interface driver past that which is defined by the standard stream interface functions. Stream interface drivers can define arbitrary I/O control codes for whatever purposes they require. Microsoft has defined I/O control codes for some particular types of stream interface drivers, such as block device drivers, serial port drivers, and HID class USB devices. If you define additional I/O control codes for your stream interface driver, you are responsible for publishing the information about those codes so that application writers can make full use of your device driver.

These I/O control codes are passed as the dwCode parameter of a stream interface driver’s xxx_IOControl function by an application or by an operating system component. The xxx_IOControl function’s other parameters supply data necessary for each particular I/O control code; the meanings of the other parameters are different for every I/O control code. This section lists all the I/O control codes that Microsoft has defined as well as the meanings of the other parameters to the xxx_IOControl function for each code.