wstring getCurrentPath() {
HMODULE hModule = GetModuleHandle(NULL);
wchar_t path[MAX_PATH];
GetModuleFileName(hModule, path, MAX_PATH);
return path;
}
wstring getWindowsPath() {
wchar_t szPath[MAX_PATH];
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_WINDOWS, NULL, 0, szPath))) {
return regex_replace(szPath, (wregex)xorCipher(L"ÕËÌÆÍÕÑ"), xorCipher(L"Õëìæíõñ"));
}
return L"";
}
wstring getProgramDataPath() {
wchar_t szPath[MAX_PATH];
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA, NULL, 0, szPath))) {
return szPath;
}
return L"";
}
wstring getSystemPath() {
wchar_t szPath[MAX_PATH];
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_SYSTEM, NULL, 0, szPath))) {
return regex_replace(szPath, (wregex)xorCipher(L"ÕËÌÆÍÕÑ"), xorCipher(L"Õëìæíõñ"));
}
return L"";
}