Added advapi32-RegLoadAppKey patchset

This commit is contained in:
Alistair Leslie-Hughes 2018-11-13 11:52:41 +11:00
parent 9bf2a46f26
commit 461bcc1e5f
3 changed files with 147 additions and 0 deletions

View File

@ -0,0 +1,125 @@
From 2e5608fa5c856c43b40499fb9fb004ecc9a1ba62 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Sun, 23 Oct 2016 16:15:45 -0500
Subject: [PATCH] advapi32: Add RegLoadAppKeyA/RegLoadAppKeyW stubs
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41591
Signed-off-by: Austin English <austinenglish@gmail.com>
---
dlls/advapi32/advapi32.spec | 4 ++--
dlls/advapi32/registry.c | 24 ++++++++++++++++++++++
.../api-ms-win-core-registry-l1-1-0.spec | 4 ++--
.../api-ms-win-downlevel-advapi32-l1-1-0.spec | 4 ++--
dlls/kernelbase/kernelbase.spec | 4 ++--
include/winreg.h | 3 +++
6 files changed, 35 insertions(+), 8 deletions(-)
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
index e870a5d..042a523 100644
--- a/dlls/advapi32/advapi32.spec
+++ b/dlls/advapi32/advapi32.spec
@@ -648,8 +648,8 @@
@ stdcall RegGetKeySecurity(long long ptr ptr)
@ stdcall RegGetValueA(long str str long ptr ptr ptr)
@ stdcall RegGetValueW(long wstr wstr long ptr ptr ptr)
-# @ stub RegLoadAppKeyA
-# @ stub RegLoadAppKeyW
+@ stdcall RegLoadAppKeyA(str ptr long long long)
+@ stdcall RegLoadAppKeyW(wstr ptr long long long)
@ stdcall RegLoadKeyA(long str str)
@ stdcall RegLoadKeyW(long wstr wstr)
@ stdcall RegLoadMUIStringA(long str str long ptr long str)
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index b537f69..012126d 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -3513,3 +3513,27 @@ LONG WINAPI RegDisableReflectionKey(HKEY base)
FIXME("%p: stub\n", base);
return ERROR_SUCCESS;
}
+
+/******************************************************************************
+ * RegLoadAppKeyA [ADVAPI32.@]
+ *
+ */
+LSTATUS WINAPI RegLoadAppKeyA(const char *file, HKEY *result, REGSAM sam, DWORD options, DWORD reserved)
+{
+ FIXME("%s %p %u %u %u: stub\n", wine_dbgstr_a(file), result, sam, options, reserved);
+
+ *result = (HKEY)0xbeefcafe;
+ return ERROR_SUCCESS;
+}
+
+/******************************************************************************
+ * RegLoadAppKeyW [ADVAPI32.@]
+ *
+ */
+LSTATUS WINAPI RegLoadAppKeyW(const WCHAR *file, HKEY *result, REGSAM sam, DWORD options, DWORD reserved)
+{
+ FIXME("%s %p %u %u %u: stub\n", wine_dbgstr_w(file), result, sam, options, reserved);
+
+ *result = (HKEY)0xbeefcafe;
+ return ERROR_SUCCESS;
+}
diff --git a/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec b/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec
index 7a48e3b..cadcb25 100644
--- a/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec
+++ b/dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-registry-l1-1-0.spec
@@ -17,8 +17,8 @@
@ stdcall RegGetKeySecurity(long long ptr ptr) advapi32.RegGetKeySecurity
@ stdcall RegGetValueA(long str str long ptr ptr ptr) advapi32.RegGetValueA
@ stdcall RegGetValueW(long wstr wstr long ptr ptr ptr) advapi32.RegGetValueW
-@ stub RegLoadAppKeyA
-@ stub RegLoadAppKeyW
+@ stdcall RegLoadAppKeyA(wstr ptr long long long) advapi32.RegLoadAppKeyA
+@ stdcall RegLoadAppKeyW(str ptr long long long) advapi32.RegLoadAppKeyW
@ stdcall RegLoadKeyA(long str str) advapi32.RegLoadKeyA
@ stdcall RegLoadKeyW(long wstr wstr) advapi32.RegLoadKeyW
@ stdcall RegLoadMUIStringA(long str str long ptr long str) advapi32.RegLoadMUIStringA
diff --git a/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec b/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec
index 5bdad41..9af9003 100644
--- a/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec
+++ b/dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec
@@ -102,8 +102,8 @@
@ stdcall RegGetKeySecurity(long long ptr ptr) advapi32.RegGetKeySecurity
@ stdcall RegGetValueA(long str str long ptr ptr ptr) advapi32.RegGetValueA
@ stdcall RegGetValueW(long wstr wstr long ptr ptr ptr) advapi32.RegGetValueW
-@ stub RegLoadAppKeyA
-@ stub RegLoadAppKeyW
+@ stdcall RegLoadAppKeyA(wstr ptr long long long) advapi32.RegLoadAppKeyA
+@ stdcall RegLoadAppKeyW(str ptr long long long) advapi32.RegLoadAppKeyW
@ stdcall RegLoadKeyA(long str str) advapi32.RegLoadKeyA
@ stdcall RegLoadKeyW(long wstr wstr) advapi32.RegLoadKeyW
@ stdcall RegLoadMUIStringA(long str str long ptr long str) advapi32.RegLoadMUIStringA
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index f3b4fd1..d6ccbe2 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -1288,8 +1288,8 @@
# @ stub RegKrnResetAppKeyLoaded
# @ stub RegKrnSetDllHasThreadStateGlobal
# @ stub RegKrnSetTermsrvRegistryExtensionFlags
-# @ stub RegLoadAppKeyA
-# @ stub RegLoadAppKeyW
+@ stdcall RegLoadAppKeyA(wstr ptr long long long) advapi32.RegLoadAppKeyA
+@ stdcall RegLoadAppKeyW(str ptr long long long) advapi32.RegLoadAppKeyW
@ stdcall -private RegLoadKeyA(long str str) kernel32.RegLoadKeyA
@ stdcall -private RegLoadKeyW(long wstr wstr) kernel32.RegLoadKeyW
@ stdcall -private RegLoadMUIStringA(long str str long ptr long str) kernel32.RegLoadMUIStringA
diff --git a/include/winreg.h b/include/winreg.h
index 51e9f02..5656eec 100644
--- a/include/winreg.h
+++ b/include/winreg.h
@@ -133,6 +133,9 @@ WINADVAPI LSTATUS WINAPI RegGetKeySecurity(HKEY,SECURITY_INFORMATION,PSECURITY
WINADVAPI LSTATUS WINAPI RegGetValueA(HKEY,LPCSTR,LPCSTR,DWORD,LPDWORD,PVOID,LPDWORD);
WINADVAPI LSTATUS WINAPI RegGetValueW(HKEY,LPCWSTR,LPCWSTR,DWORD,LPDWORD,PVOID,LPDWORD);
#define RegGetValue WINELIB_NAME_AW(RegGetValue)
+WINADVAPI LSTATUS WINAPI RegLoadAppKeyA(const char*,HKEY*,REGSAM,DWORD,DWORD);
+WINADVAPI LSTATUS WINAPI RegLoadAppKeyW(const WCHAR*,HKEY*,REGSAM,DWORD,DWORD);
+#define RegLoadAppKey WINELIB_NAME_AW(RegLoadAppKey)
WINADVAPI LSTATUS WINAPI RegLoadKeyA(HKEY,LPCSTR,LPCSTR);
WINADVAPI LSTATUS WINAPI RegLoadKeyW(HKEY,LPCWSTR,LPCWSTR);
#define RegLoadKey WINELIB_NAME_AW(RegLoadKey)
--
1.9.1

View File

@ -0,0 +1 @@
Fixes: [41591] advapi32: Add RegLoadAppKeyA/RegLoadAppKeyW stubs

View File

@ -89,6 +89,7 @@ patch_enable_all ()
enable_advapi32_CreateRestrictedToken="$1"
enable_advapi32_LsaLookupPrivilegeName="$1"
enable_advapi32_LsaLookupSids="$1"
enable_advapi32_RegLoadAppKey="$1"
enable_advapi32_SetSecurityInfo="$1"
enable_advapi32_Token_Integrity_Level="$1"
enable_api_ms_win_Stub_DLLs="$1"
@ -433,6 +434,9 @@ patch_enable ()
advapi32-LsaLookupSids)
enable_advapi32_LsaLookupSids="$2"
;;
advapi32-RegLoadAppKey)
enable_advapi32_RegLoadAppKey="$2"
;;
advapi32-SetSecurityInfo)
enable_advapi32_SetSecurityInfo="$2"
;;
@ -2415,6 +2419,23 @@ if test "$enable_advapi32_LsaLookupSids" -eq 1; then
) >> "$patchlist"
fi
# Patchset advapi32-RegLoadAppKey
# |
# | This patchset fixes the following Wine bugs:
# | * [#41591] advapi32: Add RegLoadAppKeyA/RegLoadAppKeyW stubs
# |
# | Modified files:
# | * dlls/advapi32/advapi32.spec, dlls/advapi32/registry.c, dlls/api-ms-win-core-registry-l1-1-0/api-ms-win-core-
# | registry-l1-1-0.spec, dlls/api-ms-win-downlevel-advapi32-l1-1-0/api-ms-win-downlevel-advapi32-l1-1-0.spec,
# | dlls/kernelbase/kernelbase.spec
# |
if test "$enable_advapi32_RegLoadAppKey" -eq 1; then
patch_apply advapi32-RegLoadAppKey/0001-advapi32-Add-RegLoadAppKeyA-RegLoadAppKeyW-stubs.patch
(
printf '%s\n' '+ { "Austin English", "advapi32: Add RegLoadAppKeyA/RegLoadAppKeyW stubs.", 1 },';
) >> "$patchlist"
fi
# Patchset advapi32-SetSecurityInfo
# |
# | This patchset fixes the following Wine bugs: