IOCTL_CDROM: IOCTLs for CD-ROM Devices

IOCTL_CDROM: IOCTLs for CD-ROM Devices

IOCTL (I/O Control) is a set of commands used to control and manage various devices, including CD-ROM drives. In this article, we will explore the different IOCTLs related to CD-ROM devices.

IOCTL_CDROM_GET_PERFORMANCE
This IOCTL request wraps the MMC command GET PERFORMANCE, allowing you to retrieve the performance information supported by the device.

IOCTL_CDROM_LOAD_MEDIA
This IOCTL is used to load a media tray into the drive.

IOCTL_CDROM_RAW_READ
This IOCTL allows you to read data from a CD-ROM in raw mode.

IOCTL_CDROM_READ_Q_CHANNEL
This IOCTL returns the current position, media catalog, or ISRC tracking data.

IOCTL_CDROM_READ_TOC
This IOCTL is not used and returns the media's table of contents (TOC).

IOCTL_CDROM_READ_TOC_EX
This IOCTL queries the TOC, PMA (program memory area), and ATIP (absolute time) from the target device.

IOCTL_CDROM_SEND_OPC_INFORMATION
This IOCTL is used in file systems and OPC (optimum power calibration) procedures to perform pre-processing before the first streaming write operation. This allows the procedure to complete without blocking the application.

IOCTL_CDROM_SET_SPEED
This IOCTL sets the spin speed of a CD-ROM drive.

Note that Windows Vista and later versions no longer use these IOCTLs for CD-ROM devices. Instead, they use the MCI (Media Control Interface) API.

I/O Control Codes

Here are some additional I/O control codes related to CD-ROM devices:

  • IOCTL_CDROM_GET_CONTROL: Retrieves the current audio playback mode.
  • IOCTL_CDROM_GET_VOLUME: Returns the current volume for each device's audio port.
  • IOCTL_CDROM_PAUSE_AUDIO: Pauses audio playback.
  • IOCTL_CDROM_PLAY_AUDIO_MSF: Plays a specified media range (MSF).
  • IOCTL_CDROM_READ_Q_CHANNEL: Returns the current position, media catalog, or ISRC tracking data.
  • IOCTL_CDROM_RESUME_AUDIO: Resumes paused audio playback.
  • IOCTL_CDROM_SEEK_AUDIO_MSF: Seeks to a specified MSF location in the media.
  • IOCTL_CDROM_SET_VOLUME: Sets the volume for each device's audio port.
  • IOCTL_CDROM_STOP_AUDIO: Stops audio playback.

These IOCTLs provide a way to interact with CD-ROM devices and manage their functions. However, as mentioned earlier, Windows Vista and later versions no longer use these IOCTLs and instead rely on the MCI API.

Leave a comment