Commit in reactos/lib/userenv on MAIN
registry.c+9-81.3 -> 1.4
Flush the new user hive after copying.

reactos/lib/userenv
registry.c 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- registry.c	14 Mar 2004 18:15:59 -0000	1.3
+++ registry.c	16 Mar 2004 11:34:51 -0000	1.4
@@ -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
  * PROJECT:         ReactOS system libraries
@@ -86,7 +86,7 @@
 			     NULL,
 			     &LastWrite))
 	    {
-	      DPRINT ("Subkey enumeration failed (Error %lu)\n", GetLastError());
+	      DPRINT1 ("Subkey enumeration failed (Error %lu)\n", GetLastError());
 	      HeapFree (GetProcessHeap (),
 			0,
 			lpNameBuffer);
@@ -103,7 +103,7 @@
 			       &hDstSubKey,
 			       &dwDisposition))
 	    {
-	      DPRINT ("Subkey creation failed (Error %lu)\n", GetLastError());
+	      DPRINT1 ("Subkey creation failed (Error %lu)\n", GetLastError());
 	      HeapFree (GetProcessHeap (),
 			0,
 			lpNameBuffer);
@@ -116,7 +116,7 @@
 			     KEY_READ,
 			     &hSrcSubKey))
 	    {
-	      DPRINT ("Error: %lu\n", GetLastError());
+	      DPRINT1 ("Error: %lu\n", GetLastError());
 	      RegCloseKey (hDstSubKey);
 	      HeapFree (GetProcessHeap (),
 			0,
@@ -127,7 +127,7 @@
 	  if (!CopyKey (hDstSubKey,
 			hSrcSubKey))
 	    {
-	      DPRINT ("Error: %lu\n", GetLastError());
+	      DPRINT1 ("Error: %lu\n", GetLastError());
 	      RegCloseKey (hSrcSubKey);
 	      RegCloseKey (hDstSubKey);
 	      HeapFree (GetProcessHeap (),
@@ -153,7 +153,7 @@
 				dwMaxValueNameLength * sizeof(WCHAR));
       if (lpNameBuffer == NULL)
 	{
-	  DPRINT ("Buffer allocation failed\n");
+	  DPRINT1 ("Buffer allocation failed\n");
 	  return FALSE;
 	}
 
@@ -162,7 +162,7 @@
 				dwMaxValueLength);
       if (lpDataBuffer == NULL)
 	{
-	  DPRINT ("Buffer allocation failed\n");
+	  DPRINT1 ("Buffer allocation failed\n");
 	  HeapFree (GetProcessHeap (),
 		    0,
 		    lpNameBuffer);
@@ -234,7 +234,6 @@
 
   DPRINT ("CreateUserHive(%S) called\n", lpKeyName);
 
-
   if (RegOpenKeyExW (HKEY_USERS,
 		     L".Default",
 		     0,
@@ -259,6 +258,8 @@
   bResult = CopyKey (hUserKey,
 		     hDefaultKey);
 
+  RegFlushKey (hUserKey);
+
   RegCloseKey (hUserKey);
   RegCloseKey (hDefaultKey);
 
CVSspam 0.2.8