From: Louis Lenders xerox.xerox2000x@gmail.com
--- dlls/uxtheme/uxtheme.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/uxtheme/uxtheme.spec b/dlls/uxtheme/uxtheme.spec index c60254b677d..90876e593a8 100644 --- a/dlls/uxtheme/uxtheme.spec +++ b/dlls/uxtheme/uxtheme.spec @@ -42,6 +42,9 @@ 61 stdcall OpenThemeDataEx(ptr wstr long) 62 stub -noname ServerClearStockObjects 63 stub -noname MarkSelection +132 stdcall IsThemeDialogTextureEnabled(ptr) +133 stdcall IsThemePartDefined(ptr long long) +135 stdcall SetThemeAppProperties(long)
# Standard functions @ stdcall BeginBufferedAnimation(ptr ptr ptr long ptr ptr ptr ptr) @@ -103,10 +106,7 @@ @ stdcall IsCompositionActive() @ stdcall IsThemeActive() @ stdcall IsThemeBackgroundPartiallyTransparent(ptr long long) -@ stdcall IsThemeDialogTextureEnabled(ptr) -@ stdcall IsThemePartDefined(ptr long long) @ stdcall OpenThemeData(ptr wstr) @ stdcall OpenThemeDataForDpi(ptr wstr long) -@ stdcall SetThemeAppProperties(long) @ stdcall SetWindowTheme(ptr wstr wstr) @ stdcall SetWindowThemeAttribute(ptr long ptr long)
Let's add a test_ordinal() and add some tests there. For example, see test_DrawThemeBackgroundEx() for how the ordinal for DrawThemeBackgroundEx() is tested. Then you can move the DrawThemeBackgroundEx() ordinal checks there, alongside tests for these functions.
Hi Zhiyi,
Testing that those functions can be loaded by ordinal also involves adding tests for those functions I suppose, and I really never looked into this dll. So I'm quite sure this would take me a lot of time, which atm I don't have. Would you mind taking over this merge request, as you know what all these functions really do?
On Mon Oct 9 01:31:50 2023 +0000, Louis Lenders wrote:
Hi Zhiyi, Testing that those functions can be loaded by ordinal also involves adding tests for those functions I suppose, and I really never looked into this dll. So I'm quite sure this would take me a lot of time, which atm I don't have. Would you mind taking over this merge request, as you know what all these functions really do?
Hi Louis,
Something like the following should be enough.
``` proc = GetProcAddress(GetModuleHandleA("uxtheme.dll"), MAKEINTRESOURCEA(47)); ok(proc == (void *)pDrawThemeBackgroundEx, "Expected DrawThemeBackgroundEx() at ordinal 47.\n");
```
You can add an array of ordinals and function names and compare the function pointers from GetProcAddress(). If you have trouble with that, feel free to assign it to me.
This merge request was closed by Louis Lenders.
Hi Zhiyi, I don't know how to assign a merge request to someone else. I will close this one, ok (?), and then you could start new merge request yourself. Think it will be much quicker fixed if you would do the change. Thanks in advance for taking up.
I don't understand why you closed this. Zhiyi told you what to do, and it's pretty easy to do it yourself, just compare the ordinal address with the one obtained from the name and test if they match.
But generally trying to delegate your work to someone else is pretty rude. Maybe it would be quicker for him to do it, but we're all busy here and it's your MR. It's also a decent learning experience to do it yourself (though in this case it's easy).
Well, I don't know about coders etiquette but at the organization I work it's not rude to ask an expert to fix a problem... Anyway I fixed up a test, and Ill reopen the bug. @zhiyi, could you have a look at patch below? I'm attaching it as a patch for now as I don't want to go through gitlab horror again.
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index 2e769625dab..0c1a1b28fee 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -285,6 +285,31 @@ static LRESULT WINAPI TestSetWindowThemeChildProcA(HWND hwnd, UINT message, WPAR return ret; }
+static void test_ordinals(void) +{ + void *proc; + int i; + HMODULE uxtheme = GetModuleHandleA("uxtheme.dll"); + static const struct + { + const char *name; + int ordinal; + } + func[] = + { + {"DrawThemeBackgroundEx", 47}, + {"IsThemeDialogTextureEnabled", 132}, + {"IsThemePartDefined", 133}, + {"SetThemeAppProperties", 135} + }; + + for (i = 0; i < ARRAY_SIZE(func); i++) + { + proc = GetProcAddress(uxtheme, MAKEINTRESOURCEA(func->ordinal)); + ok(proc == GetProcAddress(uxtheme, func->name), "Expected %s at ordinal %u\n", func->name, func->ordinal); + } +} + static void test_IsThemed(void) { BOOL bThemeActive; @@ -2605,6 +2630,7 @@ START_TEST(system) init_funcs(); init_msg_sequences(sequences, NUM_MSG_SEQUENCES);
+ test_ordinals(); test_IsThemed(); test_IsThemePartDefined(); test_GetWindowTheme();