Add files via upload

This commit is contained in:
vxunderground
2021-09-20 10:51:06 -05:00
committed by GitHub
parent 6b5741ca4b
commit ba9ad14eed
9 changed files with 484 additions and 0 deletions
@@ -0,0 +1,17 @@
#include <windows.h>
#include <vector>
#include <string>
std::vector<std::string> getListOfDrives() {
std::vector<std::string> arrayOfDrives;
char* szDrives = new char[MAX_PATH]();
if (GetLogicalDriveStringsA(MAX_PATH, szDrives));
for (int i = 0; i < 100; i += 4)
if (szDrives[i] != (char)0)
arrayOfDrives.push_back(std::string{ szDrives[i],szDrives[i + 1],szDrives[i + 2] });
delete[] szDrives;
return arrayOfDrives;
}