From 86ff56902057ff7ffc72305f65ea6fcfb2b79ac0 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Sat, 6 Dec 2008 16:36:48 +0100 Subject: [PATCH] user32: Fix user_thread_info for 64-bits --- dlls/user32/user_main.c | 3 +++ dlls/user32/user_private.h | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index 1e29a8fb842..8421180ad09 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "windef.h" #include "winbase.h" #include "wingdi.h" @@ -343,6 +344,8 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) { case DLL_PROCESS_ATTACH: user32_module = inst; + /* In win64 mode, the structure is always aligned to pointer size */ + assert(sizeof(struct user_thread_info) - sizeof(void *) + sizeof(int) == sizeof(NtCurrentTeb()->Win32ClientInfo)); ret = process_attach(); break; case DLL_THREAD_DETACH: diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 191f7ddd632..24540869cd1 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -219,8 +219,11 @@ struct user_thread_info UINT active_hooks; /* Bitmap of active hooks */ HWND top_window; /* Desktop window */ HWND msg_window; /* HWND_MESSAGE parent window */ - - ULONG pad[9]; /* Available for more data */ +#ifndef _WIN64 + ULONG pad[16]; /* Available for more data */ +#else + ULONG pad[7]; /* Extra data here */ +#endif }; struct hook_extra_info -- 2.11.4.GIT