Sometimes when we double click on a USB drive in Windows File Explorer there is a message “There is no disc in the drive”. I want to identify this issue in my application prior to reading any file on the disc.
How is it possible?
I am on Windows Platform and using Visual C++ for development.
If you know the drive letter, you can try the following:
That is, open the drive without requesting read or write access. It should fail only if the drive is not ready. It works with a USB memory stick.