see below code. It lists all drives including mapped drives
DWORD dwLogicalDrives = GetLogicalDrives() << 1;
int nIdx = 1;
char chDrive = 'A';
CString csDrive;
while( dwLogicalDrives )
{
if(dwLogicalDrives & static_cast<int>( pow( 2, nIdx )))
{
csDrive = chDrive;
AfxMessageBox( csDrive );
}
++nIdx;
++chDrive;
}</int>