| 470 | */ |
| 471 | |
| 472 | static 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 | |
| 501 | void Process::getMemRanges(vector<t_memrange>& ranges) |
| 502 | { |