The first step in the I/O process is for the task to open the device with the OpenNamedDevice()
call.
A task must also get its own IOReq and IOInfo data structures to pass information to and from the device. The IOReq data structure is created using the call CreateIOReq()
. The IOInfo data structure is allocated by the task either via a memory allocation call or on the stack.
Note: The IOInfo structure must be cleared of all unused bits before it is used.
After setting the IOInfo fields, a task uses the SendIO()
or DoIO()
functions to pass the item number of the I/O request structure and a pointer to the IOInfo structure to the device. The I/O request is passed to the device, and the appropriate action is taken by the device as specified by the IOInfo structure fields.