Question

I am doing a hard disk scan in my program, and I remember the bad old days when scanning B drive would freeze my machine. Can I skip A and B drives for those users that still have floppies? Are A or B drives in Windows ever used for things other than a floppy disk?

Was it helpful?

Solution

It shouldn't matter to you which drive letters are assigned to what kind of drives.

Use GetLogicalDrives to determine what drive letters are assigned and GetDriveType and SetupDiGetDeviceRegistryProperty to determine the type of a drive.

OTHER TIPS

Windows always assigns letter A to the first floppy drive, and B to a second floppy drive. If there is no second floppy, B will act as a virtual floppy and will point to A. If there are no floppies, A and B will be considered invalid drive letters.

I believe there is a possibility that if all the drive letters between C and Z are assigned, some old versions of DOS and Windows would reuse A and B, but that's a highly unlikely situation.

Your program can safely skip A and B in its search, assuming you don't care about floppy drives.

Edit: More info

Mapped network drives can also inhabit A: and B:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top