forked from Mirrors/wine-wine
advapi32: Create the service manager registry key if needed.
parent
ee1706035a
commit
53d838a1bf
|
@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(advapi);
|
||||||
|
|
||||||
static const WCHAR szServiceManagerKey[] = { 'S','y','s','t','e','m','\\',
|
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','\\',
|
'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',
|
static const WCHAR szSCMLock[] = {'A','D','V','A','P','I','_','S','C','M',
|
||||||
'L','O','C','K',0};
|
'L','O','C','K',0};
|
||||||
|
|
||||||
|
@ -1010,8 +1010,7 @@ SC_HANDLE WINAPI OpenSCManagerW( LPCWSTR lpMachineName, LPCWSTR lpDatabaseName,
|
||||||
if (r!=ERROR_SUCCESS)
|
if (r!=ERROR_SUCCESS)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
r = RegOpenKeyExW(hReg, szServiceManagerKey,
|
r = RegCreateKeyW(hReg, szServiceManagerKey, &manager->hkey);
|
||||||
0, KEY_ALL_ACCESS, &manager->hkey);
|
|
||||||
RegCloseKey( hReg );
|
RegCloseKey( hReg );
|
||||||
if (r!=ERROR_SUCCESS)
|
if (r!=ERROR_SUCCESS)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Reference in New Issue