MCPcopy Create free account
hub / github.com/ThirteenAG/WidescreenFixesPack / Get

Method Get

includes/ModuleList.hpp:93–102  ·  view source on GitHub ↗

Gets handle of a loaded module with given name, NULL otherwise

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected