[PATCH v4 0/1] MR11019: Add a stub implementation for DwmpSetColorizationColor(DWORD*,BOOL)
This is just a small stub implementation to help fix the crash described in https://bugs.winehq.org/show_bug.cgi?id=48370 The program still doesn't work, but at least it doesn't crash anymore. -- v4: dwmapi: Add a stub for DwmpSetColorizationColor(DWORD*,BOOL) https://gitlab.winehq.org/wine/wine/-/merge_requests/11019
From: Tobias Markus <tobbi.bugs@googlemail.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48370 --- dlls/dwmapi/dwmapi.spec | 2 +- dlls/dwmapi/dwmapi_main.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dlls/dwmapi/dwmapi.spec b/dlls/dwmapi/dwmapi.spec index e69c3e3e82a..bfba361f708 100644 --- a/dlls/dwmapi/dwmapi.spec +++ b/dlls/dwmapi/dwmapi.spec @@ -2,7 +2,7 @@ 101 stub DwmpDxUpdateWindowSharedSurface 102 stdcall DwmEnableComposition(long) 103 stub -noname DwmpRestartComposition -104 stub -noname DwmpSetColorizationColor +104 stdcall -noname DwmpSetColorizationColor(ptr ptr) 105 stub -noname DwmpStartOrStopFlip3D 106 stub -noname DwmpIsCompositionCapable 107 stub -noname DwmpGetGlobalState diff --git a/dlls/dwmapi/dwmapi_main.c b/dlls/dwmapi/dwmapi_main.c index 49e05cd207e..bc71de29afa 100644 --- a/dlls/dwmapi/dwmapi_main.c +++ b/dlls/dwmapi/dwmapi_main.c @@ -63,6 +63,16 @@ HRESULT WINAPI DwmEnableComposition(UINT uCompositionAction) return S_OK; } +/********************************************************************** + * DwmpSetColorizationColor (DWMAPI.@) + */ +HRESULT WINAPI DwmpSetColorizationColor(DWORD *colorization, BOOL *opaque_blend) +{ + FIXME("(%p %p) stub\n", colorization, opaque_blend); + + return S_OK; +} + /********************************************************************** * DwmExtendFrameIntoClientArea (DWMAPI.@) */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11019
On Thu May 28 20:46:29 2026 +0000, Elizabeth Figura wrote:
I think -noname should remain. ``` +HRESULT WINAPI DwmpSetColorizationColor(DWORD *pcrColorization, BOOL* pfOpaqueBlend) ``` Could we keep the asterisks consistent? And also avoid Hungarian notation in new code? Fixed.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11019#note_141569
This merge request was approved by tobbi. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11019
Are you sure the name is correct? I could only find DwmGetColorizationColor (MSDN), which matches the parameter you are using? IMO: A Set function in the case wouldn't have pointers. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11019#note_141588
On Thu May 28 21:42:30 2026 +0000, Alistair Leslie-Hughes wrote:
Are you sure the name is correct? I could only find DwmGetColorizationColor (MSDN), which matches the parameter you are using? IMO: A Set function in the case wouldn't have pointers. Yes I am. I uploaded the contents of the crash information window to the original bug report just now. The application definitely calls that function.
See https://bugs.winehq.org/attachment.cgi?id=81043 `1 0x771938e1 __wine_spec_unimplemented_stub+0x41(module="dwmapi.dll", function="DwmpSetColorizationColor") [/Volumes/Development/workspace/wine/libs/winecrt0/stub.c:40] in dwmapi (0x0032f964)` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11019#note_141602
On Thu May 28 21:43:19 2026 +0000, tobbi wrote:
Yes I am. I uploaded the contents of the crash information window to the original bug report just now. The application definitely calls that function. See https://bugs.winehq.org/attachment.cgi?id=81043 `1 0x771938e1 __wine_spec_unimplemented_stub+0x41(module="dwmapi.dll", function="DwmpSetColorizationColor") [/Volumes/Development/workspace/wine/libs/winecrt0/stub.c:40] in dwmapi (0x0032f964)` That name comes from Wine, though; it was probably wrong to begin with.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11019#note_141603
On Thu May 28 22:06:12 2026 +0000, Elizabeth Figura wrote:
That name comes from Wine, though; it was probably wrong to begin with. From memory that is just reporting what is in the spec file.
As a test, this is what I get. Unhandled exception: unimplemented function dwmapi.dll.DwmpModifiedSpecFile called in wow64 32-bit code (0x7b5e9937). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11019#note_141610
If you run the program you get trace what is here below. It's looking for ordinal 104. Google says this might change with windowsversion: could be DwmpSetColorizationColor (or _RefreshImmersiveColorPolicyState in some Windows versions). I guess you need to write test for it then. 0120:Call kernelbase.GetProcAddress(7a840000,00000068) ret=00401e1f 0120:Call ntdll.LdrGetProcedureAddress(7a840000,00000000,00000068,0032f8dc) ret= 7bc45504 0120:Ret ntdll.LdrGetProcedureAddress() retval=00000000 ret=7bc45504 0120:Ret kernelbase.GetProcAddress() retval=7a84180c ret=00401e1f 0120:Call kernelbase.GetStartupInfoW(0032fc34) ret=00401c36 0120:Ret kernelbase.GetStartupInfoW() retval=00000000 ret=00401c36 0120:Call dwmapi.104() ret=00401018 wine: Call from 000000007BC1E1F0 to unimplemented function dwmapi.dll.DwmpSetColorizationColor, aborting -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11019#note_141639
On Mon Jun 1 21:31:47 2026 +0000, Louis Lenders wrote:
If you run the program you get trace what is here below. It's looking for ordinal 104. Google says this might change with windowsversion: could be DwmpSetColorizationColor (or _RefreshImmersiveColorPolicyState in some Windows versions). I guess you need to write test for it then. 0120:Call kernelbase.GetProcAddress(7a840000,00000068) ret=00401e1f 0120:Call ntdll.LdrGetProcedureAddress(7a840000,00000000,00000068,0032f8dc) ret= 7bc45504 0120:Ret ntdll.LdrGetProcedureAddress() retval=00000000 ret=7bc45504 0120:Ret kernelbase.GetProcAddress() retval=7a84180c ret=00401e1f 0120:Call kernelbase.GetStartupInfoW(0032fc34) ret=00401c36 0120:Ret kernelbase.GetStartupInfoW() retval=00000000 ret=00401c36 0120:Call dwmapi.104() ret=00401018 wine: Call from 000000007BC1E1F0 to unimplemented function dwmapi.dll.DwmpSetColorizationColor, aborting Could you tell me how that test is supposed to look like? I'm _very_ new to wine development.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11019#note_141908
participants (5)
-
Alistair Leslie-Hughes (@alesliehughes) -
Elizabeth Figura (@zfigura) -
Louis Lenders (@xe) -
tobbi (@tobbi) -
Tobias Markus