[PATCH] user32: Fix user_thread_info for 64-bits
Maarten Lankhorst
m.b.lankhorst at gmail.com
Sat Dec 6 09:36:48 CST 2008
---
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 1e29a8f..8421180 100644
--- a/dlls/user32/user_main.c
+++ b/dlls/user32/user_main.c
@@ -21,6 +21,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
+#include <assert.h>
#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 72e6724..e7ff4ed 100644
--- a/dlls/user32/user_private.h
+++ b/dlls/user32/user_private.h
@@ -220,8 +220,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
--
1.5.6.5
--------------070909090001070908030700--
More information about the wine-patches
mailing list