win32u: Store thread info in 64-bit TEB on wow64.

This commit is contained in:
Jacek Caban 2022-07-30 12:49:51 +02:00 committed by Alexandre Julliard
parent 1e9390e558
commit 8bb71922a5
3 changed files with 12 additions and 5 deletions

View file

@ -138,6 +138,11 @@ struct user_thread_info
C_ASSERT( sizeof(struct user_thread_info) <= sizeof(((TEB *)0)->Win32ClientInfo) );
static inline struct user_thread_info *get_user_thread_info(void)
{
return CONTAINING_RECORD( NtUserGetThreadInfo(), struct user_thread_info, client_info );
}
struct user_key_state_info
{
UINT time; /* Time of last key state refresh */

View file

@ -432,11 +432,6 @@ extern void reg_delete_value( HKEY hkey, const WCHAR *name ) DECLSPEC_HIDDEN;
extern HKEY hkcu_key DECLSPEC_HIDDEN;
static inline struct user_thread_info *get_user_thread_info(void)
{
return (struct user_thread_info *)NtCurrentTeb()->Win32ClientInfo;
}
extern const struct user_driver_funcs *user_driver DECLSPEC_HIDDEN;
static inline BOOL set_ntstatus( NTSTATUS status )

View file

@ -78,6 +78,13 @@ struct ntuser_thread_info
static inline struct ntuser_thread_info *NtUserGetThreadInfo(void)
{
#ifndef _WIN64
if (NtCurrentTeb()->GdiBatchCount)
{
TEB64 *teb64 = (TEB64 *)(UINT_PTR)NtCurrentTeb()->GdiBatchCount;
return (struct ntuser_thread_info *)teb64->Win32ClientInfo;
}
#endif
return (struct ntuser_thread_info *)NtCurrentTeb()->Win32ClientInfo;
}