Skip to content
Snippets Groups Projects
Commit 2945a6b5 authored by Danil Martynenko's avatar Danil Martynenko
Browse files

bugs-3405 | Added restart service

parent 981df0cd
No related branches found
No related tags found
1 merge request!41bugs-3405 | Added restart service
#include "registry.h"
#include <shlobj.h>
wchar_t* readRegKey(HKEY hKey, LPCWSTR regSubKey, LPCWSTR val) {
wchar_t *wret = (wchar_t*)malloc(MAX_PATH);
......@@ -131,3 +132,10 @@ wchar_t* getUserSID(LPCWSTR homePath) {
}
return NULL;
}
wchar_t* shGetUsrPath(){
static WCHAR path[MAX_PATH];
memset(path, L'\0', MAX_PATH);
SHGetFolderPathW(NULL, CSIDL_PROFILE, NULL, 0, path);
return path;
}
......@@ -13,6 +13,7 @@ wchar_t* readRegKey(HKEY hKey, LPCWSTR regSubKey, LPCWSTR val);
wchar_t* getTapGUID();
wchar_t* getTapName();
wchar_t* getUserSID(LPCWSTR homePath);
wchar_t* shGetUsrPath();
wchar_t* regWGetUsrPath();
char* regGetUsrPath();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment