Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 317 of file cmconfig.c.
Referenced by CmInitSystem1().
{ NTSTATUS Status; OBJECT_ATTRIBUTES ObjectAttributes; HANDLE KeyHandle; ULONG Disposition; UNICODE_STRING KeyName; /* Setup the key name */ RtlInitUnicodeString(&KeyName, L"\\Registry\\Machine\\Hardware\\DeviceMap"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, NULL, NULL); /* Create the device map key */ Status = NtCreateKey(&KeyHandle, KEY_READ | KEY_WRITE, &ObjectAttributes, 0, NULL, 0, &Disposition); if (!NT_SUCCESS(Status)) return Status; NtClose(KeyHandle); /* Nobody should've created this key yet! */ ASSERT(Disposition == REG_CREATED_NEW_KEY); /* Setup the key name */ RtlInitUnicodeString(&KeyName, L"\\Registry\\Machine\\Hardware\\Description"); InitializeObjectAttributes(&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE, NULL, NULL); /* Create the description key */ Status = NtCreateKey(&KeyHandle, KEY_READ | KEY_WRITE, &ObjectAttributes, 0, NULL, 0, &Disposition); if (!NT_SUCCESS(Status)) return Status; /* Nobody should've created this key yet! */ ASSERT(Disposition == REG_CREATED_NEW_KEY); /* Allocate the configuration data buffer */ CmpConfigurationData = ExAllocatePoolWithTag(PagedPool, CmpConfigurationAreaSize, TAG_CM); if (!CmpConfigurationData) return STATUS_INSUFFICIENT_RESOURCES; /* Check if we got anything from NTLDR */ if (LoaderBlock->ConfigurationRoot) { /* Setup the configuration tree */ Status = CmpSetupConfigurationTree(LoaderBlock->ConfigurationRoot, KeyHandle, -1, -1); } else { /* Nothing else to do */ Status = STATUS_SUCCESS; } /* Close our handle, free the buffer and return status */ ExFreePoolWithTag(CmpConfigurationData, TAG_CM); NtClose(KeyHandle); return Status; }