reactos/reactos/subsys/system/usetup/registry.c

80 lines
2.1 KiB
C
Raw Normal View History

/*
* ReactOS kernel
* Copyright (C) 2003 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/registry.c
* PURPOSE: Registry creation functions
* PROGRAMMER: Eric Kohl
*/
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <ntdll/rtl.h>
#include "usetup.h"
#include "registry.h"
/* FUNCTIONS ****************************************************************/
NTSTATUS
SetupUpdateRegistry(VOID)
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName;
// UNICODE_STRING ValueName;
HANDLE KeyHandle;
NTSTATUS Status;
RtlInitUnicodeStringFromLiteral(&KeyName,
L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
OBJ_CASE_INSENSITIVE,
NULL,
NULL);
Status = NtCreateKey(&KeyHandle,
KEY_ALL_ACCESS,
&ObjectAttributes,
0,
NULL,
REG_OPTION_NON_VOLATILE,
NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
}
NtClose(KeyHandle);
/* FIXME: Create key '\Registry\Machine\System\Setup' */
/* FIXME: Create value 'SetupType' */
/* FIXME: Create value 'SystemSetupInProgress' */
return STATUS_SUCCESS;
}
/* EOF */