#6376 Removed dead code (getLibsUsed function)

This commit is contained in:
Nick Bolton 2018-08-01 13:04:18 +01:00
parent 8dc868a206
commit 65e9045981
2 changed files with 0 additions and 37 deletions

View File

@ -128,39 +128,3 @@ ArchSystemWindows::isWOW64() const
#endif
return false;
}
#pragma comment(lib, "psapi")
std::string
ArchSystemWindows::getLibsUsed(void) const
{
HMODULE hMods[1024];
HANDLE hProcess;
DWORD cbNeeded;
unsigned int i;
char hex[16];
DWORD pid = GetCurrentProcessId();
std::string msg = "pid:" + std::to_string((_ULonglong)pid) + "\n";
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid);
if (NULL == hProcess) {
return msg;
}
if (EnumProcessModules(hProcess, hMods, sizeof(hMods), &cbNeeded)) {
for (i = 0; i < (cbNeeded / sizeof(HMODULE)); i++) {
TCHAR szModName[MAX_PATH];
if (GetModuleFileNameEx(hProcess, hMods[i], szModName, sizeof(szModName) / sizeof(TCHAR))) {
sprintf(hex, "(0x%08llX)", reinterpret_cast<long long>(hMods[i]));
msg += szModName;
msg.append(hex);
msg.append("\n");
}
}
}
CloseHandle(hProcess);
return msg;
}

View File

@ -33,7 +33,6 @@ public:
virtual std::string getPlatformName() const;
virtual std::string setting(const std::string& valueName) const;
virtual void setting(const std::string& valueName, const std::string& valueString) const;
virtual std::string getLibsUsed(void) const;
bool isWOW64() const;
};