IOCTL_CDROM_SEND_OPC_INFORMATION control code
The IOCTL_CDROM_SEND_OPC_INFORMATION control code can be used in file systems and other implementations that want to perform the Optimum Power Calibration (OPC) procedure in advance, so that the first streaming write does not have to wait for the procedure to finish. The optical drive performs the OPC procedure to determine the optimum power of the laser during write. The procedure is necessary to ensure quality, but it wears out the media and should not be performed too often.
To perform this operation, call the DeviceIoControl function with IOCTL_CDROM_SEND_OPC_INFORMATION as the dwIoControlCode parameter.
The Information field is set to the number of bytes returned.
Because of status code propagation from other APIs, the Status field can be set to (but is not limited to) the following:
The request completed successfully.
The input buffer length is smaller than required.
The request type is not SimpleOpcInfo.
The IOCTL_CDROM_SEND_OPC_INFORMATION IOCTL is a wrapper over the SEND OPC INFORMATION command of the MMC specification. The Exclude0 and Exclude1 fields directly map to the SEND OPC INFORMATION fields with the same names. On failures, this IOCTL returns standard errors, such as STATUS_DEVICE_NOT_READY, STATUS_IO_TIMEOUT, STATUS_IO_DEVICE_ERROR.