Austin English : advapi32: Add RegLoadAppKeyA/RegLoadAppKeyW stubs.
Alexandre Julliard
julliard at winehq.org
Tue Mar 19 17:09:22 CDT 2019
Module: wine
Branch: master
Commit: acdedf4f0cc9bc877d12a0309bce7b9624cafa58
URL: https://source.winehq.org/git/wine.git/?a=commit;h=acdedf4f0cc9bc877d12a0309bce7b9624cafa58
Author: Austin English <austinenglish at gmail.com>
Date: Thu Mar 7 17:19:43 2019 +0100
advapi32: Add RegLoadAppKeyA/RegLoadAppKeyW stubs.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41591
Signed-off-by: Austin English <austinenglish at gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/advapi32/advapi32.spec | 4 +--
dlls/advapi32/registry.c | 30 ++++++++++++++++++++++
.../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 | 7 +++++
6 files changed, 45 insertions(+), 8 deletions(-)
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
index e996bd2..dd4102e 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 14604e0..9a4c961 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -3514,3 +3514,33 @@ 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);
+
+ if (!file || reserved)
+ return ERROR_INVALID_PARAMETER;
+
+ *result = (HKEY)0xdeadbeef;
+ 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);
+
+ if (!file || reserved)
+ return ERROR_INVALID_PARAMETER;
+
+ *result = (HKEY)0xdeadbeef;
+ 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..f81f027 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(str ptr long long long) advapi32.RegLoadAppKeyA
+@ stdcall RegLoadAppKeyW(wstr 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..b2dcc17 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(str ptr long long long) advapi32.RegLoadAppKeyA
+@ stdcall RegLoadAppKeyW(wstr 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 9a014b2..c43ccce 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(str ptr long long long) advapi32.RegLoadAppKeyA
+@ stdcall RegLoadAppKeyW(wstr 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..45057df 100644
--- a/include/winreg.h
+++ b/include/winreg.h
@@ -84,6 +84,10 @@ typedef LONG LSTATUS;
#define RRF_NOEXPAND (1 << 28)
#define RRF_ZEROONFAILURE (1 << 29)
+#define REG_PROCESS_APPKEY 0x00000001
+
+#define REG_MUI_STRING_TRUNCATE 0x00000001
+
WINADVAPI BOOL WINAPI AbortSystemShutdownA(LPSTR);
WINADVAPI BOOL WINAPI AbortSystemShutdownW(LPWSTR);
#define AbortSystemShutdown WINELIB_NAME_AW(AbortSystemShutdown)
@@ -133,6 +137,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)
More information about the wine-cvs
mailing list