MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / GetExecutablePath

Function GetExecutablePath

Tools/Tool.cpp:36–45  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

34 {
35 //-----------------------------------------------------------------------------
36 fs::path GetExecutablePath()
37 {
38 const int PathBufferSize = 40 * 1000;
39 std::vector<wchar_t> filename(PathBufferSize);
40
41 if (!GetModuleFileName(nullptr, &filename[0], static_cast<int>(filename.size())))
42 THROW("Cannot get current executable path.");
43
44 return fs::path{ &filename[0] };
45 }
46
47 //-------------------------------------------------------------------------
48 std::string ToString(unsigned int pageCode, const std::wstring& str)

Callers 1

GetExecutableFolderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected