mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Flush the new user hive after copying.
svn path=/trunk/; revision=8764
This commit is contained in:
parent
1a75a2261c
commit
bf87266d08
1 changed files with 9 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: registry.c,v 1.3 2004/03/14 18:15:59 ekohl Exp $
|
/* $Id: registry.c,v 1.4 2004/03/16 11:34:51 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -86,7 +86,7 @@ CopyKey (HKEY hDstKey,
|
||||||
NULL,
|
NULL,
|
||||||
&LastWrite))
|
&LastWrite))
|
||||||
{
|
{
|
||||||
DPRINT ("Subkey enumeration failed (Error %lu)\n", GetLastError());
|
DPRINT1 ("Subkey enumeration failed (Error %lu)\n", GetLastError());
|
||||||
HeapFree (GetProcessHeap (),
|
HeapFree (GetProcessHeap (),
|
||||||
0,
|
0,
|
||||||
lpNameBuffer);
|
lpNameBuffer);
|
||||||
|
@ -103,7 +103,7 @@ CopyKey (HKEY hDstKey,
|
||||||
&hDstSubKey,
|
&hDstSubKey,
|
||||||
&dwDisposition))
|
&dwDisposition))
|
||||||
{
|
{
|
||||||
DPRINT ("Subkey creation failed (Error %lu)\n", GetLastError());
|
DPRINT1 ("Subkey creation failed (Error %lu)\n", GetLastError());
|
||||||
HeapFree (GetProcessHeap (),
|
HeapFree (GetProcessHeap (),
|
||||||
0,
|
0,
|
||||||
lpNameBuffer);
|
lpNameBuffer);
|
||||||
|
@ -116,7 +116,7 @@ CopyKey (HKEY hDstKey,
|
||||||
KEY_READ,
|
KEY_READ,
|
||||||
&hSrcSubKey))
|
&hSrcSubKey))
|
||||||
{
|
{
|
||||||
DPRINT ("Error: %lu\n", GetLastError());
|
DPRINT1 ("Error: %lu\n", GetLastError());
|
||||||
RegCloseKey (hDstSubKey);
|
RegCloseKey (hDstSubKey);
|
||||||
HeapFree (GetProcessHeap (),
|
HeapFree (GetProcessHeap (),
|
||||||
0,
|
0,
|
||||||
|
@ -127,7 +127,7 @@ CopyKey (HKEY hDstKey,
|
||||||
if (!CopyKey (hDstSubKey,
|
if (!CopyKey (hDstSubKey,
|
||||||
hSrcSubKey))
|
hSrcSubKey))
|
||||||
{
|
{
|
||||||
DPRINT ("Error: %lu\n", GetLastError());
|
DPRINT1 ("Error: %lu\n", GetLastError());
|
||||||
RegCloseKey (hSrcSubKey);
|
RegCloseKey (hSrcSubKey);
|
||||||
RegCloseKey (hDstSubKey);
|
RegCloseKey (hDstSubKey);
|
||||||
HeapFree (GetProcessHeap (),
|
HeapFree (GetProcessHeap (),
|
||||||
|
@ -153,7 +153,7 @@ CopyKey (HKEY hDstKey,
|
||||||
dwMaxValueNameLength * sizeof(WCHAR));
|
dwMaxValueNameLength * sizeof(WCHAR));
|
||||||
if (lpNameBuffer == NULL)
|
if (lpNameBuffer == NULL)
|
||||||
{
|
{
|
||||||
DPRINT ("Buffer allocation failed\n");
|
DPRINT1 ("Buffer allocation failed\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ CopyKey (HKEY hDstKey,
|
||||||
dwMaxValueLength);
|
dwMaxValueLength);
|
||||||
if (lpDataBuffer == NULL)
|
if (lpDataBuffer == NULL)
|
||||||
{
|
{
|
||||||
DPRINT ("Buffer allocation failed\n");
|
DPRINT1 ("Buffer allocation failed\n");
|
||||||
HeapFree (GetProcessHeap (),
|
HeapFree (GetProcessHeap (),
|
||||||
0,
|
0,
|
||||||
lpNameBuffer);
|
lpNameBuffer);
|
||||||
|
@ -234,7 +234,6 @@ CreateUserHive (LPCWSTR lpKeyName)
|
||||||
|
|
||||||
DPRINT ("CreateUserHive(%S) called\n", lpKeyName);
|
DPRINT ("CreateUserHive(%S) called\n", lpKeyName);
|
||||||
|
|
||||||
|
|
||||||
if (RegOpenKeyExW (HKEY_USERS,
|
if (RegOpenKeyExW (HKEY_USERS,
|
||||||
L".Default",
|
L".Default",
|
||||||
0,
|
0,
|
||||||
|
@ -259,6 +258,8 @@ CreateUserHive (LPCWSTR lpKeyName)
|
||||||
bResult = CopyKey (hUserKey,
|
bResult = CopyKey (hUserKey,
|
||||||
hDefaultKey);
|
hDefaultKey);
|
||||||
|
|
||||||
|
RegFlushKey (hUserKey);
|
||||||
|
|
||||||
RegCloseKey (hUserKey);
|
RegCloseKey (hUserKey);
|
||||||
RegCloseKey (hDefaultKey);
|
RegCloseKey (hDefaultKey);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue