Alexandre Julliard : wow64: Add thunks for the registry I/O syscalls.

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


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

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

wow64: Add thunks for the registry I/O syscalls.

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

---

 dlls/wow64/registry.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++
 dlls/wow64/syscall.h  |  6 ++++
 include/winternl.h    |  1 +
 3 files changed, 85 insertions(+)

diff --git a/dlls/wow64/registry.c b/dlls/wow64/registry.c
index 5e649c8e0de..67f8f509df5 100644
--- a/dlls/wow64/registry.c
+++ b/dlls/wow64/registry.c
@@ -142,6 +142,46 @@ NTSTATUS WINAPI wow64_NtEnumerateValueKey( UINT *args )
 }
 
 
+/**********************************************************************
+ *           wow64_NtFlushKey
+ */
+NTSTATUS WINAPI wow64_NtFlushKey( UINT *args )
+{
+    HANDLE handle = get_handle( &args );
+
+    return NtFlushKey( handle );
+}
+
+
+/**********************************************************************
+ *           wow64_NtLoadKey
+ */
+NTSTATUS WINAPI wow64_NtLoadKey( UINT *args )
+{
+    OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args );
+    OBJECT_ATTRIBUTES32 *file32 = get_ptr( &args );
+
+    struct object_attr64 attr, file;
+
+    return NtLoadKey( objattr_32to64( &attr, attr32 ), objattr_32to64( &file, file32 ));
+}
+
+
+/**********************************************************************
+ *           wow64_NtLoadKey2
+ */
+NTSTATUS WINAPI wow64_NtLoadKey2( UINT *args )
+{
+    OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args );
+    OBJECT_ATTRIBUTES32 *file32 = get_ptr( &args );
+    ULONG flags = get_ulong( &args );
+
+    struct object_attr64 attr, file;
+
+    return NtLoadKey2( objattr_32to64( &attr, attr32 ), objattr_32to64( &file, file32 ), flags );
+}
+
+
 /**********************************************************************
  *           wow64_NtOpenKey
  */
@@ -305,6 +345,31 @@ NTSTATUS WINAPI wow64_NtReplaceKey( UINT *args )
 }
 
 
+/**********************************************************************
+ *           wow64_NtRestoreKey
+ */
+NTSTATUS WINAPI wow64_NtRestoreKey( UINT *args )
+{
+    HANDLE key = get_handle( &args );
+    HANDLE file = get_handle( &args );
+    ULONG flags = get_ulong( &args );
+
+    return NtRestoreKey( key, file, flags );
+}
+
+
+/**********************************************************************
+ *           wow64_NtSaveKey
+ */
+NTSTATUS WINAPI wow64_NtSaveKey( UINT *args )
+{
+    HANDLE key = get_handle( &args );
+    HANDLE file = get_handle( &args );
+
+    return NtSaveKey( key, file );
+}
+
+
 /**********************************************************************
  *           wow64_NtSetInformationKey
  */
@@ -335,3 +400,16 @@ NTSTATUS WINAPI wow64_NtSetValueKey( UINT *args )
 
     return NtSetValueKey( handle, unicode_str_32to64( &str, str32 ), index, type, data, count );
 }
+
+
+/**********************************************************************
+ *           wow64_NtUnloadKey
+ */
+NTSTATUS WINAPI wow64_NtUnloadKey( UINT *args )
+{
+    OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args );
+
+    struct object_attr64 attr;
+
+    return NtUnloadKey( objattr_32to64( &attr, attr32 ));
+}
diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h
index 1bab23eaab9..ccb4f02c91e 100644
--- a/dlls/wow64/syscall.h
+++ b/dlls/wow64/syscall.h
@@ -56,8 +56,11 @@
     SYSCALL_ENTRY( NtEnumerateKey ) \
     SYSCALL_ENTRY( NtEnumerateValueKey ) \
     SYSCALL_ENTRY( NtFindAtom ) \
+    SYSCALL_ENTRY( NtFlushKey ) \
     SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \
     SYSCALL_ENTRY( NtListenPort ) \
+    SYSCALL_ENTRY( NtLoadKey ) \
+    SYSCALL_ENTRY( NtLoadKey2 ) \
     SYSCALL_ENTRY( NtMakeTemporaryObject ) \
     SYSCALL_ENTRY( NtOpenDirectoryObject ) \
     SYSCALL_ENTRY( NtOpenEvent ) \
@@ -100,6 +103,8 @@
     SYSCALL_ENTRY( NtReplyWaitReceivePort ) \
     SYSCALL_ENTRY( NtRequestWaitReplyPort ) \
     SYSCALL_ENTRY( NtResetEvent ) \
+    SYSCALL_ENTRY( NtRestoreKey ) \
+    SYSCALL_ENTRY( NtSaveKey ) \
     SYSCALL_ENTRY( NtSecureConnectPort ) \
     SYSCALL_ENTRY( NtSetDefaultLocale ) \
     SYSCALL_ENTRY( NtSetDefaultUILanguage ) \
@@ -114,6 +119,7 @@
     SYSCALL_ENTRY( NtSetValueKey ) \
     SYSCALL_ENTRY( NtSignalAndWaitForSingleObject ) \
     SYSCALL_ENTRY( NtTerminateJobObject ) \
+    SYSCALL_ENTRY( NtUnloadKey ) \
     SYSCALL_ENTRY( NtWaitForDebugEvent ) \
     SYSCALL_ENTRY( NtWaitForKeyedEvent ) \
     SYSCALL_ENTRY( NtWaitForMultipleObjects ) \
diff --git a/include/winternl.h b/include/winternl.h
index 09804a21571..20905486766 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -3879,6 +3879,7 @@ NTSYSAPI NTSTATUS  WINAPI NtIsProcessInJob(HANDLE,HANDLE);
 NTSYSAPI NTSTATUS  WINAPI NtListenPort(HANDLE,PLPC_MESSAGE);
 NTSYSAPI NTSTATUS  WINAPI NtLoadDriver(const UNICODE_STRING *);
 NTSYSAPI NTSTATUS  WINAPI NtLoadKey(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *);
+NTSYSAPI NTSTATUS  WINAPI NtLoadKey2(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *,ULONG);
 NTSYSAPI NTSTATUS  WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN);
 NTSYSAPI NTSTATUS  WINAPI NtLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG);
 NTSYSAPI NTSTATUS  WINAPI NtMakeTemporaryObject(HANDLE);




More information about the wine-cvs mailing list