DWORD drives = GetLogicalDrives();
LPCWSTR d[4];
int n;
for (int i = 0; i < 26; i++) {
n = ((drives >> i) & 0x00000001);
if (n == 1) {
d[0] = LPCWSTR(65 + i); // символ диска
d[1] = L":";
d[2] = L"\\";
d[3] = L"\0";
driveType = GetDriveType(*d);
cout << driveType << endl;
}
}
UINT WINAPI GetDriveType(
_In_opt_ LPCTSTR lpRootPathName
);
LPCWSTR d[4];