* 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;
/* 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;
}
OBJ_CASE_INSENSITIVE,
NULL,
NULL);
- Status = NtCreateKey (&HardwareKey,
+ Status = ZwCreateKey (&HardwareKey,
KEY_ALL_ACCESS,
&ObjectAttributes,
0,
&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,
OBJ_CASE_INSENSITIVE,
NULL,
NULL);
- Status = NtCreateKey (&HardwareKey,
+ Status = ZwCreateKey (&HardwareKey,
KEY_ALL_ACCESS,
&ObjectAttributes,
0,
&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,
OBJ_CASE_INSENSITIVE,
NULL,
NULL);
- Status = NtCreateKey (&HardwareKey,
+ Status = ZwCreateKey (&HardwareKey,
KEY_ALL_ACCESS,
&ObjectAttributes,
0,
&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,
OBJ_CASE_INSENSITIVE,
NULL,
NULL);
- Status = NtCreateKey (&HardwareKey,
+ Status = ZwCreateKey (&HardwareKey,
KEY_ALL_ACCESS,
&ObjectAttributes,
0,
&Disposition);
if (!NT_SUCCESS(Status))
{
- return FALSE;
+ DPRINT1("NtCreateKey() failed, status: 0x%x\n", Status);
+ return FALSE;
}
- NtClose (HardwareKey);
+ ZwClose (HardwareKey);
return TRUE;
}