The IOCTL_CDROM_EXCLUSIVE_ACCESS request instructs the CD-ROM class driver to:
- Report the access state of a CD-ROM device.
- Lock a CD-ROM device for exclusive access.
- Unlock a CD-ROM device for exclusive access.
Depending on the operation that the caller requests, the caller must provide one of the following structures as input at Irp->AssociatedIrp.SystemBuffer:
CDROM_EXCLUSIVE_ACCESS (to report the access state of a CD-ROM device)
CDROM_EXCLUSIVE_LOCK (to lock a CD-ROM device for exclusive access)
CDROM_EXCLUSIVE_ACCESS (to unlock a CD-ROM device that the application locked for exclusive access)
Input Buffer Length
The Parameters.DeviceIoControl.InputBufferLength member in the IO_STACK_LOCATION structure indicates the size, in bytes, of the user-allocated input buffer.
If the caller requests the exclusive access state of the CD-ROM device (RequestType = ExclusiveAccessQueryState), the CD-ROM class driver returns a CDROM_EXCLUSIVE_LOCK_STATE-type structure in the buffer at Irp->AssociatedIrp.SystemBuffer whose LockState member indicates the access state of the device.
Output Buffer Length
The Parameters.DeviceIoControl.OutputBufferLength member in the I/O stack location (IO_STACK_LOCATION) indicates the size, in bytes, of the output buffer.
The Information field is set to the number of bytes that are returned. The Status field is set to STATUS_SUCCESS if the request succeeds.
If the request fails, the Status field might be set to one of the following error messages:
|Header||ntddcdrm.h (include Ntddcdrm.h)|