次の方法で共有


IOCTL_CDROM_TEST_UNIT_READY (Compact 2013)

3/26/2014

This I/O control message retrieves disc ready information and fills the CDROM_TESTUNITREADY structure, the memory needed for structure and information storage. Send this message with DeviceIoControl.

Syntax

BOOL DeviceIoControl(
    HANDLE hDevice,           // handle to device
    DWORD dwIoControlCode,    // use IOCTL_CDROM_TEST_UNIT_READY
    LPVOID lpInBuffer,        // pointer to input buffer
    DWORD nInBufferSize,      // input buffer size
    LPVOID lpOutBuffer,       // pointer to output buffer
    DWORD nOutBufferSize,     // output buffer size
    LPDWORD lpBytesReturned,  // number of bytes returned
    OVERLAPPED lpOverlapped   // pointer to OVERLAPPED structure
);

Parameters

  • hDevice
    [in] Handle to the device.
  • dwIoControlCode
    [in] Control code for the operation. Use IOCTL_CDROM_TEST_UNIT_READY for this operation.
  • lpInBuffer
    [in] Set to NULL.
  • nInBufferSize
    [in] Set to zero.
  • lpBytesReturned
    [in][out] On input, address of a DWORD that receives the size in bytes of the data sent. On output, set to the number of bytes written from the supplied buffer.
  • lpOverlapped
    [in] Set to NULL.

Return Values

Returns TRUE if successful; otherwise, returns FALSE. If it returns TRUE, then the bUnitReady member of CDROM_TESTUNITREADY is also set to TRUE.

Remarks

To get extended error information, call GetLastError. GetLastError may return other standard error messages as appropriate.

Requirements

Header

cdioctl.h

See Also

Reference

Block Driver IOCTLs
CDROM_TESTUNITREADY
DeviceIoControl