Any driver that sets up device objects of type FILE_DEVICE_CD_ROM is required to handle three types of requests:
IRP_MJ_CREATE
IRP_MJ_READ
IRP_MJ_DEVICE_CONTROL
Returns STATUS_SUCCESS, indicating that the device exists. For the caller, this request opens the device for I/O.
A higher-level driver is attempting to connect one of its device objects to the target device object, or a user-mode process has attempted to open a file stored on the physical device, thereby causing a file system to carry out a mount operation.
Returns STATUS_SUCCESS in the Status field and zero in the Information field.
Transfers data from the underlying device to system memory.
Drivers of CD-ROM devices generally use direct I/O, so the lowest-level driver transfers data using DMA or PIO into the buffer described by the MDL at Irp->MdlAddress.
A Win32™ application with a handle for the opened file object that represents the CD-ROM device has requested a data transfer.
STATUS_INSUFFICIENT_RESOURCES STATUS_DEVICE_DATA_ERROR STATUS_INVALID_DEVICE_REQUEST STATUS_NO_SUCH_DEVICE STATUS_IO_TIMEOUT STATUS_IO_DEVICE_ERROR STATUS_DEVICE_NOT_READY STATUS_DEVICE_BUSY STATUS_NO_MEDIA_IN_DEVICE STATUS_VERIFY_REQUIRED
Determined by the I/O control code set at Parameters.DeviceIoControl.IoControlCode in the driver’s I/O stack location of the IRP.
A Win32 application with a handle for the opened file object that represents the CD-ROM device has called DeviceIoControl or a higher-level driver has set up the request.
Also determined by the operation, either STATUS_SUCCESS or an appropriate STATUS_XXX value. For most operations, the set of possible STATUS_XXX values includes those propagated from a call to a support routine or lower-level driver and/or those chosen by the driver designer. In general, the Information field of the I/O status block is set to the number of bytes returned or transferred when the device driver completes the IRP.