How does HxD raw-read floppies?
Posted: 17 Nov 2020 00:49
I posted this before but I think I posted it in the wrong section. So I've moved it here.
I'm trying to make my own software for reading raw sectors from floppy disks. I'm curious what API functions you use to raw-read from the floppy. I know with a harddrive I can read by opening it like a file with the function CreateFileA and using the file name "\\.\PhysicalDrive0" to read the whole disk (even before the first partition) or "\\.\C:" to read just the main partition. Using "\\.\PhysicalDrive0" is equivalent to "Physical disks, Hard Disk 1" in HxD, and "\\.\C:" is equivalent to "Logical disks, C:" in HxD.
But now what about floppies? I know that I can use CreateFileA and "\\.\A:" is equivalent to "Logical disks, Floppy Disk 1" in HxD, but I can't figure out how HxD accesses the PHYSICAL floppy drive. I know in HxD it's called "Logical disks, Floppy Disk 1", but what is the device name for this, as far as Windows API is concerned? I know there must be some name like "\\.\DeviceName" that corresponds to the floppy disk drive, but I don't know what that name is.
I'm trying to make my own software for reading raw sectors from floppy disks. I'm curious what API functions you use to raw-read from the floppy. I know with a harddrive I can read by opening it like a file with the function CreateFileA and using the file name "\\.\PhysicalDrive0" to read the whole disk (even before the first partition) or "\\.\C:" to read just the main partition. Using "\\.\PhysicalDrive0" is equivalent to "Physical disks, Hard Disk 1" in HxD, and "\\.\C:" is equivalent to "Logical disks, C:" in HxD.
But now what about floppies? I know that I can use CreateFileA and "\\.\A:" is equivalent to "Logical disks, Floppy Disk 1" in HxD, but I can't figure out how HxD accesses the PHYSICAL floppy drive. I know in HxD it's called "Logical disks, Floppy Disk 1", but what is the device name for this, as far as Windows API is concerned? I know there must be some name like "\\.\DeviceName" that corresponds to the floppy disk drive, but I don't know what that name is.