framework.h 449 B

123456789101112131415161718
  1. #include <windows.h>
  2. #include <string>
  3. std::wstring ExePath() {
  4. WCHAR buffer[MAX_PATH];
  5. GetModuleFileNameW(NULL, buffer, MAX_PATH);
  6. return std::wstring(buffer);
  7. }
  8. std::wstring DirPath() {
  9. std::wstring exepath = ExePath();
  10. std::wstring::size_type pos = exepath.find_last_of(L"\\/");
  11. return exepath.substr(0, pos);
  12. }
  13. std::wstring CONFIG_FILE_STRING = DirPath() + L"\\plugins\\DSCRemote.ini";
  14. LPCWSTR CONFIG_FILE = CONFIG_FILE_STRING.c_str();