Its working! This is the code I'm using (far from final.... just using it to test the function).... So far, it outputs no problem.)
DWORD logicalDrives = GetLogicalDrives() << 1;
int i = 1;
char driveLetter = 'A';
string drive;
while(logicalDrives)
{
if(logicalDrives & (int)pow(2,i))
{
drive = driveLetter;
MessageBox(hWnd, drive.c_str(), "test", 0);
}
++i;
++driveLetter;
}
Seems a lil archaic, but it was just to see if it works, which it does! It still locks up after the last drive which I expected since its searching for drives which don't exist. That should be simple enough to fix. When I'm finished, I'll have all the info for the drive (letter, type, size, etc) all in either a struct or class. Everything should be smooth sailing form here on. I'm actually quite pleasantly surprised how easy it was to solve, just haven't used Bitwise operators much yet. Thanks all for your help though. Muchly appreciated!
__________________
" Can't keep my eyes from the circling skies, Tongue-tied and twisted just an earth-bound misfit, I "
|