From 65e904598104385bb0e747b50278d3cb5d4d74ac Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Wed, 1 Aug 2018 13:04:18 +0100 Subject: [PATCH] #6376 Removed dead code (getLibsUsed function) --- src/lib/arch/win32/ArchSystemWindows.cpp | 36 ------------------------ src/lib/arch/win32/ArchSystemWindows.h | 1 - 2 files changed, 37 deletions(-) diff --git a/src/lib/arch/win32/ArchSystemWindows.cpp b/src/lib/arch/win32/ArchSystemWindows.cpp index d63ba336..3e0f0fce 100644 --- a/src/lib/arch/win32/ArchSystemWindows.cpp +++ b/src/lib/arch/win32/ArchSystemWindows.cpp @@ -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(hMods[i])); - msg += szModName; - msg.append(hex); - msg.append("\n"); - } - } - } - - CloseHandle(hProcess); - return msg; -} diff --git a/src/lib/arch/win32/ArchSystemWindows.h b/src/lib/arch/win32/ArchSystemWindows.h index 0d3df4ac..4b198602 100644 --- a/src/lib/arch/win32/ArchSystemWindows.h +++ b/src/lib/arch/win32/ArchSystemWindows.h @@ -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; };