[ros-diffs] [gedmurphy] 28668: - remove the last of the reactos hacks of reading directly from the service's registry keys. - servman appears to be broken in reactos at the moment, but it is actually implemented correctly now. It awaits widl / rpcrt4 updates and a working services.exe.
gedmurphy at svn.reactos.org
gedmurphy at svn.reactos.org
Thu Aug 30 11:29:46 CEST 2007
Author: gedmurphy
Date: Thu Aug 30 13:29:45 2007
New Revision: 28668
URL: http://svn.reactos.org/svn/reactos?rev=28668&view=rev
Log:
- remove the last of the reactos hacks of reading directly from the service's registry keys.
- servman appears to be broken in reactos at the moment, but it is actually implemented correctly now. It awaits widl / rpcrt4 updates and a working services.exe.
Removed:
trunk/reactos/base/applications/mscutils/servman/reg.c
Modified:
trunk/reactos/base/applications/mscutils/servman/servman.rbuild
Removed: trunk/reactos/base/applications/mscutils/servman/reg.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils/servman/reg.c?rev=28667&view=auto
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/reg.c (original)
+++ trunk/reactos/base/applications/mscutils/servman/reg.c (removed)
@@ -1,59 +1,0 @@
-/*
- * PROJECT: ReactOS Services
- * LICENSE: GPL - See COPYING in the top level directory
- * FILE: base/applications/mscutils/servman/reg.c
- * PURPOSE: functions for querying a services registry key
- * COPYRIGHT: Copyright 2007 Ged Murphy <gedmurphy at reactos.org>
- *
- */
-
-#include "precomp.h"
-
-static HKEY
-OpenServiceKey(LPTSTR lpServiceName)
-{
- HKEY hKey = NULL;
- LPCTSTR Path = _T("System\\CurrentControlSet\\Services\\%s");
- TCHAR buf[300];
-
- _sntprintf(buf, sizeof(buf) / sizeof(TCHAR), Path, lpServiceName);
- if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
- buf,
- 0,
- KEY_READ,
- &hKey) == ERROR_SUCCESS)
- {
- return hKey;
- }
- else
- {
- return NULL;
- }
-}
-
-BOOL
-SetDescription(LPTSTR lpServiceName,
- LPTSTR lpDescription)
-{
- HKEY hKey;
- TCHAR szBuf[MAX_PATH];
- BOOL bRet = FALSE;
-
- hKey = OpenServiceKey(lpServiceName);
- if (hKey)
- {
- if (RegSetValueEx(hKey,
- _T("Description"),
- 0,
- REG_SZ,
- (LPBYTE)lpDescription,
- (DWORD)(_tcslen(szBuf) + 1 ) * sizeof(TCHAR)) == ERROR_SUCCESS)
- {
- bRet = TRUE;
- }
-
- RegCloseKey(hKey);
- }
-
- return bRet;
-}
Modified: trunk/reactos/base/applications/mscutils/servman/servman.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils/servman/servman.rbuild?rev=28668&r1=28667&r2=28668&view=diff
==============================================================================
--- trunk/reactos/base/applications/mscutils/servman/servman.rbuild (original)
+++ trunk/reactos/base/applications/mscutils/servman/servman.rbuild Thu Aug 30 13:29:45 2007
@@ -26,7 +26,6 @@
<file>progress.c</file>
<file>propsheet.c</file>
<file>query.c</file>
- <file>reg.c</file>
<file>servman.c</file>
<file>start.c</file>
</compilationunit>
More information about the Ros-diffs
mailing list