From acdedf4f0cc9bc877d12a0309bce7b9624cafa58 Mon Sep 17 00:00:00 2001 From: Austin English Date: Thu, 7 Mar 2019 17:19:43 +0100 Subject: [PATCH] advapi32: Add RegLoadAppKeyA/RegLoadAppKeyW stubs. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41591 Signed-off-by: Austin English Signed-off-by: Vijay Kiran Kamuju Signed-off-by: Alexandre Julliard --- 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 e996bd2017e..dd4102ebba0 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 14604e010e3..9a4c961343b 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 7a48e3b9899..f81f027e88e 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 5bdad41d2c2..b2dcc17cb3c 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 9a014b2d3dc..c43ccceedc7 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 51e9f02c3a6..45057df7020 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)