mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Implemented RtlOpenCurrentUser().
svn path=/trunk/; revision=1988
This commit is contained in:
parent
439bc219e0
commit
76f1b8fa3c
4 changed files with 107 additions and 43 deletions
|
@ -1,4 +1,4 @@
|
|||
; $Id: ntdll.def,v 1.76 2001/06/17 22:53:14 ekohl Exp $
|
||||
; $Id: ntdll.def,v 1.77 2001/06/18 18:37:12 ekohl Exp $
|
||||
;
|
||||
; ReactOS Operating System
|
||||
;
|
||||
|
@ -491,7 +491,7 @@ RtlNumberOfSetBits@4
|
|||
RtlOemStringToUnicodeSize@4
|
||||
RtlOemStringToUnicodeString@12
|
||||
RtlOemToUnicodeN@20
|
||||
;RtlOpenCurrentUser
|
||||
RtlOpenCurrentUser@8
|
||||
;RtlPcToFileHeader
|
||||
RtlPinAtomInAtomTable@8
|
||||
RtlPrefixString@12
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; $Id: ntdll.edf,v 1.65 2001/06/17 22:53:14 ekohl Exp $
|
||||
; $Id: ntdll.edf,v 1.66 2001/06/18 18:37:12 ekohl Exp $
|
||||
;
|
||||
; ReactOS Operating System
|
||||
;
|
||||
|
@ -490,7 +490,7 @@ RtlNumberOfSetBits=RtlNumberOfSetBits@4
|
|||
RtlOemStringToUnicodeSize=RtlOemStringToUnicodeSize@4
|
||||
RtlOemStringToUnicodeString=RtlOemStringToUnicodeString@12
|
||||
RtlOemToUnicodeN=RtlOemToUnicodeN@20
|
||||
;RtlOpenCurrentUser
|
||||
RtlOpenCurrentUser=RtlOpenCurrentUser@8
|
||||
;RtlPcToFileHeader
|
||||
RtlPinAtomInAtomTable=RtlPinAtomInAtomTable@8
|
||||
RtlPrefixString=RtlPrefixString@12
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: registry.c,v 1.4 2001/06/17 22:53:57 ekohl Exp $
|
||||
/* $Id: registry.c,v 1.5 2001/06/18 18:36:32 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -100,18 +100,51 @@ RtlDeleteRegistryValue(IN ULONG RelativeTo,
|
|||
NTSTATUS STDCALL
|
||||
RtlFormatCurrentUserKeyPath(PUNICODE_STRING KeyPath)
|
||||
{
|
||||
/* FIXME: !!! */
|
||||
RtlCreateUnicodeString(KeyPath,
|
||||
L"\\Registry\\User\\.Default");
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
NTSTATUS STDCALL
|
||||
RtlOpenCurrentUser(...)
|
||||
{
|
||||
|
||||
NTSTATUS STDCALL
|
||||
RtlOpenCurrentUser(IN ACCESS_MASK DesiredAccess,
|
||||
OUT PHANDLE KeyHandle)
|
||||
{
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
UNICODE_STRING KeyPath;
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = RtlFormatCurrentUserKeyPath(&KeyPath);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyPath,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
NULL,
|
||||
NULL);
|
||||
Status = NtOpenKey(KeyHandle,
|
||||
DesiredAccess,
|
||||
&ObjectAttributes);
|
||||
RtlFreeUnicodeString(&KeyPath);
|
||||
if (NT_SUCCESS(Status))
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
RtlInitUnicodeString(&KeyPath,
|
||||
L"\\Registry\\User\\.Default");
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyPath,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
NULL,
|
||||
NULL);
|
||||
Status = NtOpenKey(KeyHandle,
|
||||
DesiredAccess,
|
||||
&ObjectAttributes);
|
||||
return(Status);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
NTSTATUS STDCALL
|
||||
RtlQueryRegistryValues(IN ULONG RelativeTo,
|
||||
|
|
|
@ -28,12 +28,9 @@ RtlCheckRegistryKey(IN ULONG RelativeTo,
|
|||
}
|
||||
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
RtlCreateRegistryKey (
|
||||
IN ULONG RelativeTo,
|
||||
IN PWSTR Path
|
||||
)
|
||||
NTSTATUS STDCALL
|
||||
RtlCreateRegistryKey(IN ULONG RelativeTo,
|
||||
IN PWSTR Path)
|
||||
{
|
||||
HANDLE KeyHandle;
|
||||
NTSTATUS Status;
|
||||
|
@ -51,13 +48,10 @@ RtlCreateRegistryKey (
|
|||
}
|
||||
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
RtlDeleteRegistryValue (
|
||||
IN ULONG RelativeTo,
|
||||
IN PWSTR Path,
|
||||
IN PWSTR ValueName
|
||||
)
|
||||
NTSTATUS STDCALL
|
||||
RtlDeleteRegistryValue(IN ULONG RelativeTo,
|
||||
IN PWSTR Path,
|
||||
IN PWSTR ValueName)
|
||||
{
|
||||
HANDLE KeyHandle;
|
||||
NTSTATUS Status;
|
||||
|
@ -82,30 +76,63 @@ RtlDeleteRegistryValue (
|
|||
}
|
||||
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
RtlQueryRegistryValues (
|
||||
IN ULONG RelativeTo,
|
||||
IN PWSTR Path,
|
||||
IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
|
||||
IN PVOID Context,
|
||||
IN PVOID Environment
|
||||
)
|
||||
NTSTATUS STDCALL
|
||||
RtlOpenCurrentUser(IN ACCESS_MASK DesiredAccess,
|
||||
OUT PHANDLE KeyHandle)
|
||||
{
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
UNICODE_STRING KeyPath;
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = RtlFormatCurrentUserKeyPath(&KeyPath);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyPath,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
NULL,
|
||||
NULL);
|
||||
Status = NtOpenKey(KeyHandle,
|
||||
DesiredAccess,
|
||||
&ObjectAttributes);
|
||||
RtlFreeUnicodeString(&KeyPath);
|
||||
if (NT_SUCCESS(Status))
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
RtlInitUnicodeString(&KeyPath,
|
||||
L"\\Registry\\User\\.Default");
|
||||
|
||||
InitializeObjectAttributes(&ObjectAttributes,
|
||||
&KeyPath,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
NULL,
|
||||
NULL);
|
||||
Status = NtOpenKey(KeyHandle,
|
||||
DesiredAccess,
|
||||
&ObjectAttributes);
|
||||
return(Status);
|
||||
}
|
||||
|
||||
|
||||
NTSTATUS STDCALL
|
||||
RtlQueryRegistryValues(IN ULONG RelativeTo,
|
||||
IN PWSTR Path,
|
||||
IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
|
||||
IN PVOID Context,
|
||||
IN PVOID Environment)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
RtlWriteRegistryValue (
|
||||
IN ULONG RelativeTo,
|
||||
IN PWSTR Path,
|
||||
IN PWSTR ValueName,
|
||||
IN ULONG ValueType,
|
||||
IN PVOID ValueData,
|
||||
IN ULONG ValueLength
|
||||
)
|
||||
NTSTATUS STDCALL
|
||||
RtlWriteRegistryValue(IN ULONG RelativeTo,
|
||||
IN PWSTR Path,
|
||||
IN PWSTR ValueName,
|
||||
IN ULONG ValueType,
|
||||
IN PVOID ValueData,
|
||||
IN ULONG ValueLength)
|
||||
{
|
||||
HANDLE KeyHandle;
|
||||
NTSTATUS Status;
|
||||
|
@ -136,7 +163,11 @@ RtlWriteRegistryValue (
|
|||
NTSTATUS STDCALL
|
||||
RtlFormatCurrentUserKeyPath(IN OUT PUNICODE_STRING KeyPath)
|
||||
{
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
/* FIXME: !!! */
|
||||
RtlCreateUnicodeString(KeyPath,
|
||||
L"\\Registry\\User\\.Default");
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* ------------------------------------------ Private Implementation */
|
||||
|
|
Loading…
Reference in a new issue