Bewerken

Delen via


IOCTL_CDROM_SEND_OPC_INFORMATION IOCTL (ntddcdrm.h)

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.

Major code

IRP_MJ_DEVICE_CONTROL

Input buffer

CDROM_SIMPLE_OPC_INFO

Input buffer length

Length of a CDROM_SIMPLE_OPC_INFO.

Output buffer

None.

Output buffer length

None.

Status block

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:

STATUS_INFO_LENGTH_MISMATCH

The input buffer length is smaller than required.

STATUS_INVALID_PARAMETER

The request type is not SimpleOpcInfo.

STATUS_SUCCESS

The request completed successfully.

Remarks

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.

Requirements

Requirement Value
Header ntddcdrm.h (include Winioctl.h)

See also

CDROM_SIMPLE_OPC_INFO

DeviceIoControl

IOCTL_CDROM_SEND_OPC_INFORMATION