MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / get_mod_info

Class get_mod_info

src/backward.h:3603–3629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3601};
3602
3603class get_mod_info {
3604 HANDLE process;
3605 static const int buffer_length = 4096;
3606
3607public:
3608 get_mod_info(HANDLE h) : process(h) {}
3609
3610 module_data operator()(HMODULE module)
3611 {
3612 module_data ret;
3613 char temp[buffer_length];
3614 MODULEINFO mi;
3615
3616 GetModuleInformation(process, module, &mi, sizeof(mi));
3617 ret.base_address = mi.lpBaseOfDll;
3618 ret.load_size = mi.SizeOfImage;
3619
3620 GetModuleFileNameExA(process, module, temp, sizeof(temp));
3621 ret.image_name = temp;
3622 GetModuleBaseNameA(process, module, temp, sizeof(temp));
3623 ret.module_name = temp;
3624 std::vector<char> img(ret.image_name.begin(), ret.image_name.end());
3625 std::vector<char> mod(ret.module_name.begin(), ret.module_name.end());
3626 SymLoadModule64(process, 0, &img[0], &mod[0], (DWORD64)ret.base_address, ret.load_size);
3627 return ret;
3628 }
3629};
3630
3631template <>
3632class TraceResolverImpl<system_tag::windows_tag> : public TraceResolverImplBase {

Callers 1

TraceResolverImplMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected