MCPcopy Create free account
hub / github.com/DFIR-ORC/dfir-orc / GetCurrentProcessExecutable

Function GetCurrentProcessExecutable

src/OrcCapsule/Utilities/Process.cpp:183–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181} // namespace
182
183std::error_code GetCurrentProcessExecutable(fs::path& path)
184{
185 std::wstring strPath(MAX_PATH, L'\0');
186
187 DWORD length = GetModuleFileNameW(nullptr, strPath.data(), static_cast<DWORD>(strPath.size()));
188 if (length == 0)
189 {
190 return LastWin32Error();
191 }
192
193 strPath.resize(length);
194 path = strPath;
195 return {};
196}
197
198std::error_code
199WaitChildProcess(const PROCESS_INFORMATION& pi, const std::filesystem::path& executable, DWORD& childExitCode)

Callers 7

RelocateOrcFromNetworkFunction · 0.85
PerformSelfUpdateFunction · 0.85
HandleResourceSetFunction · 0.85
HandleInfoFunction · 0.85
HandleRemoveRunnerFunction · 0.85
HandleAddRunnerFunction · 0.85
GetRunnerFilenameFunction · 0.85

Calls 4

LastWin32ErrorFunction · 0.70
dataMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected