 
             
            From: Louis Lenders xerox.xerox2000x@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58747 --- dlls/uxtheme/draw.c | 11 +++++++++++ dlls/uxtheme/uxtheme.spec | 1 + include/uxtheme.h | 1 + 3 files changed, 13 insertions(+)
diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c index 6bf85f6a0f3..eec73d67d07 100644 --- a/dlls/uxtheme/draw.c +++ b/dlls/uxtheme/draw.c @@ -2089,6 +2089,17 @@ HRESULT WINAPI GetThemeBitmap(HTHEME hTheme, int iPartId, int iStateId, return E_NOTIMPL; }
+/*********************************************************************** + * GetThemeStream (UXTHEME.@) + */ +HRESULT WINAPI GetThemeStream(HTHEME hTheme, int iPartId, int iStateId, int iPropId, + void **ppvStream, DWORD *pcbStream, HINSTANCE hInst) +{ + FIXME("(%p,%d,%d,%d,%p,%p,%p) stub\n", hTheme, iPartId, iStateId, iPropId, ppvStream, pcbStream, hInst); + + return E_NOTIMPL; +} + /* compute part size for "borderfill" backgrounds */ static HRESULT get_border_background_size (HTHEME hTheme, int iPartId, int iStateId, THEMESIZE eSize, POINT* psz) diff --git a/dlls/uxtheme/uxtheme.spec b/dlls/uxtheme/uxtheme.spec index 38224a1f0e7..78530a0b755 100644 --- a/dlls/uxtheme/uxtheme.spec +++ b/dlls/uxtheme/uxtheme.spec @@ -94,6 +94,7 @@ @ stdcall GetThemePosition(ptr long long long ptr) @ stdcall GetThemePropertyOrigin(ptr long long long ptr) @ stdcall GetThemeRect(ptr long long long ptr) +@ stdcall GetThemeStream(ptr long long long ptr ptr ptr) @ stdcall GetThemeString(ptr long long long wstr long) @ stdcall GetThemeSysBool(ptr long) @ stdcall GetThemeSysColor(ptr long) diff --git a/include/uxtheme.h b/include/uxtheme.h index ca66345bdff..b7fa3f93ca8 100644 --- a/include/uxtheme.h +++ b/include/uxtheme.h @@ -122,6 +122,7 @@ THEMEAPI GetThemeBackgroundRegion(HTHEME,HDC,int,int,const RECT*,HRGN*); THEMEAPI GetThemeBitmap(HTHEME,int,int,int,ULONG,HBITMAP*); THEMEAPI GetThemeBool(HTHEME,int,int,int,BOOL*); THEMEAPI GetThemeColor(HTHEME,int,int,int,COLORREF*); +THEMEAPI GetThemeStream(HTHEME,int,int,int,void**,DWORD*,HINSTANCE);
#if defined(_MSC_VER) || defined(__MINGW32__) # define SZ_THDOCPROP_DISPLAYNAME L"DisplayName"
 
            Hi Zhyi,
This is another and final stub that should solve bug https://bugs.winehq.org/show_bug.cgi?id=58747
There is one more (puzzling) issue that is now left. When I opened the bugreport some week ago, I just quickly put the entries in uxtheme.spec in the beginning of that file and the program started then. Now I've put them in the (alphabetically) correct place, and now the program crashes with an acces violation.
With trial and error I found that placing the entry just before DrawThemeBackground makes the program start, and just after DrawThemeBackground makes it crash. It seems that DrawThemeBackground can also be imported by ordinal, when I do this the program starts again (no crash). I tested DrawThemeBackground can be imported by ordinal 57, but on windows 7 it's 54, and on windows 11 it's 55... But also a "fake ordinal" like 199 (see below) is enough to make the program start.
Do you have an idea why the program crashes, and what a possible fix could be, given the above behaviour?
Fake ordinal patch, not correct, but enough to start the program...:
diff --git a/dlls/uxtheme/uxtheme.spec b/dlls/uxtheme/uxtheme.spec index 38224a1f0e7..cca8c3e8ea1 100644 --- a/dlls/uxtheme/uxtheme.spec +++ b/dlls/uxtheme/uxtheme.spec @@ -60,7 +60,7 @@ @ stdcall BufferedPaintStopAllAnimations(ptr) @ stdcall BufferedPaintUnInit() @ stdcall CloseThemeData(ptr) -@ stdcall DrawThemeBackground(ptr ptr long long ptr ptr) +199 stdcall DrawThemeBackground(ptr ptr long long ptr ptr) @ stdcall DrawThemeEdge(ptr ptr long long ptr long long ptr) @ stdcall DrawThemeIcon(ptr ptr long long ptr ptr long) @ stdcall DrawThemeParentBackground(ptr ptr ptr)
 
            This merge request was approved by Zhiyi Zhang.
 
            On Mon Oct 20 14:41:14 2025 +0000, Louis Lenders wrote:
Hi Zhyi, This is another and final stub that should solve bug https://bugs.winehq.org/show_bug.cgi?id=58747 There is one more (puzzling) issue that is now left. When I opened the bugreport some week ago, I just quickly put the entries in uxtheme.spec in the beginning of that file and the program started then. Now I've put them in the (alphabetically) correct place, and now the program crashes with an acces violation. With trial and error I found that placing the entry just before DrawThemeBackground makes the program start, and just after DrawThemeBackground makes it crash. It seems that DrawThemeBackground can also be imported by ordinal, when I do this the program starts again (no crash). I tested DrawThemeBackground can be imported by ordinal 57, but on windows 7 it's 54, and on windows 11 it's 55... But also a "fake ordinal" like 199 (see below) is enough to make the program start. Do you have an idea why the program crashes, and what a possible fix could be, given the above behaviour? Fake ordinal patch, not correct, but enough to start the program...: diff --git a/dlls/uxtheme/uxtheme.spec b/dlls/uxtheme/uxtheme.spec index 38224a1f0e7..cca8c3e8ea1 100644 --- a/dlls/uxtheme/uxtheme.spec +++ b/dlls/uxtheme/uxtheme.spec @@ -60,7 +60,7 @@ @ stdcall BufferedPaintStopAllAnimations(ptr) @ stdcall BufferedPaintUnInit() @ stdcall CloseThemeData(ptr) -@ stdcall DrawThemeBackground(ptr ptr long long ptr ptr) +199 stdcall DrawThemeBackground(ptr ptr long long ptr ptr) @ stdcall DrawThemeEdge(ptr ptr long long ptr long long ptr) @ stdcall DrawThemeIcon(ptr ptr long long ptr ptr long) @ stdcall DrawThemeParentBackground(ptr ptr ptr)
I am not sure. Maybe the program just checks ordinals or something. I recommend choosing 57 because Windows 10 is the default version on Wine.


