Implemented some registry functions.

svn path=/trunk/; revision=1980
This commit is contained in:
Eric Kohl 2001-06-17 22:54:36 +00:00
parent ab5917c0c7
commit c4b00c80d8
5 changed files with 77 additions and 14 deletions

View file

@ -1,4 +1,4 @@
/* $Id: rtl.h,v 1.27 2001/05/27 11:10:25 ekohl Exp $
/* $Id: rtl.h,v 1.28 2001/06/17 22:52:37 ekohl Exp $
*
*/
@ -460,6 +460,32 @@ RtlIsValidIndexHandle (
IN ULONG Index
);
NTSTATUS
STDCALL
RtlpNtCreateKey (
OUT HANDLE KeyHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN ULONG Unused1,
OUT PULONG Disposition,
IN ULONG Unused2
);
NTSTATUS
STDCALL
RtlpNtMakeTemporaryKey (
IN HANDLE KeyHandle
);
NTSTATUS
STDCALL
RtlpNtOpenKey (
OUT HANDLE KeyHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN ULONG Unused
);
#endif /* __INCLUDE_NTDLL_RTL_H */
/* EOF */

View file

@ -1,4 +1,4 @@
; $Id: ntdll.def,v 1.75 2001/06/17 20:05:09 ea Exp $
; $Id: ntdll.def,v 1.76 2001/06/17 22:53:14 ekohl Exp $
;
; ReactOS Operating System
;
@ -593,10 +593,10 @@ RtlValidateProcessHeaps@0
RtlWriteRegistryValue@24
;RtlZeroHeap
RtlZeroMemory@8
;RtlpNtCreateKey
RtlpNtCreateKey@24
;RtlpNtEnumerateSubKey
RtlpNtMakeTemporaryKey@4
;RtlpNtOpenKey
RtlpNtOpenKey@16
;RtlpNtQueryValueKey
;RtlpNtSetValueKey
;RtlpUnWaitCriticalSection

View file

@ -1,4 +1,4 @@
; $Id: ntdll.edf,v 1.64 2001/06/17 20:05:10 ea Exp $
; $Id: ntdll.edf,v 1.65 2001/06/17 22:53:14 ekohl Exp $
;
; ReactOS Operating System
;
@ -592,10 +592,10 @@ RtlValidateProcessHeaps=RtlValidateProcessHeaps@0
RtlWriteRegistryValue=RtlWriteRegistryValue@24
;RtlZeroHeap
RtlZeroMemory=RtlZeroMemory@8
;RtlpNtCreateKey
RtlpNtCreateKey=RtlpNtCreateKey@24
;RtlpNtEnumerateSubKey
RtlpNtMakeTemporaryKey=RtlpNtMakeTemporaryKey@4
;RtlpNtOpenKey
RtlpNtOpenKey=RtlpNtOpenKey@16
;RtlpNtQueryValueKey
;RtlpNtSetValueKey
;RtlpUnWaitCriticalSection

View file

@ -1,4 +1,4 @@
/* $Id: registry.c,v 1.3 2001/05/30 20:00:34 ekohl Exp $
/* $Id: registry.c,v 1.4 2001/06/17 22:53:57 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -100,7 +100,9 @@ RtlDeleteRegistryValue(IN ULONG RelativeTo,
NTSTATUS STDCALL
RtlFormatCurrentUserKeyPath(PUNICODE_STRING KeyPath)
{
return STATUS_UNSUCCESSFUL;
RtlCreateUnicodeString(KeyPath,
L"\\Registry\\User\\.Default");
return STATUS_SUCCESS;
}
/*
@ -292,9 +294,47 @@ RtlWriteRegistryValue(IN ULONG RelativeTo,
NTSTATUS STDCALL
RtlpNtMakeTemporaryKey(HANDLE KeyHandle)
RtlpNtCreateKey(OUT HANDLE KeyHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN ULONG Unused1,
OUT PULONG Disposition,
IN ULONG Unused2)
{
return NtDeleteKey(KeyHandle);
if (ObjectAttributes != NULL)
ObjectAttributes->Attributes &=
~(OBJ_PERMANENT | OBJ_EXCLUSIVE);
return(NtCreateKey(KeyHandle,
DesiredAccess,
ObjectAttributes,
0,
NULL,
0,
Disposition));
}
NTSTATUS STDCALL
RtlpNtMakeTemporaryKey(IN HANDLE KeyHandle)
{
return(NtDeleteKey(KeyHandle));
}
NTSTATUS STDCALL
RtlpNtOpenKey(OUT HANDLE KeyHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN ULONG Unused)
{
if (ObjectAttributes != NULL)
ObjectAttributes->Attributes &=
~(OBJ_PERMANENT | OBJ_EXCLUSIVE);
return(NtOpenKey(KeyHandle,
DesiredAccess,
ObjectAttributes));
}

View file

@ -26,10 +26,7 @@ STUB(PfxRemovePrefix)
STUB(RestoreEm87Context)
STUB(RtlWalkHeap)
STUB(RtlZeroHeap)
STUB(RtlpNtCreateKey)
STUB(RtlpNtEnumerateSubKey)
STUB(RtlpNtMakeTemporaryKey)
STUB(RtlpNtOpenKey)
STUB(RtlpNtQueryValueKey)
STUB(RtlpNtSetValueKey)
STUB(RtlpUnWaitCriticalSection)