Skip to content
Snippets Groups Projects
Commit 2b63f75d authored by dmitriy.gerasimov's avatar dmitriy.gerasimov
Browse files

Merge branch 'bugs-3405' into 'master'

bugs-3405 | Added restart service

See merge request libdap!41
parents 981df0cd 2945a6b5
No related branches found
No related tags found
1 merge request!24Support 3689
#include "registry.h" #include "registry.h"
#include <shlobj.h>
wchar_t* readRegKey(HKEY hKey, LPCWSTR regSubKey, LPCWSTR val) { wchar_t* readRegKey(HKEY hKey, LPCWSTR regSubKey, LPCWSTR val) {
wchar_t *wret = (wchar_t*)malloc(MAX_PATH); wchar_t *wret = (wchar_t*)malloc(MAX_PATH);
...@@ -131,3 +132,10 @@ wchar_t* getUserSID(LPCWSTR homePath) { ...@@ -131,3 +132,10 @@ wchar_t* getUserSID(LPCWSTR homePath) {
} }
return NULL; 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); ...@@ -13,6 +13,7 @@ wchar_t* readRegKey(HKEY hKey, LPCWSTR regSubKey, LPCWSTR val);
wchar_t* getTapGUID(); wchar_t* getTapGUID();
wchar_t* getTapName(); wchar_t* getTapName();
wchar_t* getUserSID(LPCWSTR homePath); wchar_t* getUserSID(LPCWSTR homePath);
wchar_t* shGetUsrPath();
wchar_t* regWGetUsrPath(); wchar_t* regWGetUsrPath();
char* regGetUsrPath(); 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