[PATCH] user32/tests: Work around a failure on Windows < Vista.
Zebediah Figura
z.figura12 at gmail.com
Wed Jan 1 12:14:13 CST 2020
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/user32/tests/winstation.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/tests/winstation.c b/dlls/user32/tests/winstation.c
index aaa51d560ac..4aa5565b96c 100644
--- a/dlls/user32/tests/winstation.c
+++ b/dlls/user32/tests/winstation.c
@@ -51,7 +51,12 @@ static void register_class(void)
WNDCLASSA cls;
cls.style = CS_DBLCLKS;
- cls.lpfnWndProc = DefWindowProcA;
+ /* Windows < Vista apparently checks lpfnWndProc against the address of
+ * DefWindowProcA(), and for some reason fails to change the thread desktop
+ * after creating and destroying a window if it doesn't match. Using an IAT
+ * (as is default) or a wrapper triggers this, so use GetProcAddress() as
+ * a workaround. */
+ cls.lpfnWndProc = (void *)GetProcAddress(GetModuleHandleA("user32"), "DefWindowProcA");
cls.cbClsExtra = 0;
cls.cbWndExtra = 0;
cls.hInstance = GetModuleHandleA(0);
--
2.24.0
More information about the wine-devel
mailing list