One of the primary responsibilities of driver stacks is transferring data between user-mode applications and a system's devices. The operating system provides the following three methods for accessing data buffers:
For more information, see Using Buffered I/O.
For more information, see Using Direct I/O.
For more information, see Using Neither Buffered Nor Direct I/O.
For IRP_MJ_READ and IRP_MJ_WRITE requests, drivers specify the I/O method by using flags in each DEVICE_OBJECT structure. For more information, see Initializing a Device Object.
For IRP_MJ_DEVICE_CONTROL and IRP_MJ_INTERNAL_DEVICE_CONTROL requests, the I/O method is determined by the TransferType value that is contained in each IOCTL value. For more information, see Defining I/O Control Codes.
All drivers in a driver stack must use the same buffer access method for each request, except possibly for the highest-level driver (which can use the "neither" method, regardless of the method used by lower drivers).