Gets handle of a loaded module with given name, NULL otherwise
| 91 | |
| 92 | // Gets handle of a loaded module with given name, NULL otherwise |
| 93 | HMODULE Get(const wchar_t* moduleName) const |
| 94 | { |
| 95 | // If vector is empty then we're trying to call it without calling Enumerate first |
| 96 | assert(m_moduleList.size() != 0); |
| 97 | |
| 98 | auto it = std::find_if(m_moduleList.begin(), m_moduleList.end(), [&](const auto& e) { |
| 99 | return _wcsicmp(moduleName, std::get<1>(e).c_str()) == 0; |
| 100 | }); |
| 101 | return it != m_moduleList.end() ? std::get<0>(*it) : nullptr; |
| 102 | } |
| 103 | |
| 104 | // Gets handles to all loaded modules with given name |
| 105 | std::vector<HMODULE> GetAll(const wchar_t* moduleName) const |