Commit 311c0016 authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

ntdll: Implement RtlWriteRegistryValue and forward ntoskrnl to it.

parent 847cc51d
...@@ -910,7 +910,7 @@ ...@@ -910,7 +910,7 @@
@ stub RtlWalkFrameChain @ stub RtlWalkFrameChain
@ stdcall RtlWalkHeap(long ptr) @ stdcall RtlWalkHeap(long ptr)
@ stub RtlWriteMemoryStream @ stub RtlWriteMemoryStream
@ stub RtlWriteRegistryValue @ stdcall RtlWriteRegistryValue(long ptr ptr long ptr long)
@ stub RtlZeroHeap @ stub RtlZeroHeap
@ stdcall RtlZeroMemory(ptr long) @ stdcall RtlZeroMemory(ptr long)
# @ stub RtlZombifyActivationContext # @ stub RtlZombifyActivationContext
......
...@@ -1334,3 +1334,44 @@ NTSTATUS WINAPI RtlDeleteRegistryValue(IN ULONG RelativeTo, IN PCWSTR Path, IN P ...@@ -1334,3 +1334,44 @@ NTSTATUS WINAPI RtlDeleteRegistryValue(IN ULONG RelativeTo, IN PCWSTR Path, IN P
NtClose(handle); NtClose(handle);
return status; return status;
} }
/*************************************************************************
* RtlWriteRegistryValue [NTDLL.@]
*
* Sets the registry value with provided data.
*
* PARAMS
* RelativeTo [I] Registry path that path parameter refers to
* path [I] Path to the key (or handle - see RTL_GetKeyHandle)
* name [I] Name of the registry value to set
* type [I] Type of the registry key to set
* data [I] Pointer to the user data to be set
* length [I] Length of the user data pointed by data
*
* RETURNS
* STATUS_SUCCESS if the specified key is successfully set,
* or an NTSTATUS error code.
*/
NTSTATUS WINAPI RtlWriteRegistryValue( ULONG RelativeTo, PCWSTR path, PCWSTR name,
ULONG type, PVOID data, ULONG length )
{
HANDLE hkey;
NTSTATUS status;
UNICODE_STRING str;
TRACE( "(%d, %s, %s) -> %d: %p [%d]\n", RelativeTo, debugstr_w(path), debugstr_w(name),
type, data, length );
RtlInitUnicodeString( &str, name );
if (RelativeTo == RTL_REGISTRY_HANDLE)
return NtSetValueKey( (HANDLE)path, &str, 0, type, data, length );
status = RTL_GetKeyHandle( RelativeTo, path, &hkey );
if (status != STATUS_SUCCESS) return status;
status = NtSetValueKey( hkey, &str, 0, type, data, length );
NtClose( hkey );
return status;
}
...@@ -1197,7 +1197,7 @@ ...@@ -1197,7 +1197,7 @@
@ stdcall RtlVerifyVersionInfo(ptr long double) ntdll.RtlVerifyVersionInfo @ stdcall RtlVerifyVersionInfo(ptr long double) ntdll.RtlVerifyVersionInfo
@ stub RtlVolumeDeviceToDosName @ stub RtlVolumeDeviceToDosName
@ stub RtlWalkFrameChain @ stub RtlWalkFrameChain
@ stub RtlWriteRegistryValue @ stdcall RtlWriteRegistryValue(long ptr ptr long ptr long) ntdll.RtlWriteRegistryValue
@ stub RtlZeroHeap @ stub RtlZeroHeap
@ stdcall RtlZeroMemory(ptr long) ntdll.RtlZeroMemory @ stdcall RtlZeroMemory(ptr long) ntdll.RtlZeroMemory
@ stdcall RtlxAnsiStringToUnicodeSize(ptr) ntdll.RtlxAnsiStringToUnicodeSize @ stdcall RtlxAnsiStringToUnicodeSize(ptr) ntdll.RtlxAnsiStringToUnicodeSize
......
...@@ -2240,6 +2240,7 @@ BOOLEAN WINAPI RtlValidateHeap(HANDLE,ULONG,LPCVOID); ...@@ -2240,6 +2240,7 @@ BOOLEAN WINAPI RtlValidateHeap(HANDLE,ULONG,LPCVOID);
NTSTATUS WINAPI RtlVerifyVersionInfo(const RTL_OSVERSIONINFOEXW*,DWORD,DWORDLONG); NTSTATUS WINAPI RtlVerifyVersionInfo(const RTL_OSVERSIONINFOEXW*,DWORD,DWORDLONG);
NTSTATUS WINAPI RtlWalkHeap(HANDLE,PVOID); NTSTATUS WINAPI RtlWalkHeap(HANDLE,PVOID);
NTSTATUS WINAPI RtlWriteRegistryValue(ULONG,PCWSTR,PCWSTR,ULONG,PVOID,ULONG);
NTSTATUS WINAPI RtlpNtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG); NTSTATUS WINAPI RtlpNtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,const UNICODE_STRING*,ULONG,PULONG);
NTSTATUS WINAPI RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION *); NTSTATUS WINAPI RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment