How can I detect if there is a floppy in a drive?
.net
Solution
You can always try to read a sector from the floppy and see if it succeeds or not.
I have no clue how to do it in .NET, but here is the C/C++ equivalent.
SetLastError(0);
HANDLE h = CreateFile("\\\\.\\A:", ...);
if (!ReadFile(h, buf, 512, &bytes_read, 0))
{
DWORD err = GetLastError();
}
CreateFile, ReadFile
Problem
I tried to use DriveInfo.IsReady, but it returns false if an unformatted floppy is in the drive.