ReactOS 0.4.15-dev-7670-g69b08be
user_x.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STATIC_UISTATE_GWL_OFFSET   (sizeof(HFONT)+sizeof(HICON))
 
#define UserHasDlgFrameStyle(Style, ExStyle)
 
#define UserHasThickFrameStyle(Style, ExStyle)
 
#define UserHasThinFrameStyle(Style, ExStyle)    (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))
 
#define WIN_GetFullHandle(h)   ((HWND)(h))
 
#define HOOKID_TO_FLAG(HookId)   (1 << ((HookId) + 1))
 
#define ISITHOOKED(HookId)
 

Functions

static __inline PVOID SharedPtrToUser (PVOID Ptr)
 
static __inline PVOID DesktopPtrToUser (PVOID Ptr)
 
static __inline BOOL IsThreadHooked (PCLIENTINFO pci)
 
static __inline PDESKTOPINFO GetThreadDesktopInfo (VOID)
 
static __inline BOOL IsCallProcHandle (IN WNDPROC lpWndProc)
 
static __inline BOOL STATIC_update_uistate (HWND hwnd, BOOL unicode)
 
static __inline void LoadUserApiHook ()
 

Macro Definition Documentation

◆ HOOKID_TO_FLAG

#define HOOKID_TO_FLAG (   HookId)    (1 << ((HookId) + 1))

Definition at line 110 of file user_x.h.

◆ ISITHOOKED

#define ISITHOOKED (   HookId)
Value:
(GetWin32ClientInfo()->fsHooks & HOOKID_TO_FLAG(HookId) ||\
(GetWin32ClientInfo()->pDeskInfo && GetWin32ClientInfo()->pDeskInfo->fsHooks & HOOKID_TO_FLAG(HookId)))
#define GetWin32ClientInfo()
Definition: ntuser.h:352
#define HOOKID_TO_FLAG(HookId)
Definition: user_x.h:110

Definition at line 111 of file user_x.h.

◆ STATIC_UISTATE_GWL_OFFSET

#define STATIC_UISTATE_GWL_OFFSET   (sizeof(HFONT)+sizeof(HICON))

Definition at line 62 of file user_x.h.

◆ UserHasDlgFrameStyle

#define UserHasDlgFrameStyle (   Style,
  ExStyle 
)
Value:
(((Style) & WS_DLGFRAME) && (!((Style) & WS_THICKFRAME))))
const DWORD Style
Definition: appswitch.c:71
const DWORD ExStyle
Definition: appswitch.c:72
#define WS_EX_DLGMODALFRAME
Definition: pedump.c:645
#define WS_DLGFRAME
Definition: pedump.c:626
#define WS_THICKFRAME
Definition: pedump.c:630

Definition at line 96 of file user_x.h.

◆ UserHasThickFrameStyle

#define UserHasThickFrameStyle (   Style,
  ExStyle 
)
Value:
(((Style) & WS_THICKFRAME) && \
#define WS_BORDER
Definition: pedump.c:625

Definition at line 100 of file user_x.h.

◆ UserHasThinFrameStyle

#define UserHasThinFrameStyle (   Style,
  ExStyle 
)     (((Style) & WS_BORDER) || (!((Style) & (WS_CHILD | WS_POPUP))))

Definition at line 104 of file user_x.h.

◆ WIN_GetFullHandle

#define WIN_GetFullHandle (   h)    ((HWND)(h))

Definition at line 108 of file user_x.h.

Function Documentation

◆ DesktopPtrToUser()

static __inline PVOID DesktopPtrToUser ( PVOID  Ptr)
static

Definition at line 12 of file user_x.h.

13{
14 PCLIENTINFO pci;
17 pci = GetWin32ClientInfo();
18 pdi = pci->pDeskInfo;
19
20 ASSERT(Ptr != NULL);
21 ASSERT(pdi != NULL);
22 if ((ULONG_PTR)Ptr >= (ULONG_PTR)pdi->pvDesktopBase &&
23 (ULONG_PTR)Ptr < (ULONG_PTR)pdi->pvDesktopLimit)
24 {
25 return (PVOID)((ULONG_PTR)Ptr - pci->ulClientDelta);
26 }
27 else
28 {
29 /* NOTE: This is slow as it requires a call to win32k. This should only be
30 neccessary if a thread wants to access an object on a different
31 desktop */
33 }
34}
#define NULL
Definition: types.h:112
#define ULONG_PTR
Definition: config.h:101
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
struct _THREADINFO * GetW32ThreadInfo(VOID)
Definition: misc.c:805
#define ASSERT(a)
Definition: mode.c:44
EXTINLINE PVOID NtUserxGetDesktopMapping(PVOID ptr)
Definition: ntwrapper.h:806
ULONG_PTR ulClientDelta
Definition: ntuser.h:326
PDESKTOPINFO pDeskInfo
Definition: ntuser.h:325
uint32_t ULONG_PTR
Definition: typedefs.h:65
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO * pdi
Definition: winddi.h:3554

◆ GetThreadDesktopInfo()

static __inline PDESKTOPINFO GetThreadDesktopInfo ( VOID  )
static

Definition at line 43 of file user_x.h.

44{
45 PTHREADINFO ti;
46 PDESKTOPINFO di = NULL;
47
48 ti = GetW32ThreadInfo();
49 if (ti != NULL)
50 di = GetWin32ClientInfo()->pDeskInfo;
51
52 return di;
53}

Referenced by GetShellWindow(), GetThreadDesktopWnd(), and User32DefWindowProc().

◆ IsCallProcHandle()

static __inline BOOL IsCallProcHandle ( IN WNDPROC  lpWndProc)
static

Definition at line 56 of file user_x.h.

57{
58 /* FIXME - check for 64 bit architectures... */
59 return ((ULONG_PTR)lpWndProc & 0xFFFF0000) == 0xFFFF0000;
60}

◆ IsThreadHooked()

static __inline BOOL IsThreadHooked ( PCLIENTINFO  pci)
static

Definition at line 37 of file user_x.h.

38{
39 return (pci->fsHooks|pci->pDeskInfo->fsHooks) != 0;
40}
ULONG fsHooks
Definition: ntuser.h:328
DWORD fsHooks
Definition: ntuser.h:138

◆ LoadUserApiHook()

static __inline void LoadUserApiHook ( )
static

Definition at line 85 of file user_x.h.

86{
87 if (!gfServerProcess &&
91 {
93 }
94}
BOOLEAN NTAPI RtlIsThreadWithinLoaderCallout(VOID)
Definition: libsupp.c:345
PSERVERINFO gpsi
Definition: imm.c:18
DWORD_PTR NTAPI NtUserCallNoParam(DWORD Routine)
Definition: simplecall.c:59
@ NOPARAM_ROUTINE_LOADUSERAPIHOOK
Definition: ntuser.h:1524
#define SRVINFO_APIHOOK
Definition: ntuser.h:950
DWORD dwSRVIFlags
Definition: ntuser.h:1051
BOOLEAN gfServerProcess
Definition: dllmain.c:35
BOOL FASTCALL IsInsideUserApiHook(VOID)
Definition: usrapihk.c:98

Referenced by AdjustWindowRectEx(), DefWindowProcA(), DefWindowProcW(), DrawCaption(), DrawFrameControl(), EnableScrollBar(), GetScrollInfo(), GetSystemMetrics(), MDIRedrawFrame(), SetScrollInfo(), SetWindowRgn(), SystemParametersInfoA(), and SystemParametersInfoW().

◆ SharedPtrToUser()

static __inline PVOID SharedPtrToUser ( PVOID  Ptr)
static

Definition at line 4 of file user_x.h.

5{
6 ASSERT(Ptr != NULL);
9}
SHAREDINFO gSharedInfo
Definition: imm.c:19
ULONG_PTR ulSharedDelta
Definition: ntuser.h:1133

Referenced by ClientThreadSetupHelper(), Init(), IntGetClassLongA(), IntGetClassLongW(), IntGetProp(), ValidateHandle(), and ValidateHandleNoErr().

◆ STATIC_update_uistate()

static __inline BOOL STATIC_update_uistate ( HWND  hwnd,
BOOL  unicode 
)
static

Definition at line 65 of file user_x.h.

66{
67 LONG flags, prevflags;
68
69 if (unicode)
70 flags = DefWindowProcW(hwnd, WM_QUERYUISTATE, 0, 0);
71 else
72 flags = DefWindowProcA(hwnd, WM_QUERYUISTATE, 0, 0);
73
75
76 if (prevflags != flags)
77 {
79 return TRUE;
80 }
81
82 return FALSE;
83}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
GLbitfield flags
Definition: glext.h:7161
long LONG
Definition: pedump.c:60
#define STATIC_UISTATE_GWL_OFFSET
Definition: user_x.h:62
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)

Referenced by StaticWndProc_common().