#6376 Removed dead code (getLibsUsed function)
This commit is contained in:
parent
8dc868a206
commit
65e9045981
|
@ -128,39 +128,3 @@ ArchSystemWindows::isWOW64() const
|
||||||
#endif
|
#endif
|
||||||
return false;
|
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;
|
|
||||||
}
|
|
||||||
|
|
|
@ -33,7 +33,6 @@ public:
|
||||||
virtual std::string getPlatformName() const;
|
virtual std::string getPlatformName() const;
|
||||||
virtual std::string setting(const std::string& valueName) const;
|
virtual std::string setting(const std::string& valueName) const;
|
||||||
virtual void setting(const std::string& valueName, const std::string& valueString) const;
|
virtual void setting(const std::string& valueName, const std::string& valueString) const;
|
||||||
virtual std::string getLibsUsed(void) const;
|
|
||||||
|
|
||||||
bool isWOW64() const;
|
bool isWOW64() const;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue