Files
PDModdingCommunity_PD-Loader/source-code/source/plugins/DSCRemote/framework.h
T
2020-02-12 22:24:17 +01:00

18 lines
449 B
C++

#include <windows.h>
#include <string>
std::wstring ExePath() {
WCHAR buffer[MAX_PATH];
GetModuleFileNameW(NULL, buffer, MAX_PATH);
return std::wstring(buffer);
}
std::wstring DirPath() {
std::wstring exepath = ExePath();
std::wstring::size_type pos = exepath.find_last_of(L"\\/");
return exepath.substr(0, pos);
}
std::wstring CONFIG_FILE_STRING = DirPath() + L"\\plugins\\DSCRemote.ini";
LPCWSTR CONFIG_FILE = CONFIG_FILE_STRING.c_str();