9{
10 wchar_t path[MAX_PATH] = {0};
11 DWORD len = GetModuleFileNameW(nullptr, path, MAX_PATH);
12 if (len == 0)
13 return L".";
14 std::wstring p(path, len);
15 size_t pos = p.find_last_of(L"\\/");
16 return (pos == std::wstring::npos) ? L"." : p.substr(0, pos);
17}