forget update de.rc
[reactos.git] / reactos / ntoskrnl / cm / import.c
index 21b9d65..a9da467 100644 (file)
@@ -4,6 +4,7 @@
  * PROJECT:         ReactOS kernel
  * FILE:            ntoskrnl/cm/import.c
  * PURPOSE:         Registry-Hive import functions
+ *
  * PROGRAMMERS:     Eric Kohl
  */
 
 
 #include "cm.h"
 
+#if defined (ALLOC_PRAGMA)
+#pragma alloc_text(INIT, CmImportHardwareHive)
+#endif
+
 /* GLOBALS ******************************************************************/
 
 static BOOLEAN CmiHardwareHiveImported = FALSE;
@@ -196,11 +201,11 @@ CmImportSystemHive(PCHAR ChunkBase,
 
   /* Set the hive filename */
   RtlCreateUnicodeString (&RegistryHive->HiveFileName,
-                         SYSTEM_REG_FILE);
+                          SYSTEM_REG_FILE);
 
   /* Set the log filename */
   RtlCreateUnicodeString (&RegistryHive->LogFileName,
-                         SYSTEM_LOG_FILE);
+                          SYSTEM_LOG_FILE);
 
   return TRUE;
 }
@@ -233,7 +238,7 @@ CmImportHardwareHive(PCHAR ChunkBase,
                                  OBJ_CASE_INSENSITIVE,
                                  NULL,
                                  NULL);
-      Status = NtCreateKey (&HardwareKey,
+      Status = ZwCreateKey (&HardwareKey,
                            KEY_ALL_ACCESS,
                            &ObjectAttributes,
                            0,
@@ -242,9 +247,10 @@ CmImportHardwareHive(PCHAR ChunkBase,
                            &Disposition);
       if (!NT_SUCCESS(Status))
        {
-         return FALSE;
+          DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status);
+          return FALSE;
        }
-      NtClose (HardwareKey);
+      ZwClose (HardwareKey);
 
       /* Create '\Registry\Machine\HARDWARE\DESCRIPTION' key. */
       RtlInitUnicodeString(&KeyName,
@@ -254,7 +260,7 @@ CmImportHardwareHive(PCHAR ChunkBase,
                                  OBJ_CASE_INSENSITIVE,
                                  NULL,
                                  NULL);
-      Status = NtCreateKey (&HardwareKey,
+      Status = ZwCreateKey (&HardwareKey,
                            KEY_ALL_ACCESS,
                            &ObjectAttributes,
                            0,
@@ -263,9 +269,10 @@ CmImportHardwareHive(PCHAR ChunkBase,
                            &Disposition);
       if (!NT_SUCCESS(Status))
        {
-         return FALSE;
+          DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status);
+          return FALSE;
        }
-      NtClose (HardwareKey);
+      ZwClose (HardwareKey);
 
       /* Create '\Registry\Machine\HARDWARE\DEVICEMAP' key. */
       RtlInitUnicodeString (&KeyName,
@@ -275,7 +282,7 @@ CmImportHardwareHive(PCHAR ChunkBase,
                                  OBJ_CASE_INSENSITIVE,
                                  NULL,
                                  NULL);
-      Status = NtCreateKey (&HardwareKey,
+      Status = ZwCreateKey (&HardwareKey,
                            KEY_ALL_ACCESS,
                            &ObjectAttributes,
                            0,
@@ -284,9 +291,10 @@ CmImportHardwareHive(PCHAR ChunkBase,
                            &Disposition);
       if (!NT_SUCCESS(Status))
        {
-         return FALSE;
+          DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status);
+          return FALSE;
        }
-      NtClose (HardwareKey);
+      ZwClose (HardwareKey);
 
       /* Create '\Registry\Machine\HARDWARE\RESOURCEMAP' key. */
       RtlInitUnicodeString(&KeyName,
@@ -296,7 +304,7 @@ CmImportHardwareHive(PCHAR ChunkBase,
                                  OBJ_CASE_INSENSITIVE,
                                  NULL,
                                  NULL);
-      Status = NtCreateKey (&HardwareKey,
+      Status = ZwCreateKey (&HardwareKey,
                            KEY_ALL_ACCESS,
                            &ObjectAttributes,
                            0,
@@ -305,9 +313,10 @@ CmImportHardwareHive(PCHAR ChunkBase,
                            &Disposition);
       if (!NT_SUCCESS(Status))
        {
-         return FALSE;
+          DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status);
+          return FALSE;
        }
-      NtClose (HardwareKey);
+      ZwClose (HardwareKey);
 
       return TRUE;
     }