MCPcopy Create free account
hub / github.com/Illation/ETEngine / GetExecutablePathName

Function GetExecutablePathName

Engine/source/EtCore/Util/WindowsUtil.cpp:67–79  ·  view source on GitHub ↗

--------------------- GetExecutablePathName Gets the name and path the executable lives in

Source from the content-addressed store, hash-verified

65// Gets the name and path the executable lives in
66//
67void GetExecutablePathName(std::string& outPath)
68{
69 char ownPth[MAX_PATH];
70
71 // When NULL is passed to GetModuleHandle, the handle of the exe itself is returned
72 HMODULE hModule = GetModuleHandle(NULL);
73 ET_ASSERT(hModule != NULL);
74
75 // Use GetModuleFileName() with module handle to get the path
76 GetModuleFileName(hModule, ownPth, (sizeof(ownPth)));
77
78 outPath = std::string(ownPth);
79}
80
81
82} // namespace core

Callers 1

SetExecutablePathMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected