Module: wine Branch: master Commit: 53d838a1bfd8ad1afaf1b47f0717ca4c2963a2a0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=53d838a1bfd8ad1afaf1b47f07...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Feb 28 20:51:25 2007 +0100
advapi32: Create the service manager registry key if needed.
---
dlls/advapi32/service.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index 9e482df..1cd643f 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(advapi);
static const WCHAR szServiceManagerKey[] = { 'S','y','s','t','e','m','\', 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\', - 'S','e','r','v','i','c','e','s','\',0 }; + 'S','e','r','v','i','c','e','s',0 }; static const WCHAR szSCMLock[] = {'A','D','V','A','P','I','_','S','C','M', 'L','O','C','K',0};
@@ -1010,8 +1010,7 @@ SC_HANDLE WINAPI OpenSCManagerW( LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, if (r!=ERROR_SUCCESS) goto error;
- r = RegOpenKeyExW(hReg, szServiceManagerKey, - 0, KEY_ALL_ACCESS, &manager->hkey); + r = RegCreateKeyW(hReg, szServiceManagerKey, &manager->hkey); RegCloseKey( hReg ); if (r!=ERROR_SUCCESS) goto error;