1  TCHAR buffer[MAX_PATH];
2  DWORD dwVal=::GetLogicalDriveStrings(MAX_PATH,buffer);
3 
4  CString str;
5  for(int i = 0; i < dwVal; i += 4)
6  {
7   CString str;
8   str.Format(_T("%c:\\"), buffer[i]);
9  }