BOOL DeviceIoControl( (HANDLE) hDevice, // handle to device of interest IOCTL_STORAGE_CHECK_VERIFY, // dwIoControlCode, control code of // operation to perform NULL, // lpInBuffer is not used; must be NULL 0, // nInBufferSize is not used; must be zero NULL, // lpOutBuffer is not used; must be NULL 0, // nOutBufferSize is not used; // must be zero (LPDWORD) lpBytesReturned, // pointer to variable to receive // output byte count (LPOVERLAPPED) lpOverlapped // pointer to OVERLAPPED structure // for asynchronous operation );判断是否有盘
(HANDLE) hDevice, // handle to device of interest
IOCTL_STORAGE_CHECK_VERIFY, // dwIoControlCode, control code of
// operation to perform
NULL, // lpInBuffer is not used; must be NULL
0, // nInBufferSize is not used; must be zero
NULL, // lpOutBuffer is not used; must be NULL
0, // nOutBufferSize is not used;
// must be zero
(LPDWORD) lpBytesReturned, // pointer to variable to receive
// output byte count
(LPOVERLAPPED) lpOverlapped // pointer to OVERLAPPED structure
// for asynchronous operation
);判断是否有盘