diff --git a/reactos/subsys/system/servman/query.c b/reactos/subsys/system/servman/query.c index 24877d7a771..c78582deb07 100644 --- a/reactos/subsys/system/servman/query.c +++ b/reactos/subsys/system/servman/query.c @@ -32,6 +32,7 @@ RefreshServiceList(VOID) TCHAR szStatus[128]; DWORD NumServices = 0; DWORD Index; + LPCTSTR Path = _T("System\\CurrentControlSet\\Services\\%s"); NumServices = GetServiceList(); @@ -67,7 +68,7 @@ RefreshServiceList(VOID) DWORD dwValueSize; /* open the registry key for the service */ - _sntprintf(buf, 300, _T("System\\CurrentControlSet\\Services\\%s"), + _sntprintf(buf, 300, Path, pServiceStatus[Index].lpServiceName); if( RegOpenKeyEx(HKEY_LOCAL_MACHINE, diff --git a/reactos/subsys/system/servman/servman.c b/reactos/subsys/system/servman/servman.c index fd4a6246b64..4339af8a6d1 100644 --- a/reactos/subsys/system/servman/servman.c +++ b/reactos/subsys/system/servman/servman.c @@ -39,7 +39,8 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) hListView = CreateWindow(WC_LISTVIEW, NULL, - WS_CHILD | WS_VISIBLE | LVS_REPORT | WS_BORDER | LVS_EDITLABELS, + WS_CHILD | WS_VISIBLE | LVS_REPORT | WS_BORDER | + LVS_EDITLABELS | LVS_SORTASCENDING, 0, 0, 0, 0, /* sized via WM_SIZE */ hwnd, (HMENU) IDC_SERVLIST, @@ -196,8 +197,18 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) break; case WM_NOTIFY: + { + LPNMITEMACTIVATE item; + switch (((LPNMHDR) lParam)->code) { + + case NM_DBLCLK: + item = (LPNMITEMACTIVATE) lParam; + PropSheets(hwnd); + + break; + case TTN_GETDISPINFO: { LPTOOLTIPTEXT lpttt; @@ -246,6 +257,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) default: break; } + } break; case WM_CLOSE: diff --git a/reactos/subsys/system/servman/servman.h b/reactos/subsys/system/servman/servman.h index 23ad45e8900..b750e0421af 100644 --- a/reactos/subsys/system/servman/servman.h +++ b/reactos/subsys/system/servman/servman.h @@ -8,6 +8,8 @@ #include #include "resource.h" +#define MAX_KEY_LENGTH 256 + BOOL RefreshServiceList(VOID); BOOL CALLBACK