Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=57962
-- v2: kernelbase: Add GetCurrentApplicationUserModelId.
From: Louis Lenders xerox.xerox2000x@gmail.com
--- configure | 2 ++ configure.ac | 1 + dlls/cryptbase/Makefile.in | 3 +++ dlls/cryptbase/cryptbase.spec | 11 +++++++++++ 4 files changed, 17 insertions(+) create mode 100644 dlls/cryptbase/Makefile.in create mode 100644 dlls/cryptbase/cryptbase.spec
diff --git a/configure b/configure index 08e7a3f7077..ef7c99dd8e8 100755 --- a/configure +++ b/configure @@ -1025,6 +1025,7 @@ enable_coremessaging enable_credui enable_crtdll enable_crypt32 +enable_cryptbase enable_cryptdlg enable_cryptdll enable_cryptext @@ -22179,6 +22180,7 @@ wine_fn_config_makefile dlls/credui/tests enable_tests wine_fn_config_makefile dlls/crtdll enable_crtdll wine_fn_config_makefile dlls/crypt32 enable_crypt32 wine_fn_config_makefile dlls/crypt32/tests enable_tests +wine_fn_config_makefile dlls/cryptbase enable_cryptbase wine_fn_config_makefile dlls/cryptdlg enable_cryptdlg wine_fn_config_makefile dlls/cryptdll enable_cryptdll wine_fn_config_makefile dlls/cryptext enable_cryptext diff --git a/configure.ac b/configure.ac index 306cbe03146..274591f5f53 100644 --- a/configure.ac +++ b/configure.ac @@ -2473,6 +2473,7 @@ WINE_CONFIG_MAKEFILE(dlls/credui/tests) WINE_CONFIG_MAKEFILE(dlls/crtdll) WINE_CONFIG_MAKEFILE(dlls/crypt32) WINE_CONFIG_MAKEFILE(dlls/crypt32/tests) +WINE_CONFIG_MAKEFILE(dlls/cryptbase) WINE_CONFIG_MAKEFILE(dlls/cryptdlg) WINE_CONFIG_MAKEFILE(dlls/cryptdll) WINE_CONFIG_MAKEFILE(dlls/cryptext) diff --git a/dlls/cryptbase/Makefile.in b/dlls/cryptbase/Makefile.in new file mode 100644 index 00000000000..c3db9737315 --- /dev/null +++ b/dlls/cryptbase/Makefile.in @@ -0,0 +1,3 @@ +MODULE = cryptbase.dll + +IMPORTS = advapi32 diff --git a/dlls/cryptbase/cryptbase.spec b/dlls/cryptbase/cryptbase.spec new file mode 100644 index 00000000000..40a641c77fd --- /dev/null +++ b/dlls/cryptbase/cryptbase.spec @@ -0,0 +1,11 @@ +@ stdcall -import SystemFunction001(ptr ptr ptr) +@ stdcall -import SystemFunction002(ptr ptr ptr) +@ stdcall -import SystemFunction003(ptr ptr) +@ stdcall -import SystemFunction004(ptr ptr ptr) +@ stdcall -import SystemFunction005(ptr ptr ptr) +@ stub SystemFunction028 +@ stub SystemFunction029 +@ stub SystemFunction034 +@ stdcall -import SystemFunction036(ptr long) +@ stdcall -import SystemFunction040(ptr long long) +@ stdcall -import SystemFunction041(ptr long long)
From: Louis Lenders xerox.xerox2000x@gmail.com
--- dlls/kernel32/kernel32.spec | 1 + dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/version.c | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 0739898b2e6..caa6c92b653 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -634,6 +634,7 @@ @ stdcall -import GetCurrentConsoleFontEx(long long ptr) @ stdcall -import GetCurrentDirectoryA(long ptr) @ stdcall -import GetCurrentDirectoryW(long ptr) +@ stdcall GetCurrentApplicationUserModelId(ptr ptr) kernelbase.GetCurrentApplicationUserModelId @ stdcall GetCurrentPackageFamilyName(ptr ptr) kernelbase.GetCurrentPackageFamilyName @ stdcall GetCurrentPackageFullName(ptr ptr) kernelbase.GetCurrentPackageFullName @ stdcall GetCurrentPackageId(ptr ptr) kernelbase.GetCurrentPackageId diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 8e3d269ca47..d11a4417d48 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -481,7 +481,7 @@ @ stdcall GetCurrencyFormatEx(wstr long wstr ptr ptr long) @ stdcall GetCurrencyFormatW(long long wstr ptr ptr long) @ stdcall GetCurrentActCtx(ptr) -# @ stub GetCurrentApplicationUserModelId +@ stdcall GetCurrentApplicationUserModelId(ptr ptr) @ stdcall GetCurrentConsoleFont(long long ptr) @ stdcall GetCurrentConsoleFontEx(long long ptr) @ stdcall GetCurrentDirectoryA(long ptr) diff --git a/dlls/kernelbase/version.c b/dlls/kernelbase/version.c index 2e7cc254334..f1aa1dd94ea 100644 --- a/dlls/kernelbase/version.c +++ b/dlls/kernelbase/version.c @@ -1547,6 +1547,14 @@ BOOL WINAPI GetVersionExW( OSVERSIONINFOW *info ) return TRUE; }
+/*********************************************************************** + * GetCurrentApplicationUserModelId (kernelbase.@) + */ +LONG WINAPI /* DECLSPEC_HOTPATCH */ GetCurrentApplicationUserModelId( UINT32 *length, WCHAR *id ) +{ + FIXME( "(%p %p): stub\n", length, id ); + return APPMODEL_ERROR_NO_APPLICATION; +}
/*********************************************************************** * GetCurrentPackageFamilyName (kernelbase.@)
I saw it was done like so in cryptsp.dll that also contains those Systemfunctions. Is that the other way around too then?
On Fri Mar 14 11:46:11 2025 +0000, Louis Lenders wrote:
I saw it was done like so in cryptsp.dll that also contains those Systemfunctions. Is that the other way around too then?
Correct, it has to be changed too. It's certainly easier to do the way you did it, and maybe it's acceptable, I don't know. On Windows it's structured differently.
On Fri Mar 14 11:46:11 2025 +0000, Nikolay Sivov wrote:
Correct, it has to be changed too. It's certainly easier to do the way you did it, and maybe it's acceptable, I don't know. On Windows it's structured differently.
objdump -p .../windows/system32/advapi32.dll says that yes, advapi32 should forward a bunch of SystemFunctions to cryptsp and cryptbase, only implementing 017 and 019 itself. So yes, our cryptsp is inaccurate.
But if it works, it works; I vote accept, and leave it like that until something actually relies on things being in the right DLL. But it's not my call.
I do, however, question that kernelbase patch. Looks like it belongs in a separate MR.
Ok, then I'll just wait if this gets accepted.
And that kernelbase patch should indeed be a seperate MR. I messed that up, I'll try to remove it again.