MCPcopy Create free account
hub / github.com/aliasIsolation/aliasIsolation / get_mod_info

Class get_mod_info

src/crashHandler/crashHandler.cpp:232–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232class get_mod_info {
233 HANDLE process;
234 static const int buffer_length = 4096;
235public:
236 get_mod_info(HANDLE h) : process(h) {}
237
238 module_data operator()(HMODULE module) {
239 module_data ret;
240 char temp[buffer_length];
241 MODULEINFO mi;
242
243 GetModuleInformation(process, module, &mi, sizeof(mi));
244 ret.base_address = mi.lpBaseOfDll;
245 ret.load_size = mi.SizeOfImage;
246
247 GetModuleFileNameEx(process, module, temp, sizeof(temp));
248 ret.image_name = temp;
249 GetModuleBaseName(process, module, temp, sizeof(temp));
250 ret.module_name = temp;
251 std::vector<char> img(ret.image_name.begin(), ret.image_name.end());
252 std::vector<char> mod(ret.module_name.begin(), ret.module_name.end());
253 SymLoadModule64(process, 0, &img[0], &mod[0], (DWORD64)ret.base_address, ret.load_size);
254 return ret;
255 }
256};
257
258void *load_modules_symbols(HANDLE process, DWORD /*pid*/) {
259 ModuleList modules;

Callers 1

load_modules_symbolsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected