MCPcopy Create free account
hub / github.com/Vector35/debugger / LoadDngEngLibraries

Method LoadDngEngLibraries

core/adapters/dbgengadapter.cpp:100–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100bool DbgEngAdapter::LoadDngEngLibraries()
101{
102 auto enginePath = GetDbgEngPath("x64");
103 if (!enginePath.empty())
104 {
105 LogDebug("DbgEng libraries in path %s", enginePath.c_str());
106 if (!SetDllDirectoryA(enginePath.c_str()))
107 LogWarn(
108 "Failed to set DLL directory to %s. The debugger is going to load the system dbgeng DLLs, which may "
109 "not work as expected",
110 enginePath.c_str());
111 }
112 else
113 {
114 LogWarn(
115 "debugger.x64dbgEngPath is empty or invalid. The debugger is going to load the system dbgeng DLLs, which "
116 "may "
117 "not work as expected");
118 }
119
120 HMODULE handle;
121 handle = LoadLibraryA("dbgcore.dll");
122 if (handle == nullptr)
123 {
124 LogWarn("Failed to load dbgcore.dll, %d", GetLastError());
125 return false;
126 }
127
128 handle = LoadLibraryA("dbghelp.dll");
129 if (handle == nullptr)
130 {
131 LogWarn("Failed to load dbghelp.dll, %d", GetLastError());
132 return false;
133 }
134
135 handle = LoadLibraryA("dbgmodel.dll");
136 if (handle == nullptr)
137 {
138 LogWarn("Failed to load dbgmodel.dll, %d", GetLastError());
139 return false;
140 }
141
142 handle = LoadLibraryA("dbgeng.dll");
143 if (handle == nullptr)
144 {
145 LogWarn("Failed to load dbgeng.dll, %d", GetLastError());
146 return false;
147 }
148}
149
150std::string DbgEngAdapter::GenerateRandomPipeName()
151{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected