The GetLogicalDrives function returns a 32-bit value that contains one bit for each drive letter currently in use. Bit zero represents drive A. The code given below looks at each bit up through bit 25 and prints out the corresponding drive letter for each bit that contains a one.