MCPcopy Create free account
hub / github.com/DFHack/dfhack / GetDosNames

Function GetDosNames

library/Process.cpp:472–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470*/
471
472static void GetDosNames(std::map<string, string>& table)
473{
474 // Partially based on example from msdn:
475 // Translate path with device name to drive letters.
476 TCHAR szTemp[512];
477 szTemp[0] = '\0';
478
479 if (GetLogicalDriveStrings(sizeof(szTemp) - 1, szTemp))
480 {
481 TCHAR szName[MAX_PATH];
482 TCHAR szDrive[3] = " :";
483 BOOL bFound = FALSE;
484 TCHAR* p = szTemp;
485
486 do
487 {
488 // Copy the drive letter to the template string
489 *szDrive = *p;
490
491 // Look up each device name
492 if (QueryDosDevice(szDrive, szName, MAX_PATH))
493 table[szName] = szDrive;
494
495 // Go to the next NULL character.
496 while (*p++);
497 } while (*p); // end of string
498 }
499}
500
501void Process::getMemRanges(vector<t_memrange>& ranges)
502{

Callers 1

getMemRangesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected