MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / GetExecutableFilePath

Function GetExecutableFilePath

Source/Windows/Common/Module.h:9–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8namespace FEX::Windows {
9fextl::string GetExecutableFilePath() {
10 std::array<WCHAR, PATH_MAX> Buf;
11 UNICODE_STRING PathW {.Length = 0, .MaximumLength = Buf.size() * sizeof(WCHAR), .Buffer = Buf.data()};
12
13 if (LdrGetDllFullName(nullptr, &PathW)) {
14 return {};
15 }
16
17 STRING PathA;
18 RtlUnicodeStringToAnsiString(&PathA, &PathW, TRUE);
19 fextl::string Path(PathA.Buffer);
20 RtlFreeAnsiString(&PathA);
21
22 return Path.substr(Path.find_last_of('\\') + 1);
23}
24
25fextl::string GetSectionFilePath(uint64_t Address) {
26 struct {

Callers 2

ProcessInitFunction · 0.85
BTCpuProcessInitFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected