Alexandre Julliard : wow64: Add thunks for the registry value syscalls.

Alexandre Julliard julliard at winehq.org
Mon Jul 26 15:30:28 CDT 2021


Module: wine
Branch: master
Commit: 44eac1543ef7a4fef604adaa71b717b5cbaac619
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=44eac1543ef7a4fef604adaa71b717b5cbaac619

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jul 26 13:47:07 2021 +0200

wow64: Add thunks for the registry value syscalls.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wow64/registry.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++
 dlls/wow64/syscall.h  |  5 +++
 2 files changed, 91 insertions(+)

diff --git a/dlls/wow64/registry.c b/dlls/wow64/registry.c
index 435c7669c28..5e649c8e0de 100644
--- a/dlls/wow64/registry.c
+++ b/dlls/wow64/registry.c
@@ -27,6 +27,9 @@
 #include "winnt.h"
 #include "winternl.h"
 #include "wow64_private.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(wow);
 
 
 /**********************************************************************
@@ -93,6 +96,20 @@ NTSTATUS WINAPI wow64_NtDeleteKey( UINT *args )
 }
 
 
+/**********************************************************************
+ *           wow64_NtDeleteValueKey
+ */
+NTSTATUS WINAPI wow64_NtDeleteValueKey( UINT *args )
+{
+    HANDLE handle = get_handle( &args );
+    UNICODE_STRING32 *str32 = get_ptr( &args );
+
+    UNICODE_STRING str;
+
+    return NtDeleteValueKey( handle, unicode_str_32to64( &str, str32 ));
+}
+
+
 /**********************************************************************
  *           wow64_NtEnumerateKey
  */
@@ -109,6 +126,22 @@ NTSTATUS WINAPI wow64_NtEnumerateKey( UINT *args )
 }
 
 
+/**********************************************************************
+ *           wow64_NtEnumerateValueKey
+ */
+NTSTATUS WINAPI wow64_NtEnumerateValueKey( UINT *args )
+{
+    HANDLE handle = get_handle( &args );
+    ULONG index = get_ulong( &args );
+    KEY_VALUE_INFORMATION_CLASS class = get_ulong( &args );
+    void *ptr = get_ptr( &args );
+    ULONG len = get_ulong( &args );
+    ULONG *retlen = get_ptr( &args );
+
+    return NtEnumerateValueKey( handle, index, class, ptr, len, retlen );
+}
+
+
 /**********************************************************************
  *           wow64_NtOpenKey
  */
@@ -208,6 +241,41 @@ NTSTATUS WINAPI wow64_NtQueryKey( UINT *args )
 }
 
 
+/**********************************************************************
+ *           wow64_NtQueryMultipleValueKey
+ */
+NTSTATUS WINAPI wow64_NtQueryMultipleValueKey( UINT *args )
+{
+    HANDLE handle = get_handle( &args );
+    KEY_MULTIPLE_VALUE_INFORMATION *info = get_ptr( &args );
+    ULONG count = get_ulong( &args );
+    void *ptr = get_ptr( &args );
+    ULONG len = get_ulong( &args );
+    ULONG *retlen = get_ptr( &args );
+
+    FIXME( "%p %p %u %p %u %p: stub\n", handle, info, count, ptr, len, retlen );
+    return STATUS_SUCCESS;
+}
+
+
+/**********************************************************************
+ *           wow64_NtQueryValueKey
+ */
+NTSTATUS WINAPI wow64_NtQueryValueKey( UINT *args )
+{
+    HANDLE handle = get_handle( &args );
+    UNICODE_STRING32 *str32 = get_ptr( &args );
+    KEY_VALUE_INFORMATION_CLASS class = get_ulong( &args );
+    void *ptr = get_ptr( &args );
+    ULONG len = get_ulong( &args );
+    ULONG *retlen = get_ptr( &args );
+
+    UNICODE_STRING str;
+
+    return NtQueryValueKey( handle, unicode_str_32to64( &str, str32 ), class, ptr, len, retlen );
+}
+
+
 /**********************************************************************
  *           wow64_NtRenameKey
  */
@@ -249,3 +317,21 @@ NTSTATUS WINAPI wow64_NtSetInformationKey( UINT *args )
 
     return NtSetInformationKey( handle, class, info, len );
 }
+
+
+/**********************************************************************
+ *           wow64_NtSetValueKey
+ */
+NTSTATUS WINAPI wow64_NtSetValueKey( UINT *args )
+{
+    HANDLE handle = get_handle( &args );
+    const UNICODE_STRING32 *str32 = get_ptr( &args );
+    ULONG index = get_ulong( &args );
+    ULONG type = get_ulong( &args );
+    const void *data = get_ptr( &args );
+    ULONG count = get_ulong( &args );
+
+    UNICODE_STRING str;
+
+    return NtSetValueKey( handle, unicode_str_32to64( &str, str32 ), index, type, data, count );
+}
diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h
index cf579576839..1bab23eaab9 100644
--- a/dlls/wow64/syscall.h
+++ b/dlls/wow64/syscall.h
@@ -51,8 +51,10 @@
     SYSCALL_ENTRY( NtDelayExecution ) \
     SYSCALL_ENTRY( NtDeleteAtom ) \
     SYSCALL_ENTRY( NtDeleteKey ) \
+    SYSCALL_ENTRY( NtDeleteValueKey ) \
     SYSCALL_ENTRY( NtDuplicateObject ) \
     SYSCALL_ENTRY( NtEnumerateKey ) \
+    SYSCALL_ENTRY( NtEnumerateValueKey ) \
     SYSCALL_ENTRY( NtFindAtom ) \
     SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \
     SYSCALL_ENTRY( NtListenPort ) \
@@ -80,6 +82,7 @@
     SYSCALL_ENTRY( NtQueryInstallUILanguage ) \
     SYSCALL_ENTRY( NtQueryIoCompletion ) \
     SYSCALL_ENTRY( NtQueryKey ) \
+    SYSCALL_ENTRY( NtQueryMultipleValueKey ) \
     SYSCALL_ENTRY( NtQueryMutant ) \
     SYSCALL_ENTRY( NtQueryObject ) \
     SYSCALL_ENTRY( NtQueryPerformanceCounter ) \
@@ -88,6 +91,7 @@
     SYSCALL_ENTRY( NtQuerySymbolicLinkObject ) \
     SYSCALL_ENTRY( NtQueryTimer ) \
     SYSCALL_ENTRY( NtQueryTimerResolution ) \
+    SYSCALL_ENTRY( NtQueryValueKey ) \
     SYSCALL_ENTRY( NtReleaseKeyedEvent ) \
     SYSCALL_ENTRY( NtReleaseMutant ) \
     SYSCALL_ENTRY( NtReleaseSemaphore ) \
@@ -107,6 +111,7 @@
     SYSCALL_ENTRY( NtSetPowerRequest ) \
     SYSCALL_ENTRY( NtSetTimer ) \
     SYSCALL_ENTRY( NtSetTimerResolution ) \
+    SYSCALL_ENTRY( NtSetValueKey ) \
     SYSCALL_ENTRY( NtSignalAndWaitForSingleObject ) \
     SYSCALL_ENTRY( NtTerminateJobObject ) \
     SYSCALL_ENTRY( NtWaitForDebugEvent ) \




More information about the wine-cvs mailing list