diff --git a/src/lib/arch/IArchSystem.h b/src/lib/arch/IArchSystem.h index 8b508ac596..31ba8f22b5 100644 --- a/src/lib/arch/IArchSystem.h +++ b/src/lib/arch/IArchSystem.h @@ -41,26 +41,19 @@ public: Returns a string identifying the platform this OS is running on. */ virtual std::string getPlatformName() const = 0; - //@} + //! Get a Synergy setting /*! Reads a Synergy setting from the system. */ virtual std::string setting(const std::string& valueName) const = 0; - //@} //! Set a Synergy setting /*! Writes a Synergy setting from the system. */ virtual void setting(const std::string& valueName, const std::string& valueString) const = 0; - //@} - //! Get the pathnames of the libraries used by Synergy - /* - Returns a string containing the full path names of all loaded libraries at the point it is called. - */ - virtual std::string getLibsUsed(void) const = 0; //@} }; diff --git a/src/lib/arch/win32/ArchSystemWindows.cpp b/src/lib/arch/win32/ArchSystemWindows.cpp index 5540e40c2a..5db33f29b5 100644 --- a/src/lib/arch/win32/ArchSystemWindows.cpp +++ b/src/lib/arch/win32/ArchSystemWindows.cpp @@ -159,38 +159,3 @@ ArchSystemWindows::isWOW64() const 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%08X)",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 c747f28f28..a7e237a54b 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; }; diff --git a/src/lib/plugin/ns/ns.cpp b/src/lib/plugin/ns/ns.cpp index 7498ef0d47..929f361d49 100644 --- a/src/lib/plugin/ns/ns.cpp +++ b/src/lib/plugin/ns/ns.cpp @@ -33,20 +33,6 @@ SecureListenSocket* g_secureListenSocket = NULL; Arch* g_arch = NULL; Log* g_log = NULL; -std::string -helperGetLibsUsed(void) -{ - std::stringstream libs(ARCH->getLibsUsed()); - std::string msg; - std::string pid; - std::getline(libs,pid); - - while( std::getline(libs,msg) ) { - LOG(( CLOG_DEBUG "libs:%s",msg.c_str())); - } - return pid; -} - extern "C" { void init(void* log, void* arch) @@ -58,8 +44,6 @@ init(void* log, void* arch) if (g_arch == NULL) { Arch::setInstance(reinterpret_cast(arch)); } - - LOG(( CLOG_DEBUG "library use: %s", helperGetLibsUsed().c_str())); } int