mirror of
https://github.com/reactos/reactos.git
synced 2024-11-07 15:10:53 +00:00
- 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. svn path=/trunk/; revision=28668
This commit is contained in:
parent
7395ac2cc6
commit
1bf6653228
2 changed files with 0 additions and 60 deletions
|
@ -1,59 +0,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@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;
|
||||
}
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue