MCPcopy Create free account
hub / github.com/EasyIME/PIME / getCurrentExecutableDir

Function getCurrentExecutableDir

PIMELauncher/Utils.cpp:27–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27std::wstring getCurrentExecutableDir() {
28 wchar_t exeFilePathBuf[MAX_PATH];
29 DWORD len = GetModuleFileNameW(NULL, exeFilePathBuf, MAX_PATH);
30 exeFilePathBuf[len] = '\0';
31
32 // strip the filename part to get dir path
33 wchar_t* p = wcsrchr(exeFilePathBuf, '\\');
34 if (p) {
35 *p = '\0';
36 }
37 return exeFilePathBuf;
38}
39
40std::wstring getAppLocalDir() {
41 wchar_t* appLocalDataDirPath = nullptr;

Callers 1

execMethod · 0.85

Calls 1

wcsrchrFunction · 0.85

Tested by

no test coverage detected