MCPcopy Create free account
hub / github.com/NtQuery/Scylla / initDeviceNameList

Method initDeviceNameList

Scylla/DeviceNameResolver.cpp:16–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14}
15
16void DeviceNameResolver::initDeviceNameList()
17{
18 TCHAR shortName[3] = {0};
19 TCHAR longName[MAX_PATH] = {0};
20 HardDisk hardDisk;
21
22 shortName[1] = TEXT(':');
23
24 deviceNameList.reserve(3);
25
26 for ( TCHAR shortD = TEXT('a'); shortD <= TEXT('z'); shortD++ )
27 {
28 shortName[0] = shortD;
29 if (QueryDosDevice( shortName, longName, MAX_PATH ) > 0)
30 {
31 hardDisk.shortName[0] = _totupper(shortD);
32 hardDisk.shortName[1] = TEXT(':');
33 hardDisk.shortName[2] = 0;
34
35 hardDisk.longNameLength = _tcslen(longName);
36
37
38 _tcscpy_s(hardDisk.longName, longName);
39 deviceNameList.push_back(hardDisk);
40 }
41 }
42
43 fixVirtualDevices();
44}
45
46bool DeviceNameResolver::resolveDeviceLongNameToShort(const TCHAR * sourcePath, TCHAR * targetPath)
47{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected