18 lines
449 B
C++
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();
|