ReactOS 0.4.16-dev-959-g2ec3a19
ntuser.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _USER_HANDLE_ENTRY
 
struct  _USER_HANDLE_TABLE
 
struct  _LARGE_UNICODE_STRING
 
struct  _LARGE_STRING
 
struct  _LARGE_ANSI_STRING
 
struct  _DESKTOPINFO
 
struct  _CLIENTTHREADINFO
 
struct  _HEAD
 
struct  _THROBJHEAD
 
struct  _THRDESKHEAD
 
struct  tagIMC
 
struct  _PROCDESKHEAD
 
struct  _PROCMARKHEAD
 
struct  tagHOOK
 
struct  tagCLIPBOARDDATA
 
struct  _CALLBACKWND
 
struct  _CLIENTINFO
 
struct  tagDDEPACK
 
struct  tagITEM
 
struct  tagMENULIST
 
struct  tagMENU
 
struct  tagPOPUPMENU
 
struct  _REGISTER_SYSCLASS
 
struct  _CLSMENUNAME
 
struct  tagSBDATA
 
struct  tagSBINFO
 
struct  tagSBCALC
 
struct  _CALLPROCDATA
 
struct  _CLS
 
struct  _SBINFOEX
 
struct  _WND
 
struct  _SBWND
 
struct  _MDIWND
 
struct  _MENUWND
 
struct  _PFNCLIENT
 
struct  _PFNCLIENTWORKER
 
struct  tagOEMBITMAPINFO
 
struct  tagMBSTRING
 
struct  tagDPISERVERINFO
 
struct  _PERUSERSERVERINFO
 
struct  tagSERVERINFO
 
struct  _PROPLISTITEM
 
struct  _PROPERTY
 
struct  _BROADCASTPARM
 
struct  _WNDMSG
 
struct  _SHAREDINFO
 
struct  _USERCONNECT
 
struct  tagGETCLIPBDATA
 
struct  tagSETCLIPBDATA
 
struct  tagCURSORDATA
 
struct  tagIMEUI
 
struct  _IMEWND
 
struct  _DESKTOP_CONSOLE_THREAD
 
struct  _DRAWICONEXDATA
 
struct  tagDOSENDMESSAGE
 
struct  _tagFINDEXISTINGCURICONPARAM
 
struct  _SETSCROLLBARINFO
 

Macros

#define FIRST_USER_HANDLE   0x0020 /* first possible value for low word of user handle */
 
#define LAST_USER_HANDLE   0xffef /* last possible value for low word of user handle */
 
#define HANDLEENTRY_DESTROY   1
 
#define HANDLEENTRY_INDESTROY   2
 
#define NB_HOOKS   (WH_MAXHOOK - WH_MINHOOK + 1)
 
#define CTI_THREADSYSLOCK   0x0001
 
#define CTI_INSENDMESSAGE   0x0002
 
#define UserHMGetHandle(obj)   ((obj)->head.h)
 
#define UserHMSetHandle(obj, handle)   ((obj)->head.h = (handle))
 
#define WEF_SETBYWNDPTI   0x0001
 
#define TIF_INCLEANUP   0x00000001
 
#define TIF_16BIT   0x00000002
 
#define TIF_SYSTEMTHREAD   0x00000004
 
#define TIF_CSRSSTHREAD   0x00000008
 
#define TIF_TRACKRECTVISIBLE   0x00000010
 
#define TIF_ALLOWFOREGROUNDACTIVATE   0x00000020
 
#define TIF_DONTATTACHQUEUE   0x00000040
 
#define TIF_DONTJOURNALATTACH   0x00000080
 
#define TIF_WOW64   0x00000100
 
#define TIF_INACTIVATEAPPMSG   0x00000200
 
#define TIF_SPINNING   0x00000400
 
#define TIF_PALETTEAWARE   0x00000800
 
#define TIF_SHAREDWOW   0x00001000
 
#define TIF_FIRSTIDLE   0x00002000
 
#define TIF_WAITFORINPUTIDLE   0x00004000
 
#define TIF_MOVESIZETRACKING   0x00008000
 
#define TIF_VDMAPP   0x00010000
 
#define TIF_DOSEMULATOR   0x00020000
 
#define TIF_GLOBALHOOKER   0x00040000
 
#define TIF_DELAYEDEVENT   0x00080000
 
#define TIF_MSGPOSCHANGED   0x00100000
 
#define TIF_SHUTDOWNCOMPLETE   0x00200000
 
#define TIF_IGNOREPLAYBACKDELAY   0x00400000
 
#define TIF_ALLOWOTHERACCOUNTHOOK   0x00800000
 
#define TIF_GUITHREADINITIALIZED   0x02000000
 
#define TIF_DISABLEIME   0x04000000
 
#define TIF_INGETTEXTLENGTH   0x08000000
 
#define TIF_ANSILENGTH   0x10000000
 
#define TIF_DISABLEHOOKS   0x20000000
 
#define CI_TRANSACTION   0x00000001
 
#define CI_QUEUEMSG   0x00000002
 
#define CI_WOW   0x00000004
 
#define CI_INITTHREAD   0x00000008
 
#define CI_CURTHPRHOOK   0x00000010
 
#define CI_CLASSESREGISTERED   0x00000020
 
#define CI_IMMACTIVATE   0x00000040 /* IMM/IME (Asian input) */
 
#define CI_CTFCOINIT   0x00000080 /* Did CTF CoInitialize? */
 
#define CI_CTFTIM   0x00000100 /* CTF Thread Input Manager (TIM) */
 
#define CI_CICERO_STARTED   0x00000200 /* Is Cicero started in the thread? */
 
#define CI_TSFDISABLED   0x00000400 /* TSF (Text Services Framework a.k.a. Cicero) */
 
#define CI_AIMMACTIVATED   0x00000800 /* Active IMM (AIMM) */
 
#define GetWin32ClientInfo()   ((PCLIENTINFO)(NtCurrentTeb()->Win32ClientInfo))
 
#define HRGN_NULL   ((HRGN)0) /* NULL empty region */
 
#define HRGN_WINDOW   ((HRGN)1) /* region from window rcWindow */
 
#define HRGN_MONITOR   ((HRGN)2) /* region from monitor region. */
 
#define MFT_RTOL   0x6000
 
#define MFS_HBMMENUBMP   0x20000000
 
#define MNF_POPUP   0x0001
 
#define MNF_UNDERLINE   0x0004
 
#define MNF_INACTIVE   0x0010
 
#define MNF_RTOL   0x0020
 
#define MNF_DESKTOPMN   0x0040
 
#define MNF_SYSDESKMN   0x0080
 
#define MNF_SYSSUBMENU   0x0100
 
#define MNF_SYSMENU   0x0200
 
#define NO_SELECTED_ITEM   0xffff
 
#define CSF_SERVERSIDEPROC   0x0001
 
#define CSF_ANSIPROC   0x0002
 
#define CSF_WOWDEFERDESTROY   0x0004
 
#define CSF_SYSTEMCLASS   0x0008
 
#define CSF_WOWCLASS   0x0010
 
#define CSF_WOWEXTRA   0x0020
 
#define CSF_CACHEDSMICON   0x0040
 
#define CSF_WIN40COMPAT   0x0080
 
#define WNDS_HASMENU   0X00000001
 
#define WNDS_HASVERTICALSCROOLLBAR   0X00000002
 
#define WNDS_HASHORIZONTALSCROLLBAR   0X00000004
 
#define WNDS_HASCAPTION   0X00000008
 
#define WNDS_SENDSIZEMOVEMSGS   0X00000010
 
#define WNDS_MSGBOX   0X00000020
 
#define WNDS_ACTIVEFRAME   0X00000040
 
#define WNDS_HASSPB   0X00000080
 
#define WNDS_NONCPAINT   0X00000100
 
#define WNDS_SENDERASEBACKGROUND   0X00000200
 
#define WNDS_ERASEBACKGROUND   0X00000400
 
#define WNDS_SENDNCPAINT   0X00000800
 
#define WNDS_INTERNALPAINT   0X00001000
 
#define WNDS_UPDATEDIRTY   0X00002000
 
#define WNDS_HIDDENPOPUP   0X00004000
 
#define WNDS_FORCEMENUDRAW   0X00008000
 
#define WNDS_DIALOGWINDOW   0X00010000
 
#define WNDS_HASCREATESTRUCTNAME   0X00020000
 
#define WNDS_SERVERSIDEWINDOWPROC   0x00040000 /* Call proc inside win32k. */
 
#define WNDS_ANSIWINDOWPROC   0x00080000
 
#define WNDS_BEINGACTIVATED   0x00100000
 
#define WNDS_HASPALETTE   0x00200000
 
#define WNDS_PAINTNOTPROCESSED   0x00400000
 
#define WNDS_SYNCPAINTPENDING   0x00800000
 
#define WNDS_RECEIVEDQUERYSUSPENDMSG   0x01000000
 
#define WNDS_RECEIVEDSUSPENDMSG   0x02000000
 
#define WNDS_TOGGLETOPMOST   0x04000000
 
#define WNDS_REDRAWIFHUNG   0x08000000
 
#define WNDS_REDRAWFRAMEIFHUNG   0x10000000
 
#define WNDS_ANSICREATOR   0x20000000
 
#define WNDS_MAXIMIZESTOMONITOR   0x40000000
 
#define WNDS_DESTROYED   0x80000000
 
#define WNDSACTIVEFRAME   0x00000006
 
#define WNDS2_WMPAINTSENT   0X00000001
 
#define WNDS2_ENDPAINTINVALIDATE   0X00000002
 
#define WNDS2_STARTPAINT   0X00000004
 
#define WNDS2_OLDUI   0X00000008
 
#define WNDS2_HASCLIENTEDGE   0X00000010
 
#define WNDS2_BOTTOMMOST   0X00000020
 
#define WNDS2_FULLSCREEN   0X00000040
 
#define WNDS2_INDESTROY   0X00000080
 
#define WNDS2_WIN31COMPAT   0X00000100
 
#define WNDS2_WIN40COMPAT   0X00000200
 
#define WNDS2_WIN50COMPAT   0X00000400
 
#define WNDS2_MAXIMIZEDMONITORREGION   0X00000800
 
#define WNDS2_CLOSEBUTTONDOWN   0X00001000
 
#define WNDS2_MAXIMIZEBUTTONDOWN   0X00002000
 
#define WNDS2_MINIMIZEBUTTONDOWN   0X00004000
 
#define WNDS2_HELPBUTTONDOWN   0X00008000
 
#define WNDS2_SCROLLBARLINEUPBTNDOWN   0X00010000
 
#define WNDS2_SCROLLBARPAGEUPBTNDOWN   0X00020000
 
#define WNDS2_SCROLLBARPAGEDOWNBTNDOWN   0X00040000
 
#define WNDS2_SCROLLBARLINEDOWNBTNDOWN   0X00080000
 
#define WNDS2_ANYSCROLLBUTTONDOWN   0X00100000
 
#define WNDS2_SCROLLBARVERTICALTRACKING   0X00200000
 
#define WNDS2_FORCENCPAINT   0X00400000
 
#define WNDS2_FORCEFULLNCPAINTCLIPRGN   0X00800000
 
#define WNDS2_FULLSCREENMODE   0X01000000
 
#define WNDS2_CAPTIONTEXTTRUNCATED   0X08000000
 
#define WNDS2_NOMINMAXANIMATERECTS   0X10000000
 
#define WNDS2_SMALLICONFROMWMQUERYDRAG   0X20000000
 
#define WNDS2_SHELLHOOKREGISTERED   0X40000000
 
#define WNDS2_WMCREATEMSGPROCESSED   0X80000000
 
#define WS_EX2_CLIPBOARDLISTENER   0X00000001
 
#define WS_EX2_LAYEREDINVALIDATE   0X00000002
 
#define WS_EX2_REDIRECTEDFORPRINT   0X00000004
 
#define WS_EX2_LINKED   0X00000008
 
#define WS_EX2_LAYEREDFORDWM   0X00000010
 
#define WS_EX2_LAYEREDLIMBO   0X00000020
 
#define WS_EX2_HIGHTDPI_UNAWAR   0X00000040
 
#define WS_EX2_VERTICALLYMAXIMIZEDLEFT   0X00000080
 
#define WS_EX2_VERTICALLYMAXIMIZEDRIGHT   0X00000100
 
#define WS_EX2_HASOVERLAY   0X00000200
 
#define WS_EX2_CONSOLEWINDOW   0X00000400
 
#define WS_EX2_CHILDNOACTIVATE   0X00000800
 
#define WPF_MININIT   0x0008
 
#define WPF_MAXINIT   0x0010
 
#define PWND_BOTTOM   ((PWND)1)
 
#define GWLP_MDIWND   4
 
#define FNID_FIRST   0x029A
 
#define FNID_SCROLLBAR   0x029A
 
#define FNID_ICONTITLE   0x029B
 
#define FNID_MENU   0x029C
 
#define FNID_DESKTOP   0x029D
 
#define FNID_DEFWINDOWPROC   0x029E
 
#define FNID_MESSAGEWND   0x029F
 
#define FNID_SWITCH   0x02A0
 
#define FNID_BUTTON   0x02A1
 
#define FNID_COMBOBOX   0x02A2
 
#define FNID_COMBOLBOX   0x02A3
 
#define FNID_DIALOG   0x02A4
 
#define FNID_EDIT   0x02A5
 
#define FNID_LISTBOX   0x02A6
 
#define FNID_MDICLIENT   0x02A7
 
#define FNID_STATIC   0x02A8
 
#define FNID_IME   0x02A9
 
#define FNID_GHOST   0x02AA
 
#define FNID_CALLWNDPROC   0x02AB
 
#define FNID_CALLWNDPROCRET   0x02AC
 
#define FNID_HKINLPCWPEXSTRUCT   0x02AD
 
#define FNID_HKINLPCWPRETEXSTRUCT   0x02AE
 
#define FNID_MB_DLGPROC   0x02AF
 
#define FNID_MDIACTIVATEDLGPROC   0x02B0
 
#define FNID_SENDMESSAGE   0x02B1
 
#define FNID_SENDMESSAGEFF   0x02B2
 
#define FNID_SENDMESSAGEWTOOPTION   0x02B3
 
#define FNID_SENDMESSAGECALLPROC   0x02B4
 
#define FNID_BROADCASTSYSTEMMESSAGE   0x02B5
 
#define FNID_TOOLTIPS   0x02B6
 
#define FNID_SENDNOTIFYMESSAGE   0x02B7
 
#define FNID_SENDMESSAGECALLBACK   0x02B8
 
#define FNID_LAST   FNID_SENDMESSAGECALLBACK
 
#define FNID_NUM   (FNID_LAST - FNID_FIRST + 1)
 
#define FNID_NUMSERVERPROC   (FNID_SWITCH - FNID_FIRST + 1)
 
#define FNID_DDEML   0x2000 /* Registers DDEML */
 
#define FNID_DESTROY   0x4000 /* This is sent when WM_NCDESTROY or in the support routine. */
 
#define FNID_FREED   0x8000 /* Window being Freed... */
 
#define ICLASS_TO_MASK(iCls)   (1 << ((iCls)))
 
#define GETPFNCLIENTA(fnid)    (WNDPROC)(*(((ULONG_PTR *)&gpsi->apfnClientA) + (fnid - FNID_FIRST)))
 
#define GETPFNCLIENTW(fnid)    (WNDPROC)(*(((ULONG_PTR *)&gpsi->apfnClientW) + (fnid - FNID_FIRST)))
 
#define GETPFNSERVER(fnid)   gpsi->aStoCidPfn[fnid - FNID_FIRST]
 
#define ICLS_BUTTON   0
 
#define ICLS_EDIT   1
 
#define ICLS_STATIC   2
 
#define ICLS_LISTBOX   3
 
#define ICLS_SCROLLBAR   4
 
#define ICLS_COMBOBOX   5
 
#define ICLS_MDICLIENT   6
 
#define ICLS_COMBOLBOX   7
 
#define ICLS_DDEMLEVENT   8
 
#define ICLS_DDEMLMOTHER   9
 
#define ICLS_DDEML16BIT   10
 
#define ICLS_DDEMLCLIENTA   11
 
#define ICLS_DDEMLCLIENTW   12
 
#define ICLS_DDEMLSERVERA   13
 
#define ICLS_DDEMLSERVERW   14
 
#define ICLS_IME   15
 
#define ICLS_GHOST   16
 
#define ICLS_DESKTOP   17
 
#define ICLS_DIALOG   18
 
#define ICLS_MENU   19
 
#define ICLS_SWITCH   20
 
#define ICLS_ICONTITLE   21
 
#define ICLS_TOOLTIPS   22
 
#define ICLS_UNKNOWN   22
 
#define ICLS_NOTUSED   23
 
#define ICLS_END   31
 
#define COLOR_LAST   COLOR_MENUBAR
 
#define MAX_MB_STRINGS   11
 
#define SRVINFO_DBCSENABLED   0x0002
 
#define SRVINFO_IMM32   0x0004
 
#define SRVINFO_APIHOOK   0x0010
 
#define SRVINFO_CICERO_ENABLED   0x0020
 
#define SRVINFO_KBDPREF   0x0080
 
#define NUM_SYSCOLORS   31
 
#define PUSIF_PALETTEDISPLAY   0x01
 
#define PUSIF_SNAPTO   0x02
 
#define PUSIF_COMBOBOXANIMATION   0x04
 
#define PUSIF_LISTBOXSMOOTHSCROLLING   0x08
 
#define PUSIF_KEYBOARDCUES   0x20
 
#define SRV_EVENT_MENU   0x0001
 
#define SRV_EVENT_END_APPLICATION   0x0002
 
#define SRV_EVENT_RUNNING   0x0004
 
#define SRV_EVENT_NAMECHANGE   0x0008
 
#define SRV_EVENT_VALUECHANGE   0x0010
 
#define SRV_EVENT_STATECHANGE   0x0020
 
#define SRV_EVENT_LOCATIONCHANGE   0x0040
 
#define SRV_EVENT_CREATE   0x8000
 
#define PROPERTY_FLAG_SYSTEM   1
 
#define USER_VERSION   MAKELONG(0x0000, 0x0005)
 
#define CURSORF_FROMRESOURCE   0x0001
 
#define CURSORF_GLOBAL   0x0002
 
#define CURSORF_LRSHARED   0x0004
 
#define CURSORF_ACON   0x0008
 
#define CURSORF_WOWCLEANUP   0x0010
 
#define CURSORF_ACONFRAME   0x0040
 
#define CURSORF_SECRET   0x0080
 
#define CURSORF_LINKED   0x0100
 
#define CURSORF_CURRENT   0x0200
 
#define IS_IMM_MODE()   (gpsi && (gpsi->dwSRVIFlags & SRVINFO_IMM32))
 
#define IS_CICERO_MODE()   (gpsi && (gpsi->dwSRVIFlags & SRVINFO_CICERO_ENABLED))
 
#define IS_16BIT_MODE()   (GetWin32ClientInfo()->dwTIFlags & TIF_16BIT)
 
#define WIN32K_VERSION   NTDDI_WINXPSP2 /* FIXME: this should go somewhere else */
 
#define QUERY_WINDOW_UNIQUE_PROCESS_ID   0x00
 
#define QUERY_WINDOW_UNIQUE_THREAD_ID   0x01
 
#define QUERY_WINDOW_ACTIVE   0x02
 
#define QUERY_WINDOW_FOCUS   0x03
 
#define QUERY_WINDOW_ISHUNG   0x04
 
#define QUERY_WINDOW_REAL_ID   0x05
 
#define QUERY_WINDOW_FOREGROUND   0x06
 
#define QUERY_WINDOW_DEFAULT_IME   0x07
 
#define QUERY_WINDOW_DEFAULT_ICONTEXT   0x08
 
#define QUERY_WINDOW_ACTIVE_IME   0x09
 
#define NtUserSetWindowLongPtr   NtUserSetWindowLong
 
#define NOPARAM_ROUTINE_ISCONSOLEMODE   0xffff0001
 
#define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING   0xfffe000d
 
#define ONEPARAM_ROUTINE_GETDESKTOPMAPPING   0xfffe000e
 
#define TWOPARAM_ROUTINE_SETMENUBARHEIGHT   0xfffd0050
 
#define TWOPARAM_ROUTINE_SETGUITHRDHANDLE   0xfffd0051
 
#define HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOWMOUSE   0xfffd0052
 
#define MSQ_STATE_CAPTURE   0x1
 
#define MSQ_STATE_ACTIVE   0x2
 
#define MSQ_STATE_FOCUS   0x3
 
#define MSQ_STATE_MENUOWNER   0x4
 
#define MSQ_STATE_MOVESIZE   0x5
 
#define MSQ_STATE_CARET   0x6
 
#define TWOPARAM_ROUTINE_ROS_UPDATEUISTATE   0x1004
 
#define HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT   0x1005
 

Typedefs

typedef struct _USER_HANDLE_ENTRY USER_HANDLE_ENTRY
 
typedef struct _USER_HANDLE_ENTRYPUSER_HANDLE_ENTRY
 
typedef struct _USER_HANDLE_TABLE USER_HANDLE_TABLE
 
typedef struct _USER_HANDLE_TABLEPUSER_HANDLE_TABLE
 
typedef enum _HANDLE_TYPE HANDLE_TYPE
 
typedef enum _HANDLE_TYPEPHANDLE_TYPE
 
typedef enum _USERTHREADINFOCLASS USERTHREADINFOCLASS
 
typedef struct _LARGE_UNICODE_STRING LARGE_UNICODE_STRING
 
typedef struct _LARGE_UNICODE_STRINGPLARGE_UNICODE_STRING
 
typedef struct _LARGE_STRING LARGE_STRING
 
typedef struct _LARGE_STRINGPLARGE_STRING
 
typedef struct _LARGE_ANSI_STRING LARGE_ANSI_STRING
 
typedef struct _LARGE_ANSI_STRINGPLARGE_ANSI_STRING
 
typedef struct _DESKTOPINFO DESKTOPINFO
 
typedef struct _DESKTOPINFOPDESKTOPINFO
 
typedef struct _CLIENTTHREADINFO CLIENTTHREADINFO
 
typedef struct _CLIENTTHREADINFOPCLIENTTHREADINFO
 
typedef struct _HEAD HEAD
 
typedef struct _HEADPHEAD
 
typedef struct _THROBJHEAD THROBJHEAD
 
typedef struct _THROBJHEADPTHROBJHEAD
 
typedef struct _THRDESKHEAD THRDESKHEAD
 
typedef struct _THRDESKHEADPTHRDESKHEAD
 
typedef struct tagIMC IMC
 
typedef struct tagIMCPIMC
 
typedef struct _PROCDESKHEAD PROCDESKHEAD
 
typedef struct _PROCDESKHEADPPROCDESKHEAD
 
typedef struct _PROCMARKHEAD PROCMARKHEAD
 
typedef struct _PROCMARKHEADPPROCMARKHEAD
 
typedef struct tagHOOK HOOK
 
typedef struct tagHOOKPHOOK
 
typedef struct tagCLIPBOARDDATA CLIPBOARDDATA
 
typedef struct tagCLIPBOARDDATAPCLIPBOARDDATA
 
typedef struct _CALLBACKWND CALLBACKWND
 
typedef struct _CALLBACKWNDPCALLBACKWND
 
typedef struct _CLIENTINFO CLIENTINFO
 
typedef struct _CLIENTINFOPCLIENTINFO
 
typedef struct tagDDEPACK DDEPACK
 
typedef struct tagDDEPACKPDDEPACK
 
typedef struct tagITEM ITEM
 
typedef struct tagITEMPITEM
 
typedef struct tagMENULIST MENULIST
 
typedef struct tagMENULISTPMENULIST
 
typedef struct tagMENU MENU
 
typedef struct tagMENUPMENU
 
typedef struct tagPOPUPMENU POPUPMENU
 
typedef struct tagPOPUPMENUPPOPUPMENU
 
typedef struct _REGISTER_SYSCLASS REGISTER_SYSCLASS
 
typedef struct _REGISTER_SYSCLASSPREGISTER_SYSCLASS
 
typedef struct _CLSMENUNAME CLSMENUNAME
 
typedef struct _CLSMENUNAMEPCLSMENUNAME
 
typedef struct tagSBDATA SBDATA
 
typedef struct tagSBDATAPSBDATA
 
typedef struct tagSBINFO SBINFO
 
typedef struct tagSBINFOPSBINFO
 
typedef struct tagSBCALC SBCALC
 
typedef struct tagSBCALCPSBCALC
 
typedef enum _GETCPD GETCPD
 
typedef enum _GETCPDPGETCPD
 
typedef struct _CALLPROCDATA CALLPROCDATA
 
typedef struct _CALLPROCDATAPCALLPROCDATA
 
typedef struct _CLS CLS
 
typedef struct _CLSPCLS
 
typedef struct _SBINFOEX SBINFOEX
 
typedef struct _SBINFOEXPSBINFOEX
 
typedef struct _WND WND
 
typedef struct _WNDPWND
 
typedef struct _SBWND SBWND
 
typedef struct _SBWNDPSBWND
 
typedef struct _MDIWND MDIWND
 
typedef struct _MDIWNDPMDIWND
 
typedef struct _MENUWND MENUWND
 
typedef struct _MENUWNDPMENUWND
 
typedef struct _PFNCLIENT PFNCLIENT
 
typedef struct _PFNCLIENTPPFNCLIENT
 
typedef LRESULT(CALLBACKWNDPROC_EX) (HWND, UINT, WPARAM, LPARAM, BOOL)
 
typedef struct _PFNCLIENTWORKER PFNCLIENTWORKER
 
typedef struct _PFNCLIENTWORKERPPFNCLIENTWORKER
 
typedef LONG_PTR(NTAPIPFN_FNID) (PWND, UINT, WPARAM, LPARAM, ULONG_PTR)
 
typedef struct tagOEMBITMAPINFO OEMBITMAPINFO
 
typedef struct tagOEMBITMAPINFOPOEMBITMAPINFO
 
typedef enum _OBI_TYPES OBI_TYPES
 
typedef struct tagMBSTRING MBSTRING
 
typedef struct tagMBSTRINGPMBSTRING
 
typedef struct tagDPISERVERINFO DPISERVERINFO
 
typedef struct tagDPISERVERINFOPDPISERVERINFO
 
typedef struct _PERUSERSERVERINFO PERUSERSERVERINFO
 
typedef struct _PERUSERSERVERINFOPPERUSERSERVERINFO
 
typedef struct tagSERVERINFO SERVERINFO
 
typedef struct tagSERVERINFOPSERVERINFO
 
typedef struct _PROPLISTITEM PROPLISTITEM
 
typedef struct _PROPLISTITEMPPROPLISTITEM
 
typedef struct _PROPERTY PROPERTY
 
typedef struct _PROPERTYPPROPERTY
 
typedef struct _BROADCASTPARM BROADCASTPARM
 
typedef struct _BROADCASTPARMPBROADCASTPARM
 
typedef struct _WNDMSG WNDMSG
 
typedef struct _WNDMSGPWNDMSG
 
typedef struct _SHAREDINFO SHAREDINFO
 
typedef struct _SHAREDINFOPSHAREDINFO
 
typedef struct _USERCONNECT USERCONNECT
 
typedef struct _USERCONNECTPUSERCONNECT
 
typedef struct tagGETCLIPBDATA GETCLIPBDATA
 
typedef struct tagGETCLIPBDATAPGETCLIPBDATA
 
typedef struct tagSETCLIPBDATA SETCLIPBDATA
 
typedef struct tagSETCLIPBDATAPSETCLIPBDATA
 
typedef struct tagCURSORDATA CURSORDATA
 
typedef struct tagCURSORDATAPCURSORDATA
 
typedef struct tagIMEUI IMEUI
 
typedef struct tagIMEUIPIMEUI
 
typedef struct _IMEWND IMEWND
 
typedef struct _IMEWNDPIMEWND
 
typedef enum _CONSOLECONTROL CONSOLECONTROL
 
typedef enum _CONSOLECONTROLPCONSOLECONTROL
 
typedef struct _DESKTOP_CONSOLE_THREAD DESKTOP_CONSOLE_THREAD
 
typedef struct _DESKTOP_CONSOLE_THREADPDESKTOP_CONSOLE_THREAD
 
typedef struct _DRAWICONEXDATA DRAWICONEXDATA
 
typedef struct _DRAWICONEXDATAPDRAWICONEXDATA
 
typedef struct tagDOSENDMESSAGE DOSENDMESSAGE
 
typedef struct tagDOSENDMESSAGEPDOSENDMESSAGE
 
typedef struct _tagFINDEXISTINGCURICONPARAM FINDEXISTINGCURICONPARAM
 
typedef struct _SETSCROLLBARINFO SETSCROLLBARINFO
 
typedef struct _SETSCROLLBARINFOPSETSCROLLBARINFO
 

Enumerations

enum  _HANDLE_TYPE {
  TYPE_FREE = 0 , TYPE_WINDOW = 1 , TYPE_MENU = 2 , TYPE_CURSOR = 3 ,
  TYPE_SETWINDOWPOS = 4 , TYPE_HOOK = 5 , TYPE_CLIPDATA = 6 , TYPE_CALLPROC = 7 ,
  TYPE_ACCELTABLE = 8 , TYPE_DDEACCESS = 9 , TYPE_DDECONV = 10 , TYPE_DDEXACT = 11 ,
  TYPE_MONITOR = 12 , TYPE_KBDLAYOUT = 13 , TYPE_KBDFILE = 14 , TYPE_WINEVENTHOOK = 15 ,
  TYPE_TIMER = 16 , TYPE_INPUTCONTEXT = 17 , TYPE_HIDDATA = 18 , TYPE_DEVICEINFO = 19 ,
  TYPE_TOUCHINPUTINFO = 20 , TYPE_GESTUREINFOOBJ = 21 , TYPE_CTYPES , TYPE_GENERIC = 255
}
 
enum  _USERTHREADINFOCLASS {
  UserThreadShutdownInformation , UserThreadFlags , UserThreadTaskName , UserThreadWOWInformation ,
  UserThreadHungStatus , UserThreadInitiateShutdown , UserThreadEndShutdown , UserThreadUseActiveDesktop ,
  UserThreadUseDesktop , UserThreadRestoreDesktop , UserThreadCsrApiPort
}
 
enum  _GETCPD {
  UserGetCPDA2U = 0x01 , UserGetCPDU2A = 0X02 , UserGetCPDClass = 0X10 , UserGetCPDWindow = 0X20 ,
  UserGetCPDDialog = 0X40 , UserGetCPDWndtoCls = 0X80
}
 
enum  _OBI_TYPES {
  OBI_CLOSE = 0 , OBI_UPARROW = 46 , OBI_UPARROWI = 49 , OBI_DNARROW = 50 ,
  OBI_DNARROWI = 53 , OBI_MNARROW = 62 , OBI_CTYPES = 93
}
 
enum  SimpleCallRoutines {
  NOPARAM_ROUTINE_CREATEMENU , NOPARAM_ROUTINE_CREATEMENUPOPUP , NOPARAM_ROUTINE_ALLOWFOREGNDACTIVATION , NOPARAM_ROUTINE_MSQCLEARWAKEMASK ,
  NOPARAM_ROUTINE_CREATESYSTEMTHREADS , NOPARAM_ROUTINE_DESTROY_CARET , NOPARAM_ROUTINE_ENABLEPROCWNDGHSTING , NOPARAM_ROUTINE_GETDEVICECHANGEINFO ,
  NOPARAM_ROUTINE_GETIMESHOWSTATUS , NOPARAM_ROUTINE_GETINPUTDESKTOP , NOPARAM_ROUTINE_GETMSESSAGEPOS , NOPARAM_ROUTINE_HANDLESYSTHRDCREATFAIL ,
  NOPARAM_ROUTINE_HIDECURSORNOCAPTURE , NOPARAM_ROUTINE_LOADCURSANDICOS , NOPARAM_ROUTINE_LOADUSERAPIHOOK , NOPARAM_ROUTINE_PREPAREFORLOGOFF ,
  NOPARAM_ROUTINE_RELEASECAPTURE , NOPARAM_ROUTINE_RESETDBLCLICK , NOPARAM_ROUTINE_ZAPACTIVEANDFOUS , NOPARAM_ROUTINE_REMOTECONSHDWSTOP ,
  NOPARAM_ROUTINE_REMOTEDISCONNECT , NOPARAM_ROUTINE_REMOTELOGOFF , NOPARAM_ROUTINE_REMOTENTSECURITY , NOPARAM_ROUTINE_REMOTESHDWSETUP ,
  NOPARAM_ROUTINE_REMOTESHDWSTOP , NOPARAM_ROUTINE_REMOTEPASSTHRUENABLE , NOPARAM_ROUTINE_REMOTEPASSTHRUDISABLE , NOPARAM_ROUTINE_REMOTECONNECTSTATE ,
  NOPARAM_ROUTINE_UPDATEPERUSERIMMENABLING , NOPARAM_ROUTINE_USERPWRCALLOUTWORKER , NOPARAM_ROUTINE_WAKERITFORSHTDWN , NOPARAM_ROUTINE_INIT_MESSAGE_PUMP ,
  NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP , ONEPARAM_ROUTINE_BEGINDEFERWNDPOS , ONEPARAM_ROUTINE_GETSENDMSGRECVR , ONEPARAM_ROUTINE_WINDOWFROMDC ,
  ONEPARAM_ROUTINE_ALLOWSETFOREGND , ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT , ONEPARAM_ROUTINE_CSDDEUNINITIALIZE , ONEPARAM_ROUTINE_DIRECTEDYIELD ,
  ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS , ONEPARAM_ROUTINE_GETINPUTEVENT , ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT , ONEPARAM_ROUTINE_GETKEYBOARDTYPE ,
  ONEPARAM_ROUTINE_GETPROCDEFLAYOUT , ONEPARAM_ROUTINE_GETQUEUESTATUS , ONEPARAM_ROUTINE_GETWINSTAINFO , ONEPARAM_ROUTINE_LOCKFOREGNDWINDOW ,
  ONEPARAM_ROUTINE_LOADFONTS , ONEPARAM_ROUTINE_MAPDEKTOPOBJECT , ONEPARAM_ROUTINE_MESSAGEBEEP , ONEPARAM_ROUTINE_PLAYEVENTSOUND ,
  ONEPARAM_ROUTINE_POSTQUITMESSAGE , ONEPARAM_ROUTINE_REALIZEPALETTE , ONEPARAM_ROUTINE_REGISTERLPK , ONEPARAM_ROUTINE_REGISTERSYSTEMTHREAD ,
  ONEPARAM_ROUTINE_REMOTERECONNECT , ONEPARAM_ROUTINE_REMOTETHINWIRESTATUS , ONEPARAM_ROUTINE_RELEASEDC , ONEPARAM_ROUTINE_REMOTENOTIFY ,
  ONEPARAM_ROUTINE_REPLYMESSAGE , ONEPARAM_ROUTINE_SETCARETBLINKTIME , ONEPARAM_ROUTINE_SETDBLCLICKTIME , ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO ,
  ONEPARAM_ROUTINE_SETPROCDEFLAYOUT , ONEPARAM_ROUTINE_SETWATERMARKSTRINGS , ONEPARAM_ROUTINE_SHOWCURSOR , ONEPARAM_ROUTINE_SHOWSTARTGLASS ,
  ONEPARAM_ROUTINE_SWAPMOUSEBUTTON , X_ROUTINE_WOWMODULEUNLOAD , HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW , HWND_ROUTINE_DWP_GETENABLEDPOPUP ,
  HWND_ROUTINE_GETWNDCONTEXTHLPID , HWND_ROUTINE_REGISTERSHELLHOOKWINDOW , HWND_ROUTINE_SETMSGBOX , HWNDOPT_ROUTINE_SETPROGMANWINDOW ,
  HWNDOPT_ROUTINE_SETTASKMANWINDOW , HWNDPARAM_ROUTINE_GETCLASSICOCUR , HWNDPARAM_ROUTINE_CLEARWINDOWSTATE , HWNDPARAM_ROUTINE_KILLSYSTEMTIMER ,
  HWNDPARAM_ROUTINE_SETDIALOGPOINTER , HWNDPARAM_ROUTINE_SETVISIBLE , HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID , HWNDPARAM_ROUTINE_SETWINDOWSTATE ,
  HWNDLOCK_ROUTINE_WINDOWHASSHADOW , HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS , HWNDLOCK_ROUTINE_DRAWMENUBAR , HWNDLOCK_ROUTINE_CHECKIMESHOWSTATUSINTHRD ,
  HWNDLOCK_ROUTINE_GETSYSMENUHANDLE , HWNDLOCK_ROUTINE_REDRAWFRAME , HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK , HWNDLOCK_ROUTINE_SETDLGSYSMENU ,
  HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW , HWNDLOCK_ROUTINE_SETSYSMENU , HWNDLOCK_ROUTINE_UPDATECKIENTRECT , HWNDLOCK_ROUTINE_UPDATEWINDOW ,
  TWOPARAM_ROUTINE_IMESHOWSTATUSCHANGE , TWOPARAM_ROUTINE_ENABLEWINDOW , TWOPARAM_ROUTINE_REDRAWTITLE , TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS ,
  TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW , TWOPARAM_ROUTINE_UPDATEWINDOWS , TWOPARAM_ROUTINE_VALIDATERGN , TWOPARAM_ROUTINE_CHANGEWNDMSGFILTER ,
  TWOPARAM_ROUTINE_GETCURSORPOS , TWOPARAM_ROUTINE_GETHDEVNAME , TWOPARAM_ROUTINE_INITANSIOEM , TWOPARAM_ROUTINE_NLSSENDIMENOTIFY ,
  TWOPARAM_ROUTINE_REGISTERGHSTWND , TWOPARAM_ROUTINE_REGISTERLOGONPROCESS , TWOPARAM_ROUTINE_REGISTERSBLFROSTWND , TWOPARAM_ROUTINE_REGISTERUSERHUNGAPPHANDLERS ,
  TWOPARAM_ROUTINE_SHADOWCLEANUP , TWOPARAM_ROUTINE_REMOTESHADOWSTART , TWOPARAM_ROUTINE_SETCARETPOS , TWOPARAM_ROUTINE_SETCURSORPOS ,
  TWOPARAM_ROUTINE_SETPHYSCURSORPOS , TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK , TWOPARAM_ROUTINE_WOWCLEANUP
}
 
enum  _CONSOLECONTROL { ConsoleCtrlDesktopConsoleThread = 0 , GuiConsoleWndClassAtom = 1 , ConsoleMakePalettePublic = 5 , ConsoleAcquireDisplayOwnership }
 
enum  ThreadStateRoutines {
  THREADSTATE_FOCUSWINDOW = 0 , THREADSTATE_ACTIVEWINDOW , THREADSTATE_CAPTUREWINDOW , THREADSTATE_DEFAULTIMEWINDOW ,
  THREADSTATE_DEFAULTINPUTCONTEXT , THREADSTATE_GETINPUTSTATE , THREADSTATE_GETCURSOR , THREADSTATE_CHANGEBITS ,
  THREADSTATE_UPTIMELASTREAD , THREADSTATE_GETMESSAGEEXTRAINFO , THREADSTATE_INSENDMESSAGE , THREADSTATE_GETMESSAGETIME ,
  THREADSTATE_FOREGROUNDTHREAD , THREADSTATE_IMECOMPATFLAGS , THREADSTATE_OLDKEYBOARDLAYOUT , THREADSTATE_ISWINLOGON ,
  THREADSTATE_UNKNOWN_0x10 , THREADSTATE_CHECKCONIME , THREADSTATE_GETTHREADINFO , THREADSTATE_PROGMANWINDOW ,
  THREADSTATE_TASKMANWINDOW
}
 

Functions

VOID NTAPI RtlInitLargeAnsiString (IN OUT PLARGE_ANSI_STRING, IN PCSZ, IN INT)
 
VOID NTAPI RtlInitLargeUnicodeString (IN OUT PLARGE_UNICODE_STRING, IN PCWSTR, IN INT)
 
BOOL NTAPI RtlLargeStringToUnicodeString (PUNICODE_STRING, PLARGE_STRING)
 
 C_ASSERT (offsetof(IMC, head.h)==0x0)
 
 C_ASSERT (offsetof(IMC, head.cLockObj)==0x4)
 
 C_ASSERT (offsetof(IMC, head.pti)==0x8)
 
 C_ASSERT (offsetof(IMC, pImcNext)==0x14)
 
 C_ASSERT (offsetof(IMC, dwClientImcData)==0x18)
 
 C_ASSERT (offsetof(IMC, hImeWnd)==0x1c)
 
 C_ASSERT (sizeof(CLIENTINFO)<=sizeof(((PTEB) 0) ->Win32ClientInfo))
 
struct _THREADINFOGetW32ThreadInfo (VOID)
 
struct _PROCESSINFOGetW32ProcessInfo (VOID)
 
DWORD NTAPI NtUserAssociateInputContext (HWND hWnd, HIMC hIMC, DWORD dwFlags)
 
NTSTATUS NTAPI NtUserBuildHimcList (DWORD dwThreadId, DWORD dwCount, HIMC *phList, LPDWORD pdwCount)
 
DWORD NTAPI NtUserCalcMenuBar (HWND hwnd, DWORD x, DWORD width, DWORD y, LPRECT prc)
 
DWORD NTAPI NtUserCheckMenuItem (HMENU hmenu, UINT uIDCheckItem, UINT uCheck)
 
DWORD NTAPI NtUserCtxDisplayIOCtl (DWORD dwUnknown1, DWORD dwUnknown2, DWORD dwUnknown3)
 
DWORD APIENTRY NtUserDbgWin32HeapFail (DWORD Unknown0, DWORD Unknown1)
 
DWORD APIENTRY NtUserDbgWin32HeapStat (DWORD Unknown0, DWORD Unknown1)
 
BOOL NTAPI NtUserDeleteMenu (HMENU hMenu, UINT uPosition, UINT uFlags)
 
BOOL NTAPI NtUserDestroyMenu (HMENU hMenu)
 
DWORD NTAPI NtUserDrawMenuBarTemp (HWND hWnd, HDC hDC, PRECT hRect, HMENU hMenu, HFONT hFont)
 
UINT NTAPI NtUserEnableMenuItem (HMENU hMenu, UINT uIDEnableItem, UINT uEnable)
 
BOOL NTAPI NtUserEndMenu (VOID)
 
BOOL NTAPI NtUserGetMenuBarInfo (HWND hwnd, LONG idObject, LONG idItem, PMENUBARINFO pmbi)
 
UINT NTAPI NtUserGetMenuIndex (HMENU hMenu, HMENU hSubMenu)
 
BOOL NTAPI NtUserGetMenuItemRect (HWND hWnd, HMENU hMenu, UINT uItem, LPRECT lprcItem)
 
HMENU NTAPI NtUserGetSystemMenu (HWND hWnd, BOOL bRevert)
 
BOOL NTAPI NtUserHiliteMenuItem (HWND hWnd, HMENU hMenu, UINT uItemHilite, UINT uHilite)
 
int NTAPI NtUserMenuItemFromPoint (HWND hWnd, HMENU hMenu, DWORD X, DWORD Y)
 
BOOL NTAPI NtUserRemoveMenu (HMENU hMenu, UINT uPosition, UINT uFlags)
 
BOOL NTAPI NtUserSetMenu (HWND hWnd, HMENU hMenu, BOOL bRepaint)
 
BOOL NTAPI NtUserSetMenuContextHelpId (HMENU hmenu, DWORD dwContextHelpId)
 
BOOL NTAPI NtUserSetMenuDefaultItem (HMENU hMenu, UINT uItem, UINT fByPos)
 
BOOL NTAPI NtUserSetMenuFlagRtoL (HMENU hMenu)
 
BOOL NTAPI NtUserSetSystemMenu (HWND hWnd, HMENU hMenu)
 
BOOL NTAPI NtUserThunkedMenuInfo (HMENU hMenu, LPCMENUINFO lpcmi)
 
BOOL NTAPI NtUserThunkedMenuItemInfo (HMENU hMenu, UINT uItem, BOOL fByPosition, BOOL bInsert, LPMENUITEMINFOW lpmii, PUNICODE_STRING lpszCaption)
 
BOOL NTAPI NtUserTrackPopupMenuEx (HMENU hmenu, UINT fuFlags, int x, int y, HWND hwnd, LPTPMPARAMS lptpm)
 
HKL NTAPI NtUserActivateKeyboardLayout (HKL hKL, ULONG Flags)
 
DWORD NTAPI NtUserAlterWindowStyle (HWND hWnd, DWORD Index, LONG NewValue)
 
BOOL NTAPI NtUserAttachThreadInput (IN DWORD idAttach, IN DWORD idAttachTo, IN BOOL fAttach)
 
HDC NTAPI NtUserBeginPaint (HWND hWnd, PAINTSTRUCT *lPs)
 
BOOL NTAPI NtUserBitBltSysBmp (HDC hdc, INT nXDest, INT nYDest, INT nWidth, INT nHeight, INT nXSrc, INT nYSrc, DWORD dwRop)
 
BOOL NTAPI NtUserBlockInput (BOOL BlockIt)
 
NTSTATUS NTAPI NtUserBuildHwndList (HDESK hDesktop, HWND hwndParent, BOOLEAN bChildren, ULONG dwThreadId, ULONG cHwnd, HWND *phwndList, ULONG *pcHwndNeeded)
 
NTSTATUS NTAPI NtUserBuildNameList (HWINSTA hWinSta, ULONG dwSize, PVOID lpBuffer, PULONG pRequiredSize)
 
NTSTATUS NTAPI NtUserBuildPropList (HWND hWnd, LPVOID Buffer, DWORD BufferSize, DWORD *Count)
 
DWORD_PTR NTAPI NtUserCallHwnd (HWND hWnd, DWORD Routine)
 
BOOL NTAPI NtUserCallHwndLock (HWND hWnd, DWORD Routine)
 
HWND NTAPI NtUserCallHwndOpt (HWND hWnd, DWORD Routine)
 
DWORD NTAPI NtUserCallHwndParam (HWND hWnd, DWORD_PTR Param, DWORD Routine)
 
DWORD NTAPI NtUserCallHwndParamLock (HWND hWnd, DWORD_PTR Param, DWORD Routine)
 
BOOL NTAPI NtUserCallMsgFilter (LPMSG msg, INT code)
 
LRESULT NTAPI NtUserCallNextHookEx (int Code, WPARAM wParam, LPARAM lParam, BOOL Ansi)
 
DWORD_PTR NTAPI NtUserCallNoParam (DWORD Routine)
 
DWORD_PTR NTAPI NtUserCallOneParam (DWORD_PTR Param, DWORD Routine)
 
DWORD_PTR NTAPI NtUserCallTwoParam (DWORD_PTR Param1, DWORD_PTR Param2, DWORD Routine)
 
BOOL NTAPI NtUserChangeClipboardChain (HWND hWndRemove, HWND hWndNewNext)
 
LONG NTAPI NtUserChangeDisplaySettings (PUNICODE_STRING lpszDeviceName, LPDEVMODEW lpDevMode, DWORD dwflags, LPVOID lParam)
 
BOOL NTAPI NtUserCheckDesktopByThreadId (DWORD dwThreadId)
 
BOOL NTAPI NtUserCheckWindowThreadDesktop (HWND hwnd, DWORD dwThreadId, ULONG ReturnValue)
 
DWORD NTAPI NtUserCheckImeHotKey (UINT uVirtualKey, LPARAM lParam)
 
HWND NTAPI NtUserChildWindowFromPointEx (HWND Parent, LONG x, LONG y, UINT Flags)
 
BOOL NTAPI NtUserClipCursor (RECT *lpRect)
 
BOOL NTAPI NtUserCloseClipboard (VOID)
 
BOOL NTAPI NtUserCloseDesktop (HDESK hDesktop)
 
BOOL NTAPI NtUserCloseWindowStation (HWINSTA hWinSta)
 
NTSTATUS APIENTRY NtUserConsoleControl (IN CONSOLECONTROL ConsoleCtrl, IN PVOID ConsoleCtrlInfo, IN ULONG ConsoleCtrlInfoLength)
 
HANDLE NTAPI NtUserConvertMemHandle (PVOID pData, DWORD cbData)
 
ULONG NTAPI NtUserCopyAcceleratorTable (HACCEL Table, LPACCEL Entries, ULONG EntriesCount)
 
DWORD NTAPI NtUserCountClipboardFormats (VOID)
 
HACCEL NTAPI NtUserCreateAcceleratorTable (LPACCEL Entries, ULONG EntriesCount)
 
BOOL NTAPI NtUserCreateCaret (HWND hWnd, HBITMAP hBitmap, int nWidth, int nHeight)
 
HDESK NTAPI NtUserCreateDesktop (POBJECT_ATTRIBUTES poa, PUNICODE_STRING lpszDesktopDevice, LPDEVMODEW lpdmw, DWORD dwFlags, ACCESS_MASK dwDesiredAccess)
 
HIMC NTAPI NtUserCreateInputContext (ULONG_PTR dwClientImcData)
 
NTSTATUS NTAPI NtUserCreateLocalMemHandle (HANDLE hMem, PVOID pData, DWORD cbData, DWORD *pcbData)
 
HWND NTAPI NtUserCreateWindowEx (DWORD dwExStyle, PLARGE_STRING plstrClassName, PLARGE_STRING plstrClsVersion, PLARGE_STRING plstrWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam, DWORD dwFlags, PVOID acbiBuffer)
 
HWINSTA NTAPI NtUserCreateWindowStation (POBJECT_ATTRIBUTES ObjectAttributes, ACCESS_MASK dwDesiredAccess, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6)
 
BOOL NTAPI NtUserDdeGetQualityOfService (IN HWND hwndClient, IN HWND hWndServer, OUT PSECURITY_QUALITY_OF_SERVICE pqosPrev)
 
DWORD NTAPI NtUserDdeInitialize (DWORD Unknown0, DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4)
 
BOOL NTAPI NtUserDdeSetQualityOfService (IN HWND hwndClient, IN PSECURITY_QUALITY_OF_SERVICE pqosNew, OUT PSECURITY_QUALITY_OF_SERVICE pqosPrev)
 
HDWP NTAPI NtUserDeferWindowPos (HDWP WinPosInfo, HWND Wnd, HWND WndInsertAfter, int x, int y, int cx, int cy, UINT Flags)
 
BOOL NTAPI NtUserDefSetText (HWND WindowHandle, PLARGE_STRING WindowText)
 
BOOLEAN NTAPI NtUserDestroyAcceleratorTable (HACCEL Table)
 
BOOL NTAPI NtUserDestroyCursor (_In_ HANDLE Handle, _In_ BOOL bForce)
 
BOOL NTAPI NtUserDestroyInputContext (HIMC hIMC)
 
BOOLEAN NTAPI NtUserDestroyWindow (HWND Wnd)
 
BOOL NTAPI NtUserDisableThreadIme (DWORD dwThreadID)
 
LRESULT NTAPI NtUserDispatchMessage (PMSG pMsg)
 
BOOL NTAPI NtUserDragDetect (HWND hWnd, POINT pt)
 
DWORD NTAPI NtUserDragObject (HWND hwnd1, HWND hwnd2, UINT u1, DWORD dw1, HCURSOR hc1)
 
BOOL NTAPI NtUserDrawAnimatedRects (HWND hwnd, INT idAni, RECT *lprcFrom, RECT *lprcTo)
 
BOOL NTAPI NtUserDrawCaption (HWND hWnd, HDC hDc, LPCRECT lpRc, UINT uFlags)
 
BOOL NTAPI NtUserDrawCaptionTemp (HWND hWnd, HDC hDC, LPCRECT lpRc, HFONT hFont, HICON hIcon, const PUNICODE_STRING str, UINT uFlags)
 
BOOL NTAPI NtUserDrawIconEx (HDC hdc, int xLeft, int yTop, HICON hIcon, int cxWidth, int cyWidth, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags, BOOL bMetaHDC, PVOID pDIXData)
 
BOOL NTAPI NtUserEmptyClipboard (VOID)
 
BOOL NTAPI NtUserEnableScrollBar (HWND hWnd, UINT wSBflags, UINT wArrows)
 
BOOL NTAPI NtUserEndDeferWindowPosEx (HDWP WinPosInfo, BOOL bAsync)
 
BOOL NTAPI NtUserEndPaint (HWND hWnd, CONST PAINTSTRUCT *lPs)
 
BOOL NTAPI NtUserEnumDisplayDevices (PUNICODE_STRING lpDevice, DWORD iDevNum, PDISPLAY_DEVICEW lpDisplayDevice, DWORD dwFlags)
 
INT NTAPI NtUserEnumDisplayMonitors (OPTIONAL IN HDC hDC, OPTIONAL IN LPCRECT pRect, OPTIONAL OUT HMONITOR *hMonitorList, OPTIONAL OUT LPRECT monitorRectList, OPTIONAL IN DWORD listSize)
 
NTSTATUS NTAPI NtUserEnumDisplaySettings (PUNICODE_STRING lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode, DWORD dwFlags)
 
DWORD NTAPI NtUserEvent (DWORD Unknown0)
 
INT NTAPI NtUserExcludeUpdateRgn (HDC hDC, HWND hWnd)
 
BOOL NTAPI NtUserFillWindow (HWND hWndPaint, HWND hWndPaint1, HDC hDC, HBRUSH hBrush)
 
HWND NTAPI NtUserFindWindowEx (HWND hwndParent, HWND hwndChildAfter, PUNICODE_STRING ucClassName, PUNICODE_STRING ucWindowName, DWORD dwUnknown)
 
BOOL NTAPI NtUserFlashWindowEx (IN PFLASHWINFO pfwi)
 
BOOL NTAPI NtUserGetAltTabInfo (HWND hwnd, INT iItem, PALTTABINFO pati, LPWSTR pszItemText, UINT cchItemText, BOOL Ansi)
 
HWND NTAPI NtUserGetAncestor (HWND hWnd, UINT Flags)
 
DWORD NTAPI NtUserGetAppImeLevel (HWND hWnd)
 
SHORT NTAPI NtUserGetAsyncKeyState (INT Key)
 
 _Success_ (return !=0) _At_(pustrName -> Buffer, _Out_z_bytecap_post_bytecount_(pustrName->MaximumLength, return *2+2)) ULONG APIENTRY NtUserGetAtomName(_In_ ATOM atom, _Inout_ PUNICODE_STRING pustrName)
 
UINT NTAPI NtUserGetCaretBlinkTime (VOID)
 
BOOL NTAPI NtUserGetCaretPos (LPPOINT lpPoint)
 
BOOL NTAPI NtUserGetClassInfo (HINSTANCE hInstance, PUNICODE_STRING ClassName, LPWNDCLASSEXW wcex, LPWSTR *ppszMenuName, BOOL Ansi)
 
INT NTAPI NtUserGetClassName (HWND hWnd, BOOL Real, PUNICODE_STRING ClassName)
 
HANDLE NTAPI NtUserGetClipboardData (UINT fmt, PGETCLIPBDATA pgcd)
 
INT NTAPI NtUserGetClipboardFormatName (UINT uFormat, LPWSTR lpszFormatName, INT cchMaxCount)
 
HWND NTAPI NtUserGetClipboardOwner (VOID)
 
DWORD NTAPI NtUserGetClipboardSequenceNumber (VOID)
 
HWND NTAPI NtUserGetClipboardViewer (VOID)
 
BOOL NTAPI NtUserGetClipCursor (RECT *lpRect)
 
BOOL NTAPI NtUserGetComboBoxInfo (HWND hWnd, PCOMBOBOXINFO pcbi)
 
HBRUSH NTAPI NtUserGetControlBrush (HWND hwnd, HDC hdc, UINT ctlType)
 
HBRUSH NTAPI NtUserGetControlColor (HWND hwndParent, HWND hwnd, HDC hdc, UINT CtlMsg)
 
ULONG_PTR NTAPI NtUserGetCPD (HWND hWnd, GETCPD Flags, ULONG_PTR Proc)
 
HCURSOR NTAPI NtUserGetCursorFrameInfo (HCURSOR hCursor, DWORD istep, INT *rate_jiffies, DWORD *num_steps)
 
BOOL NTAPI NtUserGetCursorInfo (PCURSORINFO pci)
 
HDC NTAPI NtUserGetDC (HWND hWnd)
 
HDC NTAPI NtUserGetDCEx (HWND hWnd, HANDLE hRegion, ULONG Flags)
 
UINT NTAPI NtUserGetDoubleClickTime (VOID)
 
HWND NTAPI NtUserGetForegroundWindow (VOID)
 
DWORD NTAPI NtUserGetGuiResources (HANDLE hProcess, DWORD uiFlags)
 
BOOL NTAPI NtUserGetGUIThreadInfo (DWORD idThread, LPGUITHREADINFO lpgui)
 
BOOL NTAPI NtUserGetIconSize (HANDLE Handle, UINT istepIfAniCur, LONG *plcx, LONG *plcy)
 
BOOL NTAPI NtUserGetImeHotKey (DWORD dwHotKeyId, LPUINT lpuModifiers, LPUINT lpuVirtualKey, LPHKL lphKL)
 
BOOL NTAPI NtUserGetImeInfoEx (PIMEINFOEX pImeInfoEx, IMEINFOEXCLASS SearchType)
 
DWORD NTAPI NtUserGetInternalWindowPos (HWND hwnd, LPRECT rectWnd, LPPOINT ptIcon)
 
HKL NTAPI NtUserGetKeyboardLayout (DWORD dwThreadid)
 
UINT NTAPI NtUserGetKeyboardLayoutList (ULONG nItems, HKL *pHklBuff)
 
BOOL NTAPI NtUserGetKeyboardLayoutName (_Inout_ PUNICODE_STRING pustrName)
 
DWORD NTAPI NtUserGetKeyboardState (LPBYTE Unknown0)
 
DWORD NTAPI NtUserGetKeyboardType (DWORD TypeFlag)
 
DWORD NTAPI NtUserGetKeyNameText (LONG lParam, LPWSTR lpString, int nSize)
 
SHORT NTAPI NtUserGetKeyState (INT VirtKey)
 
BOOL NTAPI NtUserGetLayeredWindowAttributes (HWND hwnd, COLORREF *pcrKey, BYTE *pbAlpha, DWORD *pdwFlags)
 
DWORD NTAPI NtUserGetListBoxInfo (HWND hWnd)
 
BOOL APIENTRY NtUserGetMessage (PMSG pMsg, HWND hWnd, UINT MsgFilterMin, UINT MsgFilterMax)
 
DWORD NTAPI NtUserGetMouseMovePointsEx (UINT cbSize, LPMOUSEMOVEPOINT lppt, LPMOUSEMOVEPOINT lpptBuf, int nBufPoints, DWORD resolution)
 
BOOL NTAPI NtUserGetObjectInformation (HANDLE hObject, DWORD nIndex, PVOID pvInformation, DWORD nLength, PDWORD nLengthNeeded)
 
HWND NTAPI NtUserGetOpenClipboardWindow (VOID)
 
INT NTAPI NtUserGetPriorityClipboardFormat (UINT *paFormatPriorityList, INT cFormats)
 
HWINSTA NTAPI NtUserGetProcessWindowStation (VOID)
 
DWORD NTAPI NtUserGetRawInputBuffer (PRAWINPUT pData, PUINT pcbSize, UINT cbSizeHeader)
 
DWORD NTAPI NtUserGetRawInputData (HRAWINPUT hRawInput, UINT uiCommand, LPVOID pData, PUINT pcbSize, UINT cbSizeHeader)
 
DWORD NTAPI NtUserGetRawInputDeviceInfo (HANDLE hDevice, UINT uiCommand, LPVOID pData, PUINT pcbSize)
 
DWORD NTAPI NtUserGetRawInputDeviceList (PRAWINPUTDEVICELIST pRawInputDeviceList, PUINT puiNumDevices, UINT cbSize)
 
DWORD NTAPI NtUserGetRegisteredRawInputDevices (PRAWINPUTDEVICE pRawInputDevices, PUINT puiNumDevices, UINT cbSize)
 
BOOL NTAPI NtUserGetScrollBarInfo (HWND hWnd, LONG idObject, PSCROLLBARINFO psbi)
 
HDESK NTAPI NtUserGetThreadDesktop (DWORD dwThreadId, HDESK hConsoleDesktop)
 
DWORD_PTR NTAPI NtUserGetThreadState (DWORD Routine)
 
BOOLEAN NTAPI NtUserGetTitleBarInfo (HWND hwnd, PTITLEBARINFO pti)
 
BOOL NTAPI NtUserGetUpdateRect (HWND hWnd, LPRECT lpRect, BOOL fErase)
 
INT NTAPI NtUserGetUpdateRgn (HWND hWnd, HRGN hRgn, BOOL bErase)
 
HDC NTAPI NtUserGetWindowDC (HWND hWnd)
 
BOOL NTAPI NtUserGetWindowPlacement (HWND hWnd, WINDOWPLACEMENT *lpwndpl)
 
PCLS NTAPI NtUserGetWOWClass (HINSTANCE hInstance, PUNICODE_STRING ClassName)
 
DWORD NTAPI NtUserHardErrorControl (DWORD dwUnknown1, DWORD dwUnknown2, DWORD dwUnknown3)
 
BOOL NTAPI NtUserImpersonateDdeClientWindow (HWND hWndClient, HWND hWndServer)
 
NTSTATUS NTAPI NtUserInitialize (DWORD dwWinVersion, HANDLE hPowerRequestEvent, HANDLE hMediaRequestEvent)
 
NTSTATUS NTAPI NtUserInitializeClientPfnArrays (PPFNCLIENT pfnClientA, PPFNCLIENT pfnClientW, PPFNCLIENTWORKER pfnClientWorker, HINSTANCE hmodUser)
 
DWORD NTAPI NtUserInitTask (DWORD Unknown0, DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6, DWORD Unknown7, DWORD Unknown8, DWORD Unknown9, DWORD Unknown10, DWORD Unknown11)
 
INT NTAPI NtUserInternalGetWindowText (HWND hWnd, LPWSTR lpString, INT nMaxCount)
 
BOOL NTAPI NtUserInvalidateRect (HWND hWnd, CONST RECT *lpRect, BOOL bErase)
 
BOOL NTAPI NtUserInvalidateRgn (HWND hWnd, HRGN hRgn, BOOL bErase)
 
BOOL NTAPI NtUserIsClipboardFormatAvailable (UINT format)
 
BOOL NTAPI NtUserKillTimer (HWND hWnd, UINT_PTR uIDEvent)
 
HKL NTAPI NtUserLoadKeyboardLayoutEx (IN HANDLE hFile, IN DWORD offTable, IN PVOID pTables, IN HKL hOldKL, IN PUNICODE_STRING puszKLID, IN DWORD dwNewKL, IN UINT Flags)
 
BOOL NTAPI NtUserLockWindowStation (HWINSTA hWindowStation)
 
BOOL NTAPI NtUserLockWindowUpdate (HWND hWnd)
 
BOOL NTAPI NtUserLockWorkStation (VOID)
 
UINT NTAPI NtUserMapVirtualKeyEx (UINT keyCode, UINT transType, DWORD keyboardId, HKL dwhkl)
 
BOOL NTAPI NtUserMessageCall (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, ULONG_PTR ResultInfo, DWORD dwType, BOOL Ansi)
 
DWORD NTAPI NtUserMinMaximize (HWND hWnd, UINT cmd, BOOL Hide)
 
DWORD NTAPI NtUserMNDragLeave (VOID)
 
DWORD NTAPI NtUserMNDragOver (DWORD Unknown0, DWORD Unknown1)
 
DWORD NTAPI NtUserModifyUserStartupInfoFlags (DWORD Unknown0, DWORD Unknown1)
 
BOOL NTAPI NtUserMoveWindow (HWND hWnd, int X, int Y, int nWidth, int nHeight, BOOL bRepaint)
 
DWORD NTAPI NtUserNotifyIMEStatus (HWND hwnd, BOOL fOpen, DWORD dwConversion)
 
BOOL NTAPI NtUserNotifyProcessCreate (HANDLE NewProcessId, HANDLE ParentThreadId, ULONG dwUnknown, ULONG CreateFlags)
 
VOID NTAPI NtUserNotifyWinEvent (DWORD Event, HWND hWnd, LONG idObject, LONG idChild)
 
BOOL NTAPI NtUserOpenClipboard (HWND hWnd, DWORD Unknown1)
 
HDESK NTAPI NtUserOpenDesktop (POBJECT_ATTRIBUTES ObjectAttributes, DWORD dwFlags, ACCESS_MASK dwDesiredAccess)
 
HDESK NTAPI NtUserOpenInputDesktop (DWORD dwFlags, BOOL fInherit, ACCESS_MASK dwDesiredAccess)
 
HWINSTA NTAPI NtUserOpenWindowStation (POBJECT_ATTRIBUTES ObjectAttributes, ACCESS_MASK dwDesiredAccess)
 
BOOL NTAPI NtUserPaintDesktop (HDC hDC)
 
DWORD NTAPI NtUserPaintMenuBar (HWND hWnd, HDC hDC, ULONG left, ULONG right, ULONG top, BOOL bActive)
 
BOOL APIENTRY NtUserPeekMessage (PMSG pMsg, HWND hWnd, UINT MsgFilterMin, UINT MsgFilterMax, UINT RemoveMsg)
 
BOOL NTAPI NtUserPostMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
 
BOOL NTAPI NtUserPostThreadMessage (DWORD idThread, UINT Msg, WPARAM wParam, LPARAM lParam)
 
BOOL NTAPI NtUserPrintWindow (HWND hwnd, HDC hdcBlt, UINT nFlags)
 
NTSTATUS NTAPI NtUserProcessConnect (IN HANDLE ProcessHandle, OUT PUSERCONNECT pUserConnect, IN ULONG Size)
 
NTSTATUS NTAPI NtUserQueryInformationThread (IN HANDLE ThreadHandle, IN USERTHREADINFOCLASS ThreadInformationClass, OUT PVOID ThreadInformation, IN ULONG ThreadInformationLength)
 
DWORD_PTR NTAPI NtUserQueryInputContext (HIMC hIMC, DWORD dwType)
 
DWORD NTAPI NtUserQuerySendMessage (DWORD Unknown0)
 
DWORD NTAPI NtUserQueryUserCounters (DWORD Unknown0, DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4)
 
DWORD_PTR NTAPI NtUserQueryWindow (HWND hWnd, DWORD Index)
 
BOOL NTAPI NtUserRealInternalGetMessage (LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg, BOOL bGMSG)
 
HWND NTAPI NtUserRealChildWindowFromPoint (HWND Parent, LONG x, LONG y)
 
BOOL NTAPI NtUserRealWaitMessageEx (DWORD dwWakeMask, UINT uTimeout)
 
BOOL NTAPI NtUserRedrawWindow (HWND hWnd, CONST RECT *lprcUpdate, HRGN hrgnUpdate, UINT flags)
 
RTL_ATOM NTAPI NtUserRegisterClassExWOW (WNDCLASSEXW *lpwcx, PUNICODE_STRING pustrClassName, PUNICODE_STRING pustrCVersion, PCLSMENUNAME pClassMenuName, DWORD fnID, DWORD Flags, LPDWORD pWow)
 
BOOL NTAPI NtUserRegisterRawInputDevices (IN PCRAWINPUTDEVICE pRawInputDevices, IN UINT uiNumDevices, IN UINT cbSize)
 
BOOL NTAPI NtUserRegisterUserApiHook (PUNICODE_STRING m_dllname1, PUNICODE_STRING m_funname1, DWORD dwUnknown3, DWORD dwUnknown4)
 
BOOL NTAPI NtUserRegisterHotKey (HWND hWnd, int id, UINT fsModifiers, UINT vk)
 
DWORD NTAPI NtUserRegisterTasklist (DWORD Unknown0)
 
UINT NTAPI NtUserRegisterWindowMessage (PUNICODE_STRING MessageName)
 
DWORD NTAPI NtUserRemoteConnect (DWORD dwUnknown1, DWORD dwUnknown2, DWORD dwUnknown3)
 
DWORD NTAPI NtUserRemoteRedrawRectangle (DWORD dwUnknown1, DWORD dwUnknown2, DWORD dwUnknown3, DWORD dwUnknown4)
 
DWORD NTAPI NtUserRemoteRedrawScreen (VOID)
 
DWORD NTAPI NtUserRemoteStopScreenUpdates (VOID)
 
HANDLE NTAPI NtUserRemoveProp (HWND hWnd, ATOM Atom)
 
HDESK NTAPI NtUserResolveDesktop (IN HANDLE ProcessHandle, IN PUNICODE_STRING DesktopPath, IN BOOL bInherit, OUT HWINSTA *phWinSta)
 
DWORD NTAPI NtUserResolveDesktopForWOW (DWORD Unknown0)
 
BOOL NTAPI NtUserSBGetParms (HWND hwnd, int fnBar, PSBDATA pSBData, LPSCROLLINFO lpsi)
 
BOOL NTAPI NtUserScrollDC (HDC hDC, int dx, int dy, CONST RECT *lprcScroll, CONST RECT *lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate)
 
DWORD NTAPI NtUserScrollWindowEx (HWND hWnd, INT dx, INT dy, const RECT *rect, const RECT *clipRect, HRGN hrgnUpdate, LPRECT rcUpdate, UINT flags)
 
UINT NTAPI NtUserSendInput (UINT nInputs, LPINPUT pInput, INT cbSize)
 
HWND NTAPI NtUserSetActiveWindow (HWND Wnd)
 
BOOL NTAPI NtUserSetAppImeLevel (HWND hWnd, DWORD dwLevel)
 
HWND NTAPI NtUserSetCapture (HWND Wnd)
 
ULONG_PTR NTAPI NtUserSetClassLong (_In_ HWND hWnd, _In_ INT Offset, _In_ ULONG dwNewLong, _In_ BOOL Ansi)
 
WORD NTAPI NtUserSetClassWord (HWND hWnd, INT nIndex, WORD wNewWord)
 
HANDLE NTAPI NtUserSetClipboardData (UINT fmt, HANDLE hMem, PSETCLIPBDATA scd)
 
HWND NTAPI NtUserSetClipboardViewer (HWND hWndNewViewer)
 
HPALETTE NTAPI NtUserSelectPalette (HDC hDC, HPALETTE hpal, BOOL ForceBackground)
 
DWORD NTAPI NtUserSetConsoleReserveKeys (DWORD Unknown0, DWORD Unknown1)
 
HCURSOR NTAPI NtUserSetCursor (HCURSOR hCursor)
 
BOOL NTAPI NtUserSetCursorContents (HANDLE Handle, PICONINFO IconInfo)
 
BOOL NTAPI NtUserSetCursorIconData (_In_ HCURSOR hCursor, _In_opt_ PUNICODE_STRING pustrModule, _In_opt_ PUNICODE_STRING puSrcName, _In_ const CURSORDATA *pCursorData)
 
HICON NTAPI NtUserFindExistingCursorIcon (_In_ PUNICODE_STRING pustrModule, _In_ PUNICODE_STRING pustrRsrc, _In_ FINDEXISTINGCURICONPARAM *param)
 
DWORD NTAPI NtUserSetDbgTag (DWORD Unknown0, DWORD Unknown1)
 
DWORD APIENTRY NtUserSetDbgTagCount (DWORD Unknown0)
 
HWND NTAPI NtUserSetFocus (HWND hWnd)
 
BOOL NTAPI NtUserSetImeHotKey (DWORD dwHotKeyId, UINT uModifiers, UINT uVirtualKey, HKL hKL, DWORD dwAction)
 
BOOL NTAPI NtUserSetImeInfoEx (PIMEINFOEX pImeInfoEx)
 
BOOL NTAPI NtUserSetImeOwnerWindow (HWND hImeWnd, HWND hwndFocus)
 
DWORD NTAPI NtUserSetInformationProcess (DWORD dwUnknown1, DWORD dwUnknown2, DWORD dwUnknown3, DWORD dwUnknown4)
 
NTSTATUS NTAPI NtUserSetInformationThread (IN HANDLE ThreadHandle, IN USERTHREADINFOCLASS ThreadInformationClass, IN PVOID ThreadInformation, IN ULONG ThreadInformationLength)
 
DWORD NTAPI NtUserSetInternalWindowPos (HWND hwnd, UINT showCmd, LPRECT rect, LPPOINT pt)
 
BOOL NTAPI NtUserSetKeyboardState (LPBYTE lpKeyState)
 
BOOL NTAPI NtUserSetLayeredWindowAttributes (HWND hwnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags)
 
BOOL NTAPI NtUserSetLogonNotifyWindow (HWND hWnd)
 
BOOL NTAPI NtUserSetObjectInformation (HANDLE hObject, DWORD nIndex, PVOID pvInformation, DWORD nLength)
 
HWND NTAPI NtUserSetParent (HWND hWndChild, HWND hWndNewParent)
 
BOOL NTAPI NtUserSetProcessWindowStation (HWINSTA hWindowStation)
 
BOOL NTAPI NtUserSetProp (HWND hWnd, ATOM Atom, HANDLE Data)
 
DWORD NTAPI NtUserSetRipFlags (DWORD Unknown0)
 
DWORD NTAPI NtUserSetScrollInfo (HWND hwnd, int fnBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
 
BOOL NTAPI NtUserSetShellWindowEx (HWND hwndShell, HWND hwndShellListView)
 
BOOL NTAPI NtUserSetSysColors (int cElements, IN CONST INT *lpaElements, IN CONST COLORREF *lpaRgbValues, FLONG Flags)
 
BOOL NTAPI NtUserSetSystemCursor (HCURSOR hcur, DWORD id)
 
BOOL NTAPI NtUserSetThreadDesktop (HDESK hDesktop)
 
DWORD NTAPI NtUserSetThreadState (DWORD Unknown0, DWORD Unknown1)
 
UINT_PTR NTAPI NtUserSetSystemTimer (HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc)
 
DWORD NTAPI NtUserSetThreadLayoutHandles (HKL hNewKL, HKL hOldKL)
 
UINT_PTR NTAPI NtUserSetTimer (HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc)
 
BOOL NTAPI NtUserSetWindowFNID (HWND hWnd, WORD fnID)
 
LONG NTAPI NtUserSetWindowLong (HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
 
BOOL NTAPI NtUserSetWindowPlacement (HWND hWnd, WINDOWPLACEMENT *lpwndpl)
 
BOOL NTAPI NtUserSetWindowPos (HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags)
 
INT NTAPI NtUserSetWindowRgn (HWND hWnd, HRGN hRgn, BOOL bRedraw)
 
HHOOK NTAPI NtUserSetWindowsHookAW (int idHook, HOOKPROC lpfn, BOOL Ansi)
 
HHOOK NTAPI NtUserSetWindowsHookEx (HINSTANCE Mod, PUNICODE_STRING ModuleName, DWORD ThreadId, int HookId, HOOKPROC HookProc, BOOL Ansi)
 
BOOL NTAPI NtUserSetWindowStationUser (IN HWINSTA hWindowStation, IN PLUID pluid, IN PSID psid OPTIONAL, IN DWORD size)
 
WORD NTAPI NtUserSetWindowWord (HWND hWnd, INT Index, WORD NewVal)
 
HWINEVENTHOOK NTAPI NtUserSetWinEventHook (UINT eventMin, UINT eventMax, HMODULE hmodWinEventProc, PUNICODE_STRING puString, WINEVENTPROC lpfnWinEventProc, DWORD idProcess, DWORD idThread, UINT dwflags)
 
BOOL NTAPI NtUserShowCaret (HWND hWnd)
 
BOOL NTAPI NtUserHideCaret (HWND hWnd)
 
DWORD NTAPI NtUserShowScrollBar (HWND hWnd, int wBar, DWORD bShow)
 
BOOL NTAPI NtUserShowWindow (HWND hWnd, LONG nCmdShow)
 
BOOL NTAPI NtUserShowWindowAsync (HWND hWnd, LONG nCmdShow)
 
BOOL NTAPI NtUserSoundSentry (VOID)
 
BOOL NTAPI NtUserSwitchDesktop (HDESK hDesktop)
 
BOOL NTAPI NtUserSystemParametersInfo (UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
 
DWORD NTAPI NtUserTestForInteractiveUser (DWORD dwUnknown1)
 
INT NTAPI NtUserToUnicodeEx (UINT wVirtKey, UINT wScanCode, PBYTE lpKeyState, LPWSTR pwszBuff, int cchBuff, UINT wFlags, HKL dwhkl)
 
BOOL NTAPI NtUserTrackMouseEvent (LPTRACKMOUSEEVENT lpEventTrack)
 
int NTAPI NtUserTranslateAccelerator (HWND Window, HACCEL Table, LPMSG Message)
 
BOOL NTAPI NtUserTranslateMessage (LPMSG lpMsg, UINT flags)
 
BOOL NTAPI NtUserUnhookWindowsHookEx (HHOOK Hook)
 
BOOL NTAPI NtUserUnhookWinEvent (HWINEVENTHOOK hWinEventHook)
 
BOOL NTAPI NtUserUnloadKeyboardLayout (HKL hKl)
 
BOOL NTAPI NtUserUnlockWindowStation (HWINSTA hWindowStation)
 
BOOL NTAPI NtUserUnregisterClass (PUNICODE_STRING ClassNameOrAtom, HINSTANCE hInstance, PCLSMENUNAME pClassMenuName)
 
BOOL NTAPI NtUserUnregisterHotKey (HWND hWnd, int id)
 
BOOL NTAPI NtUserUnregisterUserApiHook (VOID)
 
BOOL NTAPI NtUserUpdateInputContext (HIMC hIMC, DWORD dwType, DWORD_PTR dwValue)
 
DWORD NTAPI NtUserUpdateInstance (DWORD Unknown0, DWORD Unknown1, DWORD Unknown2)
 
BOOL NTAPI NtUserUpdateLayeredWindow (HWND hwnd, HDC hdcDst, POINT *pptDst, SIZE *psize, HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend, DWORD dwFlags, RECT *prcDirty)
 
BOOL NTAPI NtUserUpdatePerUserSystemParameters (DWORD dwReserved, BOOL bEnable)
 
BOOL NTAPI NtUserUserHandleGrantAccess (IN HANDLE hUserHandle, IN HANDLE hJob, IN BOOL bGrant)
 
BOOL NTAPI NtUserValidateHandleSecure (HANDLE hHdl)
 
BOOL NTAPI NtUserValidateRect (HWND hWnd, CONST RECT *lpRect)
 
BOOL APIENTRY NtUserValidateTimerCallback (LPARAM lParam)
 
DWORD NTAPI NtUserVkKeyScanEx (WCHAR wChar, HKL KeyboardLayout, BOOL bUsehHK)
 
DWORD NTAPI NtUserWaitForInputIdle (IN HANDLE hProcess, IN DWORD dwMilliseconds, IN BOOL bSharedWow)
 
DWORD NTAPI NtUserWaitForMsgAndEvent (DWORD Unknown0)
 
BOOL NTAPI NtUserWaitMessage (VOID)
 
DWORD NTAPI NtUserWin32PoolAllocationStats (DWORD Unknown0, DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5)
 
HWND NTAPI NtUserWindowFromPoint (LONG X, LONG Y)
 
DWORD NTAPI NtUserYieldTask (VOID)
 
BOOL NTAPI NtUserGetMonitorInfo (IN HMONITOR hMonitor, OUT LPMONITORINFO pMonitorInfo)
 
HMONITOR NTAPI NtUserMonitorFromPoint (IN POINT point, IN DWORD dwFlags)
 
HMONITOR NTAPI NtUserMonitorFromRect (IN LPCRECT pRect, IN DWORD dwFlags)
 
HMONITOR NTAPI NtUserMonitorFromWindow (IN HWND hWnd, IN DWORD dwFlags)
 
BOOL NTAPI NtUserSetScrollBarInfo (HWND hwnd, LONG idObject, SETSCROLLBARINFO *info)
 
ULONG RtlGetExpWinVer (_In_ PVOID BaseAddress)
 

Variables

_Out_opt_ PICONINFO IconInfo
 
_Out_opt_ PICONINFO _Inout_opt_ PUNICODE_STRING lpInstName
 
_Out_opt_ PICONINFO _Inout_opt_ PUNICODE_STRING _Inout_opt_ PUNICODE_STRING lpResName
 
_Out_opt_ PICONINFO _Inout_opt_ PUNICODE_STRING _Inout_opt_ PUNICODE_STRING _Out_opt_ LPDWORD pbpp
 
_Out_opt_ PICONINFO _Inout_opt_ PUNICODE_STRING _Inout_opt_ PUNICODE_STRING _Out_opt_ LPDWORD _In_ BOOL bInternal
 

Macro Definition Documentation

◆ CI_AIMMACTIVATED

#define CI_AIMMACTIVATED   0x00000800 /* Active IMM (AIMM) */

Definition at line 311 of file ntuser.h.

◆ CI_CICERO_STARTED

#define CI_CICERO_STARTED   0x00000200 /* Is Cicero started in the thread? */

Definition at line 309 of file ntuser.h.

◆ CI_CLASSESREGISTERED

#define CI_CLASSESREGISTERED   0x00000020

Definition at line 305 of file ntuser.h.

◆ CI_CTFCOINIT

#define CI_CTFCOINIT   0x00000080 /* Did CTF CoInitialize? */

Definition at line 307 of file ntuser.h.

◆ CI_CTFTIM

#define CI_CTFTIM   0x00000100 /* CTF Thread Input Manager (TIM) */

Definition at line 308 of file ntuser.h.

◆ CI_CURTHPRHOOK

#define CI_CURTHPRHOOK   0x00000010

Definition at line 304 of file ntuser.h.

◆ CI_IMMACTIVATE

#define CI_IMMACTIVATE   0x00000040 /* IMM/IME (Asian input) */

Definition at line 306 of file ntuser.h.

◆ CI_INITTHREAD

#define CI_INITTHREAD   0x00000008

Definition at line 303 of file ntuser.h.

◆ CI_QUEUEMSG

#define CI_QUEUEMSG   0x00000002

Definition at line 301 of file ntuser.h.

◆ CI_TRANSACTION

#define CI_TRANSACTION   0x00000001

Definition at line 300 of file ntuser.h.

◆ CI_TSFDISABLED

#define CI_TSFDISABLED   0x00000400 /* TSF (Text Services Framework a.k.a. Cicero) */

Definition at line 310 of file ntuser.h.

◆ CI_WOW

#define CI_WOW   0x00000004

Definition at line 302 of file ntuser.h.

◆ COLOR_LAST

#define COLOR_LAST   COLOR_MENUBAR

Definition at line 945 of file ntuser.h.

◆ CSF_ANSIPROC

#define CSF_ANSIPROC   0x0002

Definition at line 557 of file ntuser.h.

◆ CSF_CACHEDSMICON

#define CSF_CACHEDSMICON   0x0040

Definition at line 562 of file ntuser.h.

◆ CSF_SERVERSIDEPROC

#define CSF_SERVERSIDEPROC   0x0001

Definition at line 556 of file ntuser.h.

◆ CSF_SYSTEMCLASS

#define CSF_SYSTEMCLASS   0x0008

Definition at line 559 of file ntuser.h.

◆ CSF_WIN40COMPAT

#define CSF_WIN40COMPAT   0x0080

Definition at line 563 of file ntuser.h.

◆ CSF_WOWCLASS

#define CSF_WOWCLASS   0x0010

Definition at line 560 of file ntuser.h.

◆ CSF_WOWDEFERDESTROY

#define CSF_WOWDEFERDESTROY   0x0004

Definition at line 558 of file ntuser.h.

◆ CSF_WOWEXTRA

#define CSF_WOWEXTRA   0x0020

Definition at line 561 of file ntuser.h.

◆ CTI_INSENDMESSAGE

#define CTI_INSENDMESSAGE   0x0002

Definition at line 162 of file ntuser.h.

◆ CTI_THREADSYSLOCK

#define CTI_THREADSYSLOCK   0x0001

Definition at line 161 of file ntuser.h.

◆ CURSORF_ACON

#define CURSORF_ACON   0x0008

Definition at line 1202 of file ntuser.h.

◆ CURSORF_ACONFRAME

#define CURSORF_ACONFRAME   0x0040

Definition at line 1204 of file ntuser.h.

◆ CURSORF_CURRENT

#define CURSORF_CURRENT   0x0200

Definition at line 1207 of file ntuser.h.

◆ CURSORF_FROMRESOURCE

#define CURSORF_FROMRESOURCE   0x0001

Definition at line 1199 of file ntuser.h.

◆ CURSORF_GLOBAL

#define CURSORF_GLOBAL   0x0002

Definition at line 1200 of file ntuser.h.

◆ CURSORF_LINKED

#define CURSORF_LINKED   0x0100

Definition at line 1206 of file ntuser.h.

◆ CURSORF_LRSHARED

#define CURSORF_LRSHARED   0x0004

Definition at line 1201 of file ntuser.h.

◆ CURSORF_SECRET

#define CURSORF_SECRET   0x0080

Definition at line 1205 of file ntuser.h.

◆ CURSORF_WOWCLEANUP

#define CURSORF_WOWCLEANUP   0x0010

Definition at line 1203 of file ntuser.h.

◆ FIRST_USER_HANDLE

#define FIRST_USER_HANDLE   0x0020 /* first possible value for low word of user handle */

Definition at line 10 of file ntuser.h.

◆ FNID_BROADCASTSYSTEMMESSAGE

#define FNID_BROADCASTSYSTEMMESSAGE   0x02B5

Definition at line 887 of file ntuser.h.

◆ FNID_BUTTON

#define FNID_BUTTON   0x02A1

Definition at line 866 of file ntuser.h.

◆ FNID_CALLWNDPROC

#define FNID_CALLWNDPROC   0x02AB

Definition at line 876 of file ntuser.h.

◆ FNID_CALLWNDPROCRET

#define FNID_CALLWNDPROCRET   0x02AC

Definition at line 877 of file ntuser.h.

◆ FNID_COMBOBOX

#define FNID_COMBOBOX   0x02A2

Definition at line 867 of file ntuser.h.

◆ FNID_COMBOLBOX

#define FNID_COMBOLBOX   0x02A3

Definition at line 868 of file ntuser.h.

◆ FNID_DDEML

#define FNID_DDEML   0x2000 /* Registers DDEML */

Definition at line 897 of file ntuser.h.

◆ FNID_DEFWINDOWPROC

#define FNID_DEFWINDOWPROC   0x029E

Definition at line 863 of file ntuser.h.

◆ FNID_DESKTOP

#define FNID_DESKTOP   0x029D

Definition at line 862 of file ntuser.h.

◆ FNID_DESTROY

#define FNID_DESTROY   0x4000 /* This is sent when WM_NCDESTROY or in the support routine. */

Definition at line 898 of file ntuser.h.

◆ FNID_DIALOG

#define FNID_DIALOG   0x02A4

Definition at line 869 of file ntuser.h.

◆ FNID_EDIT

#define FNID_EDIT   0x02A5

Definition at line 870 of file ntuser.h.

◆ FNID_FIRST

#define FNID_FIRST   0x029A

Definition at line 858 of file ntuser.h.

◆ FNID_FREED

#define FNID_FREED   0x8000 /* Window being Freed... */

Definition at line 900 of file ntuser.h.

◆ FNID_GHOST

#define FNID_GHOST   0x02AA

Definition at line 875 of file ntuser.h.

◆ FNID_HKINLPCWPEXSTRUCT

#define FNID_HKINLPCWPEXSTRUCT   0x02AD

Definition at line 878 of file ntuser.h.

◆ FNID_HKINLPCWPRETEXSTRUCT

#define FNID_HKINLPCWPRETEXSTRUCT   0x02AE

Definition at line 879 of file ntuser.h.

◆ FNID_ICONTITLE

#define FNID_ICONTITLE   0x029B

Definition at line 860 of file ntuser.h.

◆ FNID_IME

#define FNID_IME   0x02A9

Definition at line 874 of file ntuser.h.

◆ FNID_LAST

Definition at line 892 of file ntuser.h.

◆ FNID_LISTBOX

#define FNID_LISTBOX   0x02A6

Definition at line 871 of file ntuser.h.

◆ FNID_MB_DLGPROC

#define FNID_MB_DLGPROC   0x02AF

Definition at line 880 of file ntuser.h.

◆ FNID_MDIACTIVATEDLGPROC

#define FNID_MDIACTIVATEDLGPROC   0x02B0

Definition at line 881 of file ntuser.h.

◆ FNID_MDICLIENT

#define FNID_MDICLIENT   0x02A7

Definition at line 872 of file ntuser.h.

◆ FNID_MENU

#define FNID_MENU   0x029C

Definition at line 861 of file ntuser.h.

◆ FNID_MESSAGEWND

#define FNID_MESSAGEWND   0x029F

Definition at line 864 of file ntuser.h.

◆ FNID_NUM

#define FNID_NUM   (FNID_LAST - FNID_FIRST + 1)

Definition at line 894 of file ntuser.h.

◆ FNID_NUMSERVERPROC

#define FNID_NUMSERVERPROC   (FNID_SWITCH - FNID_FIRST + 1)

Definition at line 895 of file ntuser.h.

◆ FNID_SCROLLBAR

#define FNID_SCROLLBAR   0x029A

Definition at line 859 of file ntuser.h.

◆ FNID_SENDMESSAGE

#define FNID_SENDMESSAGE   0x02B1

Definition at line 882 of file ntuser.h.

◆ FNID_SENDMESSAGECALLBACK

#define FNID_SENDMESSAGECALLBACK   0x02B8

Definition at line 890 of file ntuser.h.

◆ FNID_SENDMESSAGECALLPROC

#define FNID_SENDMESSAGECALLPROC   0x02B4

Definition at line 886 of file ntuser.h.

◆ FNID_SENDMESSAGEFF

#define FNID_SENDMESSAGEFF   0x02B2

Definition at line 883 of file ntuser.h.

◆ FNID_SENDMESSAGEWTOOPTION

#define FNID_SENDMESSAGEWTOOPTION   0x02B3

Definition at line 885 of file ntuser.h.

◆ FNID_SENDNOTIFYMESSAGE

#define FNID_SENDNOTIFYMESSAGE   0x02B7

Definition at line 889 of file ntuser.h.

◆ FNID_STATIC

#define FNID_STATIC   0x02A8

Definition at line 873 of file ntuser.h.

◆ FNID_SWITCH

#define FNID_SWITCH   0x02A0

Definition at line 865 of file ntuser.h.

◆ FNID_TOOLTIPS

#define FNID_TOOLTIPS   0x02B6

Definition at line 888 of file ntuser.h.

◆ GETPFNCLIENTA

#define GETPFNCLIENTA (   fnid)     (WNDPROC)(*(((ULONG_PTR *)&gpsi->apfnClientA) + (fnid - FNID_FIRST)))

Definition at line 904 of file ntuser.h.

◆ GETPFNCLIENTW

#define GETPFNCLIENTW (   fnid)     (WNDPROC)(*(((ULONG_PTR *)&gpsi->apfnClientW) + (fnid - FNID_FIRST)))

Definition at line 906 of file ntuser.h.

◆ GETPFNSERVER

#define GETPFNSERVER (   fnid)    gpsi->aStoCidPfn[fnid - FNID_FIRST]

Definition at line 909 of file ntuser.h.

◆ GetWin32ClientInfo

#define GetWin32ClientInfo ( )    ((PCLIENTINFO)(NtCurrentTeb()->Win32ClientInfo))

Definition at line 352 of file ntuser.h.

◆ GWLP_MDIWND

#define GWLP_MDIWND   4

Definition at line 786 of file ntuser.h.

◆ HANDLEENTRY_DESTROY

#define HANDLEENTRY_DESTROY   1

Definition at line 13 of file ntuser.h.

◆ HANDLEENTRY_INDESTROY

#define HANDLEENTRY_INDESTROY   2

Definition at line 14 of file ntuser.h.

◆ HRGN_MONITOR

#define HRGN_MONITOR   ((HRGN)2) /* region from monitor region. */

Definition at line 362 of file ntuser.h.

◆ HRGN_NULL

#define HRGN_NULL   ((HRGN)0) /* NULL empty region */

Definition at line 360 of file ntuser.h.

◆ HRGN_WINDOW

#define HRGN_WINDOW   ((HRGN)1) /* region from window rcWindow */

Definition at line 361 of file ntuser.h.

◆ HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOWMOUSE

#define HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOWMOUSE   0xfffd0052

Definition at line 3585 of file ntuser.h.

◆ HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT

#define HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT   0x1005

Definition at line 3595 of file ntuser.h.

◆ ICLASS_TO_MASK

#define ICLASS_TO_MASK (   iCls)    (1 << ((iCls)))

Definition at line 902 of file ntuser.h.

◆ ICLS_BUTTON

#define ICLS_BUTTON   0

Definition at line 912 of file ntuser.h.

◆ ICLS_COMBOBOX

#define ICLS_COMBOBOX   5

Definition at line 917 of file ntuser.h.

◆ ICLS_COMBOLBOX

#define ICLS_COMBOLBOX   7

Definition at line 919 of file ntuser.h.

◆ ICLS_DDEML16BIT

#define ICLS_DDEML16BIT   10

Definition at line 922 of file ntuser.h.

◆ ICLS_DDEMLCLIENTA

#define ICLS_DDEMLCLIENTA   11

Definition at line 923 of file ntuser.h.

◆ ICLS_DDEMLCLIENTW

#define ICLS_DDEMLCLIENTW   12

Definition at line 924 of file ntuser.h.

◆ ICLS_DDEMLEVENT

#define ICLS_DDEMLEVENT   8

Definition at line 920 of file ntuser.h.

◆ ICLS_DDEMLMOTHER

#define ICLS_DDEMLMOTHER   9

Definition at line 921 of file ntuser.h.

◆ ICLS_DDEMLSERVERA

#define ICLS_DDEMLSERVERA   13

Definition at line 925 of file ntuser.h.

◆ ICLS_DDEMLSERVERW

#define ICLS_DDEMLSERVERW   14

Definition at line 926 of file ntuser.h.

◆ ICLS_DESKTOP

#define ICLS_DESKTOP   17

Definition at line 929 of file ntuser.h.

◆ ICLS_DIALOG

#define ICLS_DIALOG   18

Definition at line 930 of file ntuser.h.

◆ ICLS_EDIT

#define ICLS_EDIT   1

Definition at line 913 of file ntuser.h.

◆ ICLS_END

#define ICLS_END   31

Definition at line 943 of file ntuser.h.

◆ ICLS_GHOST

#define ICLS_GHOST   16

Definition at line 928 of file ntuser.h.

◆ ICLS_ICONTITLE

#define ICLS_ICONTITLE   21

Definition at line 933 of file ntuser.h.

◆ ICLS_IME

#define ICLS_IME   15

Definition at line 927 of file ntuser.h.

◆ ICLS_LISTBOX

#define ICLS_LISTBOX   3

Definition at line 915 of file ntuser.h.

◆ ICLS_MDICLIENT

#define ICLS_MDICLIENT   6

Definition at line 918 of file ntuser.h.

◆ ICLS_MENU

#define ICLS_MENU   19

Definition at line 931 of file ntuser.h.

◆ ICLS_NOTUSED

#define ICLS_NOTUSED   23

Definition at line 937 of file ntuser.h.

◆ ICLS_SCROLLBAR

#define ICLS_SCROLLBAR   4

Definition at line 916 of file ntuser.h.

◆ ICLS_STATIC

#define ICLS_STATIC   2

Definition at line 914 of file ntuser.h.

◆ ICLS_SWITCH

#define ICLS_SWITCH   20

Definition at line 932 of file ntuser.h.

◆ ICLS_TOOLTIPS

#define ICLS_TOOLTIPS   22

Definition at line 934 of file ntuser.h.

◆ ICLS_UNKNOWN

#define ICLS_UNKNOWN   22

Definition at line 936 of file ntuser.h.

◆ IS_16BIT_MODE

#define IS_16BIT_MODE ( )    (GetWin32ClientInfo()->dwTIFlags & TIF_16BIT)

Definition at line 1211 of file ntuser.h.

◆ IS_CICERO_MODE

#define IS_CICERO_MODE ( )    (gpsi && (gpsi->dwSRVIFlags & SRVINFO_CICERO_ENABLED))

Definition at line 1210 of file ntuser.h.

◆ IS_IMM_MODE

#define IS_IMM_MODE ( )    (gpsi && (gpsi->dwSRVIFlags & SRVINFO_IMM32))

Definition at line 1209 of file ntuser.h.

◆ LAST_USER_HANDLE

#define LAST_USER_HANDLE   0xffef /* last possible value for low word of user handle */

Definition at line 11 of file ntuser.h.

◆ MAX_MB_STRINGS

#define MAX_MB_STRINGS   11

Definition at line 946 of file ntuser.h.

◆ MFS_HBMMENUBMP

#define MFS_HBMMENUBMP   0x20000000

Definition at line 368 of file ntuser.h.

◆ MFT_RTOL

#define MFT_RTOL   0x6000

Definition at line 365 of file ntuser.h.

◆ MNF_DESKTOPMN

#define MNF_DESKTOPMN   0x0040

Definition at line 406 of file ntuser.h.

◆ MNF_INACTIVE

#define MNF_INACTIVE   0x0010

Definition at line 404 of file ntuser.h.

◆ MNF_POPUP

#define MNF_POPUP   0x0001

Definition at line 402 of file ntuser.h.

◆ MNF_RTOL

#define MNF_RTOL   0x0020

Definition at line 405 of file ntuser.h.

◆ MNF_SYSDESKMN

#define MNF_SYSDESKMN   0x0080

Definition at line 407 of file ntuser.h.

◆ MNF_SYSMENU

#define MNF_SYSMENU   0x0200

Definition at line 410 of file ntuser.h.

◆ MNF_SYSSUBMENU

#define MNF_SYSSUBMENU   0x0100

Definition at line 408 of file ntuser.h.

◆ MNF_UNDERLINE

#define MNF_UNDERLINE   0x0004

Definition at line 403 of file ntuser.h.

◆ MSQ_STATE_ACTIVE

#define MSQ_STATE_ACTIVE   0x2

Definition at line 3588 of file ntuser.h.

◆ MSQ_STATE_CAPTURE

#define MSQ_STATE_CAPTURE   0x1

Definition at line 3587 of file ntuser.h.

◆ MSQ_STATE_CARET

#define MSQ_STATE_CARET   0x6

Definition at line 3592 of file ntuser.h.

◆ MSQ_STATE_FOCUS

#define MSQ_STATE_FOCUS   0x3

Definition at line 3589 of file ntuser.h.

◆ MSQ_STATE_MENUOWNER

#define MSQ_STATE_MENUOWNER   0x4

Definition at line 3590 of file ntuser.h.

◆ MSQ_STATE_MOVESIZE

#define MSQ_STATE_MOVESIZE   0x5

Definition at line 3591 of file ntuser.h.

◆ NB_HOOKS

#define NB_HOOKS   (WH_MAXHOOK - WH_MINHOOK + 1)

Definition at line 127 of file ntuser.h.

◆ NO_SELECTED_ITEM

#define NO_SELECTED_ITEM   0xffff

Definition at line 413 of file ntuser.h.

◆ NOPARAM_ROUTINE_ISCONSOLEMODE

#define NOPARAM_ROUTINE_ISCONSOLEMODE   0xffff0001

Definition at line 3580 of file ntuser.h.

◆ NtUserSetWindowLongPtr

#define NtUserSetWindowLongPtr   NtUserSetWindowLong

Definition at line 3288 of file ntuser.h.

◆ NUM_SYSCOLORS

#define NUM_SYSCOLORS   31

Definition at line 954 of file ntuser.h.

◆ ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING

#define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING   0xfffe000d

Definition at line 3581 of file ntuser.h.

◆ ONEPARAM_ROUTINE_GETDESKTOPMAPPING

#define ONEPARAM_ROUTINE_GETDESKTOPMAPPING   0xfffe000e

Definition at line 3582 of file ntuser.h.

◆ PROPERTY_FLAG_SYSTEM

#define PROPERTY_FLAG_SYSTEM   1

Definition at line 1096 of file ntuser.h.

◆ PUSIF_COMBOBOXANIMATION

#define PUSIF_COMBOBOXANIMATION   0x04

Definition at line 995 of file ntuser.h.

◆ PUSIF_KEYBOARDCUES

#define PUSIF_KEYBOARDCUES   0x20

Definition at line 997 of file ntuser.h.

◆ PUSIF_LISTBOXSMOOTHSCROLLING

#define PUSIF_LISTBOXSMOOTHSCROLLING   0x08

Definition at line 996 of file ntuser.h.

◆ PUSIF_PALETTEDISPLAY

#define PUSIF_PALETTEDISPLAY   0x01

Definition at line 993 of file ntuser.h.

◆ PUSIF_SNAPTO

#define PUSIF_SNAPTO   0x02

Definition at line 994 of file ntuser.h.

◆ PWND_BOTTOM

#define PWND_BOTTOM   ((PWND)1)

Definition at line 769 of file ntuser.h.

◆ QUERY_WINDOW_ACTIVE

#define QUERY_WINDOW_ACTIVE   0x02

Definition at line 2829 of file ntuser.h.

◆ QUERY_WINDOW_ACTIVE_IME

#define QUERY_WINDOW_ACTIVE_IME   0x09

Definition at line 2836 of file ntuser.h.

◆ QUERY_WINDOW_DEFAULT_ICONTEXT

#define QUERY_WINDOW_DEFAULT_ICONTEXT   0x08

Definition at line 2835 of file ntuser.h.

◆ QUERY_WINDOW_DEFAULT_IME

#define QUERY_WINDOW_DEFAULT_IME   0x07

Definition at line 2834 of file ntuser.h.

◆ QUERY_WINDOW_FOCUS

#define QUERY_WINDOW_FOCUS   0x03

Definition at line 2830 of file ntuser.h.

◆ QUERY_WINDOW_FOREGROUND

#define QUERY_WINDOW_FOREGROUND   0x06

Definition at line 2833 of file ntuser.h.

◆ QUERY_WINDOW_ISHUNG

#define QUERY_WINDOW_ISHUNG   0x04

Definition at line 2831 of file ntuser.h.

◆ QUERY_WINDOW_REAL_ID

#define QUERY_WINDOW_REAL_ID   0x05

Definition at line 2832 of file ntuser.h.

◆ QUERY_WINDOW_UNIQUE_PROCESS_ID

#define QUERY_WINDOW_UNIQUE_PROCESS_ID   0x00

Definition at line 2827 of file ntuser.h.

◆ QUERY_WINDOW_UNIQUE_THREAD_ID

#define QUERY_WINDOW_UNIQUE_THREAD_ID   0x01

Definition at line 2828 of file ntuser.h.

◆ SRV_EVENT_CREATE

#define SRV_EVENT_CREATE   0x8000

Definition at line 1088 of file ntuser.h.

◆ SRV_EVENT_END_APPLICATION

#define SRV_EVENT_END_APPLICATION   0x0002

Definition at line 1082 of file ntuser.h.

◆ SRV_EVENT_LOCATIONCHANGE

#define SRV_EVENT_LOCATIONCHANGE   0x0040

Definition at line 1087 of file ntuser.h.

◆ SRV_EVENT_MENU

#define SRV_EVENT_MENU   0x0001

Definition at line 1081 of file ntuser.h.

◆ SRV_EVENT_NAMECHANGE

#define SRV_EVENT_NAMECHANGE   0x0008

Definition at line 1084 of file ntuser.h.

◆ SRV_EVENT_RUNNING

#define SRV_EVENT_RUNNING   0x0004

Definition at line 1083 of file ntuser.h.

◆ SRV_EVENT_STATECHANGE

#define SRV_EVENT_STATECHANGE   0x0020

Definition at line 1086 of file ntuser.h.

◆ SRV_EVENT_VALUECHANGE

#define SRV_EVENT_VALUECHANGE   0x0010

Definition at line 1085 of file ntuser.h.

◆ SRVINFO_APIHOOK

#define SRVINFO_APIHOOK   0x0010

Definition at line 950 of file ntuser.h.

◆ SRVINFO_CICERO_ENABLED

#define SRVINFO_CICERO_ENABLED   0x0020

Definition at line 951 of file ntuser.h.

◆ SRVINFO_DBCSENABLED

#define SRVINFO_DBCSENABLED   0x0002

Definition at line 948 of file ntuser.h.

◆ SRVINFO_IMM32

#define SRVINFO_IMM32   0x0004

Definition at line 949 of file ntuser.h.

◆ SRVINFO_KBDPREF

#define SRVINFO_KBDPREF   0x0080

Definition at line 952 of file ntuser.h.

◆ TIF_16BIT

#define TIF_16BIT   0x00000002

Definition at line 264 of file ntuser.h.

◆ TIF_ALLOWFOREGROUNDACTIVATE

#define TIF_ALLOWFOREGROUNDACTIVATE   0x00000020

Definition at line 268 of file ntuser.h.

◆ TIF_ALLOWOTHERACCOUNTHOOK

#define TIF_ALLOWOTHERACCOUNTHOOK   0x00800000

Definition at line 286 of file ntuser.h.

◆ TIF_ANSILENGTH

#define TIF_ANSILENGTH   0x10000000

Definition at line 290 of file ntuser.h.

◆ TIF_CSRSSTHREAD

#define TIF_CSRSSTHREAD   0x00000008

Definition at line 266 of file ntuser.h.

◆ TIF_DELAYEDEVENT

#define TIF_DELAYEDEVENT   0x00080000

Definition at line 282 of file ntuser.h.

◆ TIF_DISABLEHOOKS

#define TIF_DISABLEHOOKS   0x20000000

Definition at line 291 of file ntuser.h.

◆ TIF_DISABLEIME

#define TIF_DISABLEIME   0x04000000

Definition at line 288 of file ntuser.h.

◆ TIF_DONTATTACHQUEUE

#define TIF_DONTATTACHQUEUE   0x00000040

Definition at line 269 of file ntuser.h.

◆ TIF_DONTJOURNALATTACH

#define TIF_DONTJOURNALATTACH   0x00000080

Definition at line 270 of file ntuser.h.

◆ TIF_DOSEMULATOR

#define TIF_DOSEMULATOR   0x00020000

Definition at line 280 of file ntuser.h.

◆ TIF_FIRSTIDLE

#define TIF_FIRSTIDLE   0x00002000

Definition at line 276 of file ntuser.h.

◆ TIF_GLOBALHOOKER

#define TIF_GLOBALHOOKER   0x00040000

Definition at line 281 of file ntuser.h.

◆ TIF_GUITHREADINITIALIZED

#define TIF_GUITHREADINITIALIZED   0x02000000

Definition at line 287 of file ntuser.h.

◆ TIF_IGNOREPLAYBACKDELAY

#define TIF_IGNOREPLAYBACKDELAY   0x00400000

Definition at line 285 of file ntuser.h.

◆ TIF_INACTIVATEAPPMSG

#define TIF_INACTIVATEAPPMSG   0x00000200

Definition at line 272 of file ntuser.h.

◆ TIF_INCLEANUP

#define TIF_INCLEANUP   0x00000001

Definition at line 263 of file ntuser.h.

◆ TIF_INGETTEXTLENGTH

#define TIF_INGETTEXTLENGTH   0x08000000

Definition at line 289 of file ntuser.h.

◆ TIF_MOVESIZETRACKING

#define TIF_MOVESIZETRACKING   0x00008000

Definition at line 278 of file ntuser.h.

◆ TIF_MSGPOSCHANGED

#define TIF_MSGPOSCHANGED   0x00100000

Definition at line 283 of file ntuser.h.

◆ TIF_PALETTEAWARE

#define TIF_PALETTEAWARE   0x00000800

Definition at line 274 of file ntuser.h.

◆ TIF_SHAREDWOW

#define TIF_SHAREDWOW   0x00001000

Definition at line 275 of file ntuser.h.

◆ TIF_SHUTDOWNCOMPLETE

#define TIF_SHUTDOWNCOMPLETE   0x00200000

Definition at line 284 of file ntuser.h.

◆ TIF_SPINNING

#define TIF_SPINNING   0x00000400

Definition at line 273 of file ntuser.h.

◆ TIF_SYSTEMTHREAD

#define TIF_SYSTEMTHREAD   0x00000004

Definition at line 265 of file ntuser.h.

◆ TIF_TRACKRECTVISIBLE

#define TIF_TRACKRECTVISIBLE   0x00000010

Definition at line 267 of file ntuser.h.

◆ TIF_VDMAPP

#define TIF_VDMAPP   0x00010000

Definition at line 279 of file ntuser.h.

◆ TIF_WAITFORINPUTIDLE

#define TIF_WAITFORINPUTIDLE   0x00004000

Definition at line 277 of file ntuser.h.

◆ TIF_WOW64

#define TIF_WOW64   0x00000100

Definition at line 271 of file ntuser.h.

◆ TWOPARAM_ROUTINE_ROS_UPDATEUISTATE

#define TWOPARAM_ROUTINE_ROS_UPDATEUISTATE   0x1004

Definition at line 3594 of file ntuser.h.

◆ TWOPARAM_ROUTINE_SETGUITHRDHANDLE

#define TWOPARAM_ROUTINE_SETGUITHRDHANDLE   0xfffd0051

Definition at line 3584 of file ntuser.h.

◆ TWOPARAM_ROUTINE_SETMENUBARHEIGHT

#define TWOPARAM_ROUTINE_SETMENUBARHEIGHT   0xfffd0050

Definition at line 3583 of file ntuser.h.

◆ USER_VERSION

#define USER_VERSION   MAKELONG(0x0000, 0x0005)

Definition at line 1149 of file ntuser.h.

◆ UserHMGetHandle

#define UserHMGetHandle (   obj)    ((obj)->head.h)

Definition at line 230 of file ntuser.h.

◆ UserHMSetHandle

#define UserHMSetHandle (   obj,
  handle 
)    ((obj)->head.h = (handle))

Definition at line 231 of file ntuser.h.

◆ WEF_SETBYWNDPTI

#define WEF_SETBYWNDPTI   0x0001

Definition at line 236 of file ntuser.h.

◆ WIN32K_VERSION

#define WIN32K_VERSION   NTDDI_WINXPSP2 /* FIXME: this should go somewhere else */

Definition at line 1494 of file ntuser.h.

◆ WNDS2_ANYSCROLLBUTTONDOWN

#define WNDS2_ANYSCROLLBUTTONDOWN   0X00100000

Definition at line 661 of file ntuser.h.

◆ WNDS2_BOTTOMMOST

#define WNDS2_BOTTOMMOST   0X00000020

Definition at line 646 of file ntuser.h.

◆ WNDS2_CAPTIONTEXTTRUNCATED

#define WNDS2_CAPTIONTEXTTRUNCATED   0X08000000

Definition at line 666 of file ntuser.h.

◆ WNDS2_CLOSEBUTTONDOWN

#define WNDS2_CLOSEBUTTONDOWN   0X00001000

Definition at line 653 of file ntuser.h.

◆ WNDS2_ENDPAINTINVALIDATE

#define WNDS2_ENDPAINTINVALIDATE   0X00000002

Definition at line 642 of file ntuser.h.

◆ WNDS2_FORCEFULLNCPAINTCLIPRGN

#define WNDS2_FORCEFULLNCPAINTCLIPRGN   0X00800000

Definition at line 664 of file ntuser.h.

◆ WNDS2_FORCENCPAINT

#define WNDS2_FORCENCPAINT   0X00400000

Definition at line 663 of file ntuser.h.

◆ WNDS2_FULLSCREEN

#define WNDS2_FULLSCREEN   0X00000040

Definition at line 647 of file ntuser.h.

◆ WNDS2_FULLSCREENMODE

#define WNDS2_FULLSCREENMODE   0X01000000

Definition at line 665 of file ntuser.h.

◆ WNDS2_HASCLIENTEDGE

#define WNDS2_HASCLIENTEDGE   0X00000010

Definition at line 645 of file ntuser.h.

◆ WNDS2_HELPBUTTONDOWN

#define WNDS2_HELPBUTTONDOWN   0X00008000

Definition at line 656 of file ntuser.h.

◆ WNDS2_INDESTROY

#define WNDS2_INDESTROY   0X00000080

Definition at line 648 of file ntuser.h.

◆ WNDS2_MAXIMIZEBUTTONDOWN

#define WNDS2_MAXIMIZEBUTTONDOWN   0X00002000

Definition at line 654 of file ntuser.h.

◆ WNDS2_MAXIMIZEDMONITORREGION

#define WNDS2_MAXIMIZEDMONITORREGION   0X00000800

Definition at line 652 of file ntuser.h.

◆ WNDS2_MINIMIZEBUTTONDOWN

#define WNDS2_MINIMIZEBUTTONDOWN   0X00004000

Definition at line 655 of file ntuser.h.

◆ WNDS2_NOMINMAXANIMATERECTS

#define WNDS2_NOMINMAXANIMATERECTS   0X10000000

Definition at line 667 of file ntuser.h.

◆ WNDS2_OLDUI

#define WNDS2_OLDUI   0X00000008

Definition at line 644 of file ntuser.h.

◆ WNDS2_SCROLLBARLINEDOWNBTNDOWN

#define WNDS2_SCROLLBARLINEDOWNBTNDOWN   0X00080000

Definition at line 660 of file ntuser.h.

◆ WNDS2_SCROLLBARLINEUPBTNDOWN

#define WNDS2_SCROLLBARLINEUPBTNDOWN   0X00010000

Definition at line 657 of file ntuser.h.

◆ WNDS2_SCROLLBARPAGEDOWNBTNDOWN

#define WNDS2_SCROLLBARPAGEDOWNBTNDOWN   0X00040000

Definition at line 659 of file ntuser.h.

◆ WNDS2_SCROLLBARPAGEUPBTNDOWN

#define WNDS2_SCROLLBARPAGEUPBTNDOWN   0X00020000

Definition at line 658 of file ntuser.h.

◆ WNDS2_SCROLLBARVERTICALTRACKING

#define WNDS2_SCROLLBARVERTICALTRACKING   0X00200000

Definition at line 662 of file ntuser.h.

◆ WNDS2_SHELLHOOKREGISTERED

#define WNDS2_SHELLHOOKREGISTERED   0X40000000

Definition at line 669 of file ntuser.h.

◆ WNDS2_SMALLICONFROMWMQUERYDRAG

#define WNDS2_SMALLICONFROMWMQUERYDRAG   0X20000000

Definition at line 668 of file ntuser.h.

◆ WNDS2_STARTPAINT

#define WNDS2_STARTPAINT   0X00000004

Definition at line 643 of file ntuser.h.

◆ WNDS2_WIN31COMPAT

#define WNDS2_WIN31COMPAT   0X00000100

Definition at line 649 of file ntuser.h.

◆ WNDS2_WIN40COMPAT

#define WNDS2_WIN40COMPAT   0X00000200

Definition at line 650 of file ntuser.h.

◆ WNDS2_WIN50COMPAT

#define WNDS2_WIN50COMPAT   0X00000400

Definition at line 651 of file ntuser.h.

◆ WNDS2_WMCREATEMSGPROCESSED

#define WNDS2_WMCREATEMSGPROCESSED   0X80000000

Definition at line 670 of file ntuser.h.

◆ WNDS2_WMPAINTSENT

#define WNDS2_WMPAINTSENT   0X00000001

Definition at line 641 of file ntuser.h.

◆ WNDS_ACTIVEFRAME

#define WNDS_ACTIVEFRAME   0X00000040

Definition at line 611 of file ntuser.h.

◆ WNDS_ANSICREATOR

#define WNDS_ANSICREATOR   0x20000000

Definition at line 634 of file ntuser.h.

◆ WNDS_ANSIWINDOWPROC

#define WNDS_ANSIWINDOWPROC   0x00080000

Definition at line 624 of file ntuser.h.

◆ WNDS_BEINGACTIVATED

#define WNDS_BEINGACTIVATED   0x00100000

Definition at line 625 of file ntuser.h.

◆ WNDS_DESTROYED

#define WNDS_DESTROYED   0x80000000

Definition at line 636 of file ntuser.h.

◆ WNDS_DIALOGWINDOW

#define WNDS_DIALOGWINDOW   0X00010000

Definition at line 621 of file ntuser.h.

◆ WNDS_ERASEBACKGROUND

#define WNDS_ERASEBACKGROUND   0X00000400

Definition at line 615 of file ntuser.h.

◆ WNDS_FORCEMENUDRAW

#define WNDS_FORCEMENUDRAW   0X00008000

Definition at line 620 of file ntuser.h.

◆ WNDS_HASCAPTION

#define WNDS_HASCAPTION   0X00000008

Definition at line 608 of file ntuser.h.

◆ WNDS_HASCREATESTRUCTNAME

#define WNDS_HASCREATESTRUCTNAME   0X00020000

Definition at line 622 of file ntuser.h.

◆ WNDS_HASHORIZONTALSCROLLBAR

#define WNDS_HASHORIZONTALSCROLLBAR   0X00000004

Definition at line 607 of file ntuser.h.

◆ WNDS_HASMENU

#define WNDS_HASMENU   0X00000001

Definition at line 605 of file ntuser.h.

◆ WNDS_HASPALETTE

#define WNDS_HASPALETTE   0x00200000

Definition at line 626 of file ntuser.h.

◆ WNDS_HASSPB

#define WNDS_HASSPB   0X00000080

Definition at line 612 of file ntuser.h.

◆ WNDS_HASVERTICALSCROOLLBAR

#define WNDS_HASVERTICALSCROOLLBAR   0X00000002

Definition at line 606 of file ntuser.h.

◆ WNDS_HIDDENPOPUP

#define WNDS_HIDDENPOPUP   0X00004000

Definition at line 619 of file ntuser.h.

◆ WNDS_INTERNALPAINT

#define WNDS_INTERNALPAINT   0X00001000

Definition at line 617 of file ntuser.h.

◆ WNDS_MAXIMIZESTOMONITOR

#define WNDS_MAXIMIZESTOMONITOR   0x40000000

Definition at line 635 of file ntuser.h.

◆ WNDS_MSGBOX

#define WNDS_MSGBOX   0X00000020

Definition at line 610 of file ntuser.h.

◆ WNDS_NONCPAINT

#define WNDS_NONCPAINT   0X00000100

Definition at line 613 of file ntuser.h.

◆ WNDS_PAINTNOTPROCESSED

#define WNDS_PAINTNOTPROCESSED   0x00400000

Definition at line 627 of file ntuser.h.

◆ WNDS_RECEIVEDQUERYSUSPENDMSG

#define WNDS_RECEIVEDQUERYSUSPENDMSG   0x01000000

Definition at line 629 of file ntuser.h.

◆ WNDS_RECEIVEDSUSPENDMSG

#define WNDS_RECEIVEDSUSPENDMSG   0x02000000

Definition at line 630 of file ntuser.h.

◆ WNDS_REDRAWFRAMEIFHUNG

#define WNDS_REDRAWFRAMEIFHUNG   0x10000000

Definition at line 633 of file ntuser.h.

◆ WNDS_REDRAWIFHUNG

#define WNDS_REDRAWIFHUNG   0x08000000

Definition at line 632 of file ntuser.h.

◆ WNDS_SENDERASEBACKGROUND

#define WNDS_SENDERASEBACKGROUND   0X00000200

Definition at line 614 of file ntuser.h.

◆ WNDS_SENDNCPAINT

#define WNDS_SENDNCPAINT   0X00000800

Definition at line 616 of file ntuser.h.

◆ WNDS_SENDSIZEMOVEMSGS

#define WNDS_SENDSIZEMOVEMSGS   0X00000010

Definition at line 609 of file ntuser.h.

◆ WNDS_SERVERSIDEWINDOWPROC

#define WNDS_SERVERSIDEWINDOWPROC   0x00040000 /* Call proc inside win32k. */

Definition at line 623 of file ntuser.h.

◆ WNDS_SYNCPAINTPENDING

#define WNDS_SYNCPAINTPENDING   0x00800000

Definition at line 628 of file ntuser.h.

◆ WNDS_TOGGLETOPMOST

#define WNDS_TOGGLETOPMOST   0x04000000

Definition at line 631 of file ntuser.h.

◆ WNDS_UPDATEDIRTY

#define WNDS_UPDATEDIRTY   0X00002000

Definition at line 618 of file ntuser.h.

◆ WNDSACTIVEFRAME

#define WNDSACTIVEFRAME   0x00000006

Definition at line 638 of file ntuser.h.

◆ WPF_MAXINIT

#define WPF_MAXINIT   0x0010

Definition at line 687 of file ntuser.h.

◆ WPF_MININIT

#define WPF_MININIT   0x0008

Definition at line 686 of file ntuser.h.

◆ WS_EX2_CHILDNOACTIVATE

#define WS_EX2_CHILDNOACTIVATE   0X00000800

Definition at line 684 of file ntuser.h.

◆ WS_EX2_CLIPBOARDLISTENER

#define WS_EX2_CLIPBOARDLISTENER   0X00000001

Definition at line 673 of file ntuser.h.

◆ WS_EX2_CONSOLEWINDOW

#define WS_EX2_CONSOLEWINDOW   0X00000400

Definition at line 683 of file ntuser.h.

◆ WS_EX2_HASOVERLAY

#define WS_EX2_HASOVERLAY   0X00000200

Definition at line 682 of file ntuser.h.

◆ WS_EX2_HIGHTDPI_UNAWAR

#define WS_EX2_HIGHTDPI_UNAWAR   0X00000040

Definition at line 679 of file ntuser.h.

◆ WS_EX2_LAYEREDFORDWM

#define WS_EX2_LAYEREDFORDWM   0X00000010

Definition at line 677 of file ntuser.h.

◆ WS_EX2_LAYEREDINVALIDATE

#define WS_EX2_LAYEREDINVALIDATE   0X00000002

Definition at line 674 of file ntuser.h.

◆ WS_EX2_LAYEREDLIMBO

#define WS_EX2_LAYEREDLIMBO   0X00000020

Definition at line 678 of file ntuser.h.

◆ WS_EX2_LINKED

#define WS_EX2_LINKED   0X00000008

Definition at line 676 of file ntuser.h.

◆ WS_EX2_REDIRECTEDFORPRINT

#define WS_EX2_REDIRECTEDFORPRINT   0X00000004

Definition at line 675 of file ntuser.h.

◆ WS_EX2_VERTICALLYMAXIMIZEDLEFT

#define WS_EX2_VERTICALLYMAXIMIZEDLEFT   0X00000080

Definition at line 680 of file ntuser.h.

◆ WS_EX2_VERTICALLYMAXIMIZEDRIGHT

#define WS_EX2_VERTICALLYMAXIMIZEDRIGHT   0X00000100

Definition at line 681 of file ntuser.h.

Typedef Documentation

◆ BROADCASTPARM

◆ CALLBACKWND

◆ CALLPROCDATA

◆ CLIENTINFO

◆ CLIENTTHREADINFO

◆ CLIPBOARDDATA

◆ CLS

typedef struct _CLS CLS

◆ CLSMENUNAME

◆ CONSOLECONTROL

◆ CURSORDATA

◆ DDEPACK

◆ DESKTOP_CONSOLE_THREAD

◆ DESKTOPINFO

◆ DOSENDMESSAGE

◆ DPISERVERINFO

◆ DRAWICONEXDATA

◆ FINDEXISTINGCURICONPARAM

◆ GETCLIPBDATA

◆ GETCPD

typedef enum _GETCPD GETCPD

◆ HANDLE_TYPE

◆ HEAD

typedef struct _HEAD HEAD

◆ HOOK

typedef struct tagHOOK HOOK

◆ IMC

typedef struct tagIMC IMC

◆ IMEUI

◆ IMEWND

◆ ITEM

typedef struct tagITEM ITEM

◆ LARGE_ANSI_STRING

◆ LARGE_STRING

◆ LARGE_UNICODE_STRING

◆ MBSTRING

◆ MDIWND

◆ MENU

typedef struct tagMENU MENU

◆ MENULIST

◆ MENUWND

◆ OBI_TYPES

◆ OEMBITMAPINFO

◆ PBROADCASTPARM

◆ PCALLBACKWND

◆ PCALLPROCDATA

◆ PCLIENTINFO

◆ PCLIENTTHREADINFO

◆ PCLIPBOARDDATA

◆ PCLS

typedef struct _CLS * PCLS

◆ PCLSMENUNAME

◆ PCONSOLECONTROL

◆ PCURSORDATA

◆ PDDEPACK

◆ PDESKTOP_CONSOLE_THREAD

◆ PDESKTOPINFO

◆ PDOSENDMESSAGE

◆ PDPISERVERINFO

◆ PDRAWICONEXDATA

◆ PERUSERSERVERINFO

◆ PFN_FNID

typedef LONG_PTR(NTAPI * PFN_FNID) (PWND, UINT, WPARAM, LPARAM, ULONG_PTR)

Definition at line 849 of file ntuser.h.

◆ PFNCLIENT

◆ PFNCLIENTWORKER

◆ PGETCLIPBDATA

◆ PGETCPD

typedef enum _GETCPD * PGETCPD

◆ PHANDLE_TYPE

◆ PHEAD

typedef struct _HEAD * PHEAD

◆ PHOOK

typedef struct tagHOOK * PHOOK

◆ PIMC

typedef struct tagIMC * PIMC

◆ PIMEUI

typedef struct tagIMEUI * PIMEUI

◆ PIMEWND

typedef struct _IMEWND * PIMEWND

◆ PITEM

typedef struct tagITEM * PITEM

◆ PLARGE_ANSI_STRING

◆ PLARGE_STRING

◆ PLARGE_UNICODE_STRING

◆ PMBSTRING

◆ PMDIWND

typedef struct _MDIWND * PMDIWND

◆ PMENU

typedef struct tagMENU * PMENU

◆ PMENULIST

◆ PMENUWND

◆ POEMBITMAPINFO

◆ POPUPMENU

◆ PPERUSERSERVERINFO

◆ PPFNCLIENT

◆ PPFNCLIENTWORKER

◆ PPOPUPMENU

◆ PPROCDESKHEAD

◆ PPROCMARKHEAD

◆ PPROPERTY

◆ PPROPLISTITEM

◆ PREGISTER_SYSCLASS

◆ PROCDESKHEAD

◆ PROCMARKHEAD

◆ PROPERTY

◆ PROPLISTITEM

◆ PSBCALC

◆ PSBDATA

◆ PSBINFO

◆ PSBINFOEX

◆ PSBWND

typedef struct _SBWND * PSBWND

◆ PSERVERINFO

◆ PSETCLIPBDATA

◆ PSETSCROLLBARINFO

◆ PSHAREDINFO

◆ PTHRDESKHEAD

◆ PTHROBJHEAD

◆ PUSER_HANDLE_ENTRY

◆ PUSER_HANDLE_TABLE

◆ PUSERCONNECT

◆ PWND

typedef struct _WND * PWND

◆ PWNDMSG

typedef struct _WNDMSG * PWNDMSG

◆ REGISTER_SYSCLASS

◆ SBCALC

◆ SBDATA

◆ SBINFO

◆ SBINFOEX

◆ SBWND

typedef struct _SBWND SBWND

◆ SERVERINFO

◆ SETCLIPBDATA

◆ SETSCROLLBARINFO

◆ SHAREDINFO

◆ THRDESKHEAD

◆ THROBJHEAD

◆ USER_HANDLE_ENTRY

◆ USER_HANDLE_TABLE

◆ USERCONNECT

◆ USERTHREADINFOCLASS

◆ WND

typedef struct _WND WND

◆ WNDMSG

◆ WNDPROC_EX

typedef LRESULT(CALLBACK * WNDPROC_EX) (HWND, UINT, WPARAM, LPARAM, BOOL)

Definition at line 826 of file ntuser.h.

Enumeration Type Documentation

◆ _CONSOLECONTROL

Enumerator
ConsoleCtrlDesktopConsoleThread 
GuiConsoleWndClassAtom 
ConsoleMakePalettePublic 
ConsoleAcquireDisplayOwnership 

Definition at line 1796 of file ntuser.h.

1797{
enum _CONSOLECONTROL * PCONSOLECONTROL
@ ConsoleCtrlDesktopConsoleThread
Definition: ntuser.h:1798
@ ConsoleMakePalettePublic
Definition: ntuser.h:1800
@ GuiConsoleWndClassAtom
Definition: ntuser.h:1799
@ ConsoleAcquireDisplayOwnership
Definition: ntuser.h:1801
enum _CONSOLECONTROL CONSOLECONTROL

◆ _GETCPD

Enumerator
UserGetCPDA2U 
UserGetCPDU2A 
UserGetCPDClass 
UserGetCPDWindow 
UserGetCPDDialog 
UserGetCPDWndtoCls 

Definition at line 538 of file ntuser.h.

539{
540 UserGetCPDA2U = 0x01, /* " Unicode " */
541 UserGetCPDU2A = 0X02, /* " Ansi " */
542 UserGetCPDClass = 0X10,
543 UserGetCPDWindow = 0X20,
544 UserGetCPDDialog = 0X40,
545 UserGetCPDWndtoCls = 0X80
546} GETCPD, *PGETCPD;
@ UserGetCPDWndtoCls
Definition: ntuser.h:545
@ UserGetCPDClass
Definition: ntuser.h:542
@ UserGetCPDU2A
Definition: ntuser.h:541
@ UserGetCPDDialog
Definition: ntuser.h:544
@ UserGetCPDWindow
Definition: ntuser.h:543
@ UserGetCPDA2U
Definition: ntuser.h:540
enum _GETCPD * PGETCPD
enum _GETCPD GETCPD

◆ _HANDLE_TYPE

Enumerator
TYPE_FREE 
TYPE_WINDOW 
TYPE_MENU 
TYPE_CURSOR 
TYPE_SETWINDOWPOS 
TYPE_HOOK 
TYPE_CLIPDATA 
TYPE_CALLPROC 
TYPE_ACCELTABLE 
TYPE_DDEACCESS 
TYPE_DDECONV 
TYPE_DDEXACT 
TYPE_MONITOR 
TYPE_KBDLAYOUT 
TYPE_KBDFILE 
TYPE_WINEVENTHOOK 
TYPE_TIMER 
TYPE_INPUTCONTEXT 
TYPE_HIDDATA 
TYPE_DEVICEINFO 
TYPE_TOUCHINPUTINFO 
TYPE_GESTUREINFOOBJ 
TYPE_CTYPES 
TYPE_GENERIC 

Definition at line 38 of file ntuser.h.

39{
40 TYPE_FREE = 0,
41 TYPE_WINDOW = 1,
42 TYPE_MENU = 2,
43 TYPE_CURSOR = 3,
45 TYPE_HOOK = 5,
46 TYPE_CLIPDATA = 6,
47 TYPE_CALLPROC = 7,
50 TYPE_DDECONV = 10,
51 TYPE_DDEXACT = 11,
52 TYPE_MONITOR = 12,
53 TYPE_KBDLAYOUT = 13,
54 TYPE_KBDFILE = 14,
56 TYPE_TIMER = 16,
58 TYPE_HIDDATA = 18,
59 TYPE_DEVICEINFO = 19,
63 TYPE_GENERIC = 255
enum _HANDLE_TYPE HANDLE_TYPE
@ TYPE_CLIPDATA
Definition: ntuser.h:46
@ TYPE_TIMER
Definition: ntuser.h:56
@ TYPE_KBDFILE
Definition: ntuser.h:54
@ TYPE_HOOK
Definition: ntuser.h:45
@ TYPE_GESTUREINFOOBJ
Definition: ntuser.h:61
@ TYPE_CTYPES
Definition: ntuser.h:62
@ TYPE_DDEACCESS
Definition: ntuser.h:49
@ TYPE_GENERIC
Definition: ntuser.h:63
@ TYPE_DDECONV
Definition: ntuser.h:50
@ TYPE_DEVICEINFO
Definition: ntuser.h:59
@ TYPE_CALLPROC
Definition: ntuser.h:47
@ TYPE_HIDDATA
Definition: ntuser.h:58
@ TYPE_FREE
Definition: ntuser.h:40
@ TYPE_WINEVENTHOOK
Definition: ntuser.h:55
@ TYPE_CURSOR
Definition: ntuser.h:43
@ TYPE_WINDOW
Definition: ntuser.h:41
@ TYPE_DDEXACT
Definition: ntuser.h:51
@ TYPE_TOUCHINPUTINFO
Definition: ntuser.h:60
@ TYPE_ACCELTABLE
Definition: ntuser.h:48
@ TYPE_KBDLAYOUT
Definition: ntuser.h:53
@ TYPE_MONITOR
Definition: ntuser.h:52
@ TYPE_MENU
Definition: ntuser.h:42
@ TYPE_SETWINDOWPOS
Definition: ntuser.h:44
@ TYPE_INPUTCONTEXT
Definition: ntuser.h:57
enum _HANDLE_TYPE * PHANDLE_TYPE

◆ _OBI_TYPES

Enumerator
OBI_CLOSE 
OBI_UPARROW 
OBI_UPARROWI 
OBI_DNARROW 
OBI_DNARROWI 
OBI_MNARROW 
OBI_CTYPES 

Definition at line 964 of file ntuser.h.

965{
966 OBI_CLOSE = 0,
967 OBI_UPARROW = 46,
968 OBI_UPARROWI = 49,
969 OBI_DNARROW = 50,
970 OBI_DNARROWI = 53,
971 OBI_MNARROW = 62,
972 OBI_CTYPES = 93
973} OBI_TYPES;
enum _OBI_TYPES OBI_TYPES
@ OBI_UPARROWI
Definition: ntuser.h:968
@ OBI_UPARROW
Definition: ntuser.h:967
@ OBI_DNARROW
Definition: ntuser.h:969
@ OBI_CTYPES
Definition: ntuser.h:972
@ OBI_CLOSE
Definition: ntuser.h:966
@ OBI_DNARROWI
Definition: ntuser.h:970
@ OBI_MNARROW
Definition: ntuser.h:971

◆ _USERTHREADINFOCLASS

Enumerator
UserThreadShutdownInformation 
UserThreadFlags 
UserThreadTaskName 
UserThreadWOWInformation 
UserThreadHungStatus 
UserThreadInitiateShutdown 
UserThreadEndShutdown 
UserThreadUseActiveDesktop 
UserThreadUseDesktop 
UserThreadRestoreDesktop 
UserThreadCsrApiPort 

Definition at line 66 of file ntuser.h.

67{
enum _USERTHREADINFOCLASS USERTHREADINFOCLASS
@ UserThreadEndShutdown
Definition: ntuser.h:74
@ UserThreadWOWInformation
Definition: ntuser.h:71
@ UserThreadUseDesktop
Definition: ntuser.h:76
@ UserThreadTaskName
Definition: ntuser.h:70
@ UserThreadFlags
Definition: ntuser.h:69
@ UserThreadRestoreDesktop
Definition: ntuser.h:77
@ UserThreadShutdownInformation
Definition: ntuser.h:68
@ UserThreadInitiateShutdown
Definition: ntuser.h:73
@ UserThreadCsrApiPort
Definition: ntuser.h:78
@ UserThreadUseActiveDesktop
Definition: ntuser.h:75
@ UserThreadHungStatus
Definition: ntuser.h:72

◆ SimpleCallRoutines

Enumerator
NOPARAM_ROUTINE_CREATEMENU 
NOPARAM_ROUTINE_CREATEMENUPOPUP 
NOPARAM_ROUTINE_ALLOWFOREGNDACTIVATION 
NOPARAM_ROUTINE_MSQCLEARWAKEMASK 
NOPARAM_ROUTINE_CREATESYSTEMTHREADS 
NOPARAM_ROUTINE_DESTROY_CARET 
NOPARAM_ROUTINE_ENABLEPROCWNDGHSTING 
NOPARAM_ROUTINE_GETDEVICECHANGEINFO 
NOPARAM_ROUTINE_GETIMESHOWSTATUS 
NOPARAM_ROUTINE_GETINPUTDESKTOP 
NOPARAM_ROUTINE_GETMSESSAGEPOS 
NOPARAM_ROUTINE_HANDLESYSTHRDCREATFAIL 
NOPARAM_ROUTINE_HIDECURSORNOCAPTURE 
NOPARAM_ROUTINE_LOADCURSANDICOS 
NOPARAM_ROUTINE_LOADUSERAPIHOOK 
NOPARAM_ROUTINE_PREPAREFORLOGOFF 
NOPARAM_ROUTINE_RELEASECAPTURE 
NOPARAM_ROUTINE_RESETDBLCLICK 
NOPARAM_ROUTINE_ZAPACTIVEANDFOUS 
NOPARAM_ROUTINE_REMOTECONSHDWSTOP 
NOPARAM_ROUTINE_REMOTEDISCONNECT 
NOPARAM_ROUTINE_REMOTELOGOFF 
NOPARAM_ROUTINE_REMOTENTSECURITY 
NOPARAM_ROUTINE_REMOTESHDWSETUP 
NOPARAM_ROUTINE_REMOTESHDWSTOP 
NOPARAM_ROUTINE_REMOTEPASSTHRUENABLE 
NOPARAM_ROUTINE_REMOTEPASSTHRUDISABLE 
NOPARAM_ROUTINE_REMOTECONNECTSTATE 
NOPARAM_ROUTINE_UPDATEPERUSERIMMENABLING 
NOPARAM_ROUTINE_USERPWRCALLOUTWORKER 
NOPARAM_ROUTINE_WAKERITFORSHTDWN 
NOPARAM_ROUTINE_INIT_MESSAGE_PUMP 
NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP 
ONEPARAM_ROUTINE_BEGINDEFERWNDPOS 
ONEPARAM_ROUTINE_GETSENDMSGRECVR 
ONEPARAM_ROUTINE_WINDOWFROMDC 
ONEPARAM_ROUTINE_ALLOWSETFOREGND 
ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT 
ONEPARAM_ROUTINE_CSDDEUNINITIALIZE 
ONEPARAM_ROUTINE_DIRECTEDYIELD 
ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS 
ONEPARAM_ROUTINE_GETINPUTEVENT 
ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT 
ONEPARAM_ROUTINE_GETKEYBOARDTYPE 
ONEPARAM_ROUTINE_GETPROCDEFLAYOUT 
ONEPARAM_ROUTINE_GETQUEUESTATUS 
ONEPARAM_ROUTINE_GETWINSTAINFO 
ONEPARAM_ROUTINE_LOCKFOREGNDWINDOW 
ONEPARAM_ROUTINE_LOADFONTS 
ONEPARAM_ROUTINE_MAPDEKTOPOBJECT 
ONEPARAM_ROUTINE_MESSAGEBEEP 
ONEPARAM_ROUTINE_PLAYEVENTSOUND 
ONEPARAM_ROUTINE_POSTQUITMESSAGE 
ONEPARAM_ROUTINE_REALIZEPALETTE 
ONEPARAM_ROUTINE_REGISTERLPK 
ONEPARAM_ROUTINE_REGISTERSYSTEMTHREAD 
ONEPARAM_ROUTINE_REMOTERECONNECT 
ONEPARAM_ROUTINE_REMOTETHINWIRESTATUS 
ONEPARAM_ROUTINE_RELEASEDC 
ONEPARAM_ROUTINE_REMOTENOTIFY 
ONEPARAM_ROUTINE_REPLYMESSAGE 
ONEPARAM_ROUTINE_SETCARETBLINKTIME 
ONEPARAM_ROUTINE_SETDBLCLICKTIME 
ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO 
ONEPARAM_ROUTINE_SETPROCDEFLAYOUT 
ONEPARAM_ROUTINE_SETWATERMARKSTRINGS 
ONEPARAM_ROUTINE_SHOWCURSOR 
ONEPARAM_ROUTINE_SHOWSTARTGLASS 
ONEPARAM_ROUTINE_SWAPMOUSEBUTTON 
X_ROUTINE_WOWMODULEUNLOAD 
HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW 
HWND_ROUTINE_DWP_GETENABLEDPOPUP 
HWND_ROUTINE_GETWNDCONTEXTHLPID 
HWND_ROUTINE_REGISTERSHELLHOOKWINDOW 
HWND_ROUTINE_SETMSGBOX 
HWNDOPT_ROUTINE_SETPROGMANWINDOW 
HWNDOPT_ROUTINE_SETTASKMANWINDOW 
HWNDPARAM_ROUTINE_GETCLASSICOCUR 
HWNDPARAM_ROUTINE_CLEARWINDOWSTATE 
HWNDPARAM_ROUTINE_KILLSYSTEMTIMER 
HWNDPARAM_ROUTINE_SETDIALOGPOINTER 
HWNDPARAM_ROUTINE_SETVISIBLE 
HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID 
HWNDPARAM_ROUTINE_SETWINDOWSTATE 
HWNDLOCK_ROUTINE_WINDOWHASSHADOW 
HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS 
HWNDLOCK_ROUTINE_DRAWMENUBAR 
HWNDLOCK_ROUTINE_CHECKIMESHOWSTATUSINTHRD 
HWNDLOCK_ROUTINE_GETSYSMENUHANDLE 
HWNDLOCK_ROUTINE_REDRAWFRAME 
HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK 
HWNDLOCK_ROUTINE_SETDLGSYSMENU 
HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW 
HWNDLOCK_ROUTINE_SETSYSMENU 
HWNDLOCK_ROUTINE_UPDATECKIENTRECT 
HWNDLOCK_ROUTINE_UPDATEWINDOW 
TWOPARAM_ROUTINE_IMESHOWSTATUSCHANGE 
TWOPARAM_ROUTINE_ENABLEWINDOW 
TWOPARAM_ROUTINE_REDRAWTITLE 
TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS 
TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW 
TWOPARAM_ROUTINE_UPDATEWINDOWS 
TWOPARAM_ROUTINE_VALIDATERGN 
TWOPARAM_ROUTINE_CHANGEWNDMSGFILTER 
TWOPARAM_ROUTINE_GETCURSORPOS 
TWOPARAM_ROUTINE_GETHDEVNAME 
TWOPARAM_ROUTINE_INITANSIOEM 
TWOPARAM_ROUTINE_NLSSENDIMENOTIFY 
TWOPARAM_ROUTINE_REGISTERGHSTWND 
TWOPARAM_ROUTINE_REGISTERLOGONPROCESS 
TWOPARAM_ROUTINE_REGISTERSBLFROSTWND 
TWOPARAM_ROUTINE_REGISTERUSERHUNGAPPHANDLERS 
TWOPARAM_ROUTINE_SHADOWCLEANUP 
TWOPARAM_ROUTINE_REMOTESHADOWSTART 
TWOPARAM_ROUTINE_SETCARETPOS 
TWOPARAM_ROUTINE_SETCURSORPOS 
TWOPARAM_ROUTINE_SETPHYSCURSORPOS 
TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK 
TWOPARAM_ROUTINE_WOWCLEANUP 

Definition at line 1496 of file ntuser.h.

1497{
1500#if (WIN32K_VERSION >= NTDDI_VISTA)
1505#endif
1507#if (WIN32K_VERSION < NTDDI_VISTA)
1511#endif
1516#if (WIN32K_VERSION >= NTDDI_VISTA)
1518#else
1519 NOPARAM_ROUTINE_GETREMOTEPROCESSID,
1520#endif
1523#if (WIN32K_VERSION >= NTDDI_VISTA)
1526#endif
1541#if (WIN32K_VERSION >= NTDDI_VISTA)
1543#endif
1546#if (WIN32K_VERSION < NTDDI_VISTA)
1548#endif
1550#if (WIN32K_VERSION >= NTDDI_VISTA)
1552#endif
1556#if (WIN32K_VERSION < NTDDI_VISTA)
1557 ONEPARAM_ROUTINE_CREATESYSTEMTHREADS,
1558#endif
1562#if (WIN32K_VERSION < NTDDI_VISTA)
1563 ONEPARAM_ROUTINE_GETCURSORPOS,
1564#endif
1571#if (WIN32K_VERSION < NTDDI_VISTA)
1572 ONEPARAM_ROUTINE_HANDLESYSTHRDCREATFAIL,
1573#endif
1580#if (WIN32K_VERSION < NTDDI_VISTA)
1581 ONEPARAM_ROUTINE_PREPAREFORLOGOFF,
1582#endif
1585#if (WIN32K_VERSION >= NTDDI_VISTA)
1587#endif
1591#if (WIN32K_VERSION >= NTDDI_VISTA)
1593#endif
1597#if (WIN32K_VERSION < NTDDI_VISTA)
1598 ONEPARAM_ROUTINE_SETIMESHOWSTATUS,
1599#endif
1602#if (WIN32K_VERSION >= NTDDI_VISTA)
1604#endif
1609#if (WIN32K_VERSION < NTDDI_VISTA)
1610 X_ROUTINE_REMOTENOTIFY,
1611#endif
1626 HWNDLOCK_ROUTINE_WINDOWHASSHADOW, /* correct prefix ? */
1645#if (WIN32K_VERSION >= NTDDI_VISTA)
1648#endif
1652#if (WIN32K_VERSION >= NTDDI_VISTA)
1654#endif
1656#if (WIN32K_VERSION >= NTDDI_VISTA)
1658#else
1659 TWOPARAM_ROUTINE_REGISTERSYSTEMTHREAD,
1660#endif
1666#if (WIN32K_VERSION >= NTDDI_VISTA)
1668#endif
1671};
@ TWOPARAM_ROUTINE_REGISTERLOGONPROCESS
Definition: ntuser.h:1655
@ ONEPARAM_ROUTINE_DIRECTEDYIELD
Definition: ntuser.h:1560
@ TWOPARAM_ROUTINE_SHOWOWNEDPOPUPS
Definition: ntuser.h:1641
@ HWNDLOCK_ROUTINE_UPDATEWINDOW
Definition: ntuser.h:1637
@ TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK
Definition: ntuser.h:1669
@ NOPARAM_ROUTINE_INIT_MESSAGE_PUMP
Definition: ntuser.h:1544
@ NOPARAM_ROUTINE_REMOTEDISCONNECT
Definition: ntuser.h:1531
@ NOPARAM_ROUTINE_RESETDBLCLICK
Definition: ntuser.h:1528
@ NOPARAM_ROUTINE_PREPAREFORLOGOFF
Definition: ntuser.h:1525
@ NOPARAM_ROUTINE_ZAPACTIVEANDFOUS
Definition: ntuser.h:1529
@ TWOPARAM_ROUTINE_REDRAWTITLE
Definition: ntuser.h:1640
@ HWNDLOCK_ROUTINE_WINDOWHASSHADOW
Definition: ntuser.h:1626
@ ONEPARAM_ROUTINE_GETKEYBOARDTYPE
Definition: ntuser.h:1567
@ NOPARAM_ROUTINE_HIDECURSORNOCAPTURE
Definition: ntuser.h:1521
@ TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW
Definition: ntuser.h:1642
@ NOPARAM_ROUTINE_CREATEMENUPOPUP
Definition: ntuser.h:1499
@ X_ROUTINE_WOWMODULEUNLOAD
Definition: ntuser.h:1608
@ TWOPARAM_ROUTINE_GETCURSORPOS
Definition: ntuser.h:1647
@ NOPARAM_ROUTINE_HANDLESYSTHRDCREATFAIL
Definition: ntuser.h:1517
@ HWNDPARAM_ROUTINE_SETDIALOGPOINTER
Definition: ntuser.h:1622
@ ONEPARAM_ROUTINE_WINDOWFROMDC
Definition: ntuser.h:1553
@ HWNDPARAM_ROUTINE_KILLSYSTEMTIMER
Definition: ntuser.h:1621
@ HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID
Definition: ntuser.h:1624
@ NOPARAM_ROUTINE_LOADUSERAPIHOOK
Definition: ntuser.h:1524
@ TWOPARAM_ROUTINE_INITANSIOEM
Definition: ntuser.h:1650
@ NOPARAM_ROUTINE_GETINPUTDESKTOP
Definition: ntuser.h:1514
@ TWOPARAM_ROUTINE_ENABLEWINDOW
Definition: ntuser.h:1639
@ ONEPARAM_ROUTINE_MESSAGEBEEP
Definition: ntuser.h:1577
@ HWNDLOCK_ROUTINE_DRAWMENUBAR
Definition: ntuser.h:1628
@ ONEPARAM_ROUTINE_SETPROCDEFLAYOUT
Definition: ntuser.h:1601
@ TWOPARAM_ROUTINE_REMOTESHADOWSTART
Definition: ntuser.h:1663
@ ONEPARAM_ROUTINE_ENUMCLIPBOARDFORMATS
Definition: ntuser.h:1561
@ ONEPARAM_ROUTINE_SETDBLCLICKTIME
Definition: ntuser.h:1596
@ ONEPARAM_ROUTINE_BEGINDEFERWNDPOS
Definition: ntuser.h:1549
@ ONEPARAM_ROUTINE_LOADFONTS
Definition: ntuser.h:1575
@ HWND_ROUTINE_REGISTERSHELLHOOKWINDOW
Definition: ntuser.h:1615
@ NOPARAM_ROUTINE_GETMSESSAGEPOS
Definition: ntuser.h:1515
@ NOPARAM_ROUTINE_USERPWRCALLOUTWORKER
Definition: ntuser.h:1540
@ ONEPARAM_ROUTINE_REGISTERLPK
Definition: ntuser.h:1584
@ ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT
Definition: ntuser.h:1566
@ HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOW
Definition: ntuser.h:1634
@ TWOPARAM_ROUTINE_CHANGEWNDMSGFILTER
Definition: ntuser.h:1646
@ TWOPARAM_ROUTINE_NLSSENDIMENOTIFY
Definition: ntuser.h:1651
@ ONEPARAM_ROUTINE_REMOTERECONNECT
Definition: ntuser.h:1588
@ TWOPARAM_ROUTINE_SHADOWCLEANUP
Definition: ntuser.h:1662
@ HWNDPARAM_ROUTINE_GETCLASSICOCUR
Definition: ntuser.h:1619
@ NOPARAM_ROUTINE_MSQCLEARWAKEMASK
Definition: ntuser.h:1502
@ ONEPARAM_ROUTINE_CSDDEUNINITIALIZE
Definition: ntuser.h:1559
@ NOPARAM_ROUTINE_GETDEVICECHANGEINFO
Definition: ntuser.h:1512
@ ONEPARAM_ROUTINE_POSTQUITMESSAGE
Definition: ntuser.h:1579
@ ONEPARAM_ROUTINE_GETSENDMSGRECVR
Definition: ntuser.h:1551
@ NOPARAM_ROUTINE_REMOTESHDWSTOP
Definition: ntuser.h:1535
@ HWNDLOCK_ROUTINE_SETDLGSYSMENU
Definition: ntuser.h:1633
@ HWND_ROUTINE_SETMSGBOX
Definition: ntuser.h:1616
@ HWNDPARAM_ROUTINE_CLEARWINDOWSTATE
Definition: ntuser.h:1620
@ NOPARAM_ROUTINE_CREATEMENU
Definition: ntuser.h:1498
@ HWNDPARAM_ROUTINE_SETVISIBLE
Definition: ntuser.h:1623
@ ONEPARAM_ROUTINE_REMOTENOTIFY
Definition: ntuser.h:1592
@ TWOPARAM_ROUTINE_UPDATEWINDOWS
Definition: ntuser.h:1643
@ ONEPARAM_ROUTINE_LOCKFOREGNDWINDOW
Definition: ntuser.h:1574
@ HWND_ROUTINE_GETWNDCONTEXTHLPID
Definition: ntuser.h:1614
@ NOPARAM_ROUTINE_REMOTESHDWSETUP
Definition: ntuser.h:1534
@ ONEPARAM_ROUTINE_RELEASEDC
Definition: ntuser.h:1590
@ NOPARAM_ROUTINE_REMOTECONNECTSTATE
Definition: ntuser.h:1538
@ TWOPARAM_ROUTINE_REGISTERUSERHUNGAPPHANDLERS
Definition: ntuser.h:1661
@ ONEPARAM_ROUTINE_SWAPMOUSEBUTTON
Definition: ntuser.h:1607
@ HWNDLOCK_ROUTINE_SETSYSMENU
Definition: ntuser.h:1635
@ NOPARAM_ROUTINE_GETIMESHOWSTATUS
Definition: ntuser.h:1513
@ ONEPARAM_ROUTINE_SETWATERMARKSTRINGS
Definition: ntuser.h:1603
@ HWNDLOCK_ROUTINE_GETSYSMENUHANDLE
Definition: ntuser.h:1630
@ HWNDLOCK_ROUTINE_ARRANGEICONICWINDOWS
Definition: ntuser.h:1627
@ ONEPARAM_ROUTINE_SHOWCURSOR
Definition: ntuser.h:1605
@ ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO
Definition: ntuser.h:1600
@ NOPARAM_ROUTINE_CREATESYSTEMTHREADS
Definition: ntuser.h:1503
@ NOPARAM_ROUTINE_ENABLEPROCWNDGHSTING
Definition: ntuser.h:1506
@ NOPARAM_ROUTINE_REMOTECONSHDWSTOP
Definition: ntuser.h:1530
@ NOPARAM_ROUTINE_ALLOWFOREGNDACTIVATION
Definition: ntuser.h:1501
@ TWOPARAM_ROUTINE_SETPHYSCURSORPOS
Definition: ntuser.h:1667
@ ONEPARAM_ROUTINE_REALIZEPALETTE
Definition: ntuser.h:1583
@ HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK
Definition: ntuser.h:1632
@ NOPARAM_ROUTINE_DESTROY_CARET
Definition: ntuser.h:1504
@ NOPARAM_ROUTINE_REMOTELOGOFF
Definition: ntuser.h:1532
@ ONEPARAM_ROUTINE_PLAYEVENTSOUND
Definition: ntuser.h:1578
@ HWNDLOCK_ROUTINE_CHECKIMESHOWSTATUSINTHRD
Definition: ntuser.h:1629
@ ONEPARAM_ROUTINE_SHOWSTARTGLASS
Definition: ntuser.h:1606
@ HWND_ROUTINE_DEREGISTERSHELLHOOKWINDOW
Definition: ntuser.h:1612
@ ONEPARAM_ROUTINE_REMOTETHINWIRESTATUS
Definition: ntuser.h:1589
@ ONEPARAM_ROUTINE_REPLYMESSAGE
Definition: ntuser.h:1594
@ HWNDLOCK_ROUTINE_REDRAWFRAME
Definition: ntuser.h:1631
@ ONEPARAM_ROUTINE_GETQUEUESTATUS
Definition: ntuser.h:1569
@ HWNDOPT_ROUTINE_SETTASKMANWINDOW
Definition: ntuser.h:1618
@ ONEPARAM_ROUTINE_MAPDEKTOPOBJECT
Definition: ntuser.h:1576
@ NOPARAM_ROUTINE_WAKERITFORSHTDWN
Definition: ntuser.h:1542
@ NOPARAM_ROUTINE_RELEASECAPTURE
Definition: ntuser.h:1527
@ TWOPARAM_ROUTINE_REGISTERSBLFROSTWND
Definition: ntuser.h:1657
@ HWNDLOCK_ROUTINE_UPDATECKIENTRECT
Definition: ntuser.h:1636
@ ONEPARAM_ROUTINE_CREATEEMPTYCUROBJECT
Definition: ntuser.h:1555
@ HWND_ROUTINE_DWP_GETENABLEDPOPUP
Definition: ntuser.h:1613
@ NOPARAM_ROUTINE_UNINIT_MESSAGE_PUMP
Definition: ntuser.h:1545
@ NOPARAM_ROUTINE_UPDATEPERUSERIMMENABLING
Definition: ntuser.h:1539
@ NOPARAM_ROUTINE_LOADCURSANDICOS
Definition: ntuser.h:1522
@ ONEPARAM_ROUTINE_SETCARETBLINKTIME
Definition: ntuser.h:1595
@ TWOPARAM_ROUTINE_VALIDATERGN
Definition: ntuser.h:1644
@ ONEPARAM_ROUTINE_REGISTERSYSTEMTHREAD
Definition: ntuser.h:1586
@ TWOPARAM_ROUTINE_SETCARETPOS
Definition: ntuser.h:1664
@ NOPARAM_ROUTINE_REMOTEPASSTHRUENABLE
Definition: ntuser.h:1536
@ TWOPARAM_ROUTINE_REGISTERGHSTWND
Definition: ntuser.h:1653
@ TWOPARAM_ROUTINE_IMESHOWSTATUSCHANGE
Definition: ntuser.h:1638
@ ONEPARAM_ROUTINE_GETPROCDEFLAYOUT
Definition: ntuser.h:1568
@ TWOPARAM_ROUTINE_WOWCLEANUP
Definition: ntuser.h:1670
@ NOPARAM_ROUTINE_REMOTEPASSTHRUDISABLE
Definition: ntuser.h:1537
@ HWNDOPT_ROUTINE_SETPROGMANWINDOW
Definition: ntuser.h:1617
@ ONEPARAM_ROUTINE_GETINPUTEVENT
Definition: ntuser.h:1565
@ ONEPARAM_ROUTINE_GETWINSTAINFO
Definition: ntuser.h:1570
@ ONEPARAM_ROUTINE_ALLOWSETFOREGND
Definition: ntuser.h:1554
@ NOPARAM_ROUTINE_REMOTENTSECURITY
Definition: ntuser.h:1533
@ HWNDPARAM_ROUTINE_SETWINDOWSTATE
Definition: ntuser.h:1625
@ TWOPARAM_ROUTINE_SETCURSORPOS
Definition: ntuser.h:1665
@ TWOPARAM_ROUTINE_GETHDEVNAME
Definition: ntuser.h:1649

◆ ThreadStateRoutines

Enumerator
THREADSTATE_FOCUSWINDOW 
THREADSTATE_ACTIVEWINDOW 
THREADSTATE_CAPTUREWINDOW 
THREADSTATE_DEFAULTIMEWINDOW 
THREADSTATE_DEFAULTINPUTCONTEXT 
THREADSTATE_GETINPUTSTATE 
THREADSTATE_GETCURSOR 
THREADSTATE_CHANGEBITS 
THREADSTATE_UPTIMELASTREAD 
THREADSTATE_GETMESSAGEEXTRAINFO 
THREADSTATE_INSENDMESSAGE 
THREADSTATE_GETMESSAGETIME 
THREADSTATE_FOREGROUNDTHREAD 
THREADSTATE_IMECOMPATFLAGS 
THREADSTATE_OLDKEYBOARDLAYOUT 
THREADSTATE_ISWINLOGON 
THREADSTATE_UNKNOWN_0x10 
THREADSTATE_CHECKCONIME 
THREADSTATE_GETTHREADINFO 
THREADSTATE_PROGMANWINDOW 
THREADSTATE_TASKMANWINDOW 

Definition at line 2470 of file ntuser.h.

2471{
2491 THREADSTATE_PROGMANWINDOW, /* FIXME: Delete this HACK */
2492 THREADSTATE_TASKMANWINDOW, /* FIXME: Delete this HACK */
2493};
@ THREADSTATE_GETCURSOR
Definition: ntuser.h:2478
@ THREADSTATE_DEFAULTIMEWINDOW
Definition: ntuser.h:2475
@ THREADSTATE_DEFAULTINPUTCONTEXT
Definition: ntuser.h:2476
@ THREADSTATE_CHECKCONIME
Definition: ntuser.h:2489
@ THREADSTATE_INSENDMESSAGE
Definition: ntuser.h:2482
@ THREADSTATE_GETTHREADINFO
Definition: ntuser.h:2490
@ THREADSTATE_CAPTUREWINDOW
Definition: ntuser.h:2474
@ THREADSTATE_TASKMANWINDOW
Definition: ntuser.h:2492
@ THREADSTATE_UNKNOWN_0x10
Definition: ntuser.h:2488
@ THREADSTATE_FOREGROUNDTHREAD
Definition: ntuser.h:2484
@ THREADSTATE_OLDKEYBOARDLAYOUT
Definition: ntuser.h:2486
@ THREADSTATE_GETINPUTSTATE
Definition: ntuser.h:2477
@ THREADSTATE_PROGMANWINDOW
Definition: ntuser.h:2491
@ THREADSTATE_ACTIVEWINDOW
Definition: ntuser.h:2473
@ THREADSTATE_GETMESSAGETIME
Definition: ntuser.h:2483
@ THREADSTATE_FOCUSWINDOW
Definition: ntuser.h:2472
@ THREADSTATE_GETMESSAGEEXTRAINFO
Definition: ntuser.h:2481
@ THREADSTATE_ISWINLOGON
Definition: ntuser.h:2487
@ THREADSTATE_UPTIMELASTREAD
Definition: ntuser.h:2480
@ THREADSTATE_CHANGEBITS
Definition: ntuser.h:2479
@ THREADSTATE_IMECOMPATFLAGS
Definition: ntuser.h:2485

Function Documentation

◆ _Success_()

_Success_ ( return = 0) -> Buffer, _Out_z_bytecap_post_bytecount_(pustrName->MaximumLength, return * 2 + 2)) ULONG APIENTRY NtUserGetAtomName( _In_ ATOM atom, _Inout_ PUNICODE_STRING pustrName)

Definition at line 1028 of file fsctrl.c.

3189{
3191
3192 PVPB Vpb = Vcb->Vpb;
3193 PVPB OldVpb;
3194
3195 BOOLEAN Remount = FALSE;
3196
3197 PAGED_CODE();
3198
3199 UNREFERENCED_PARAMETER( IrpContext );
3200
3201 //
3202 // Check whether we are looking for a device only Mvcb.
3203 //
3204
3205 for (Link = CdData.VcbQueue.Flink;
3206 Link != &CdData.VcbQueue;
3207 Link = Link->Flink) {
3208
3209 *OldVcb = CONTAINING_RECORD( Link, VCB, VcbLinks );
3210
3211 //
3212 // Skip ourselves.
3213 //
3214
3215 if (Vcb == *OldVcb) { continue; }
3216
3217 //
3218 // Look at the Vpb and state of the previous Vcb.
3219 //
3220
3221 OldVpb = (*OldVcb)->Vpb;
3222
3223 if ((OldVpb != Vpb) &&
3224 (OldVpb->RealDevice == Vpb->RealDevice) &&
3225 ((*OldVcb)->VcbCondition == VcbNotMounted)) {
3226
3227 //
3228 // If the current disk is a raw disk then it can match a previous music or
3229 // raw disk.
3230 //
3231
3232 if (FlagOn( Vcb->VcbState, VCB_STATE_AUDIO_DISK)) {
3233
3234 if (FlagOn( (*OldVcb)->VcbState, VCB_STATE_AUDIO_DISK )) {
3235
3236 //
3237 // If we have both TOC then fail the remount if the lengths
3238 // are different or they don't match.
3239 //
3240
3241 if ((Vcb->TocLength != (*OldVcb)->TocLength) ||
3242 ((Vcb->TocLength != 0) &&
3243 !RtlEqualMemory( Vcb->CdromToc,
3244 (*OldVcb)->CdromToc,
3245 Vcb->TocLength ))) {
3246
3247 continue;
3248 }
3249
3250 Remount = TRUE;
3251 break;
3252 }
3253
3254 //
3255 // The current disk is not a raw disk. Go ahead and compare
3256 // serial numbers, volume label and TOC.
3257 //
3258
3259 }
3260 else if ((OldVpb->SerialNumber == Vpb->SerialNumber) &&
3261 (Vcb->TocLength == (*OldVcb)->TocLength) &&
3262 ((Vcb->TocLength == 0) || RtlEqualMemory( Vcb->CdromToc,
3263 (*OldVcb)->CdromToc,
3264 Vcb->TocLength )) &&
3265 (Vpb->VolumeLabelLength == OldVpb->VolumeLabelLength) &&
3266 (RtlEqualMemory( OldVpb->VolumeLabel,
3267 Vpb->VolumeLabel,
3268 Vpb->VolumeLabelLength ))) {
3269 //
3270 // Remember the old Vcb. Then set the return value to
3271 // TRUE and break.
3272 //
3273
3274 Remount = TRUE;
3275 break;
3276 }
3277 }
3278 }
3279
3280 return Remount;
3281}
#define PAGED_CODE()
unsigned char BOOLEAN
CD_DATA CdData
Definition: cddata.c:42
#define VCB_STATE_AUDIO_DISK
Definition: cdstruc.h:712
@ VcbNotMounted
Definition: cdstruc.h:490
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define FlagOn(_F, _SF)
Definition: ext2fs.h:179
IN OUT PVCB IN PDEVICE_OBJECT IN PVPB Vpb
Definition: fatprocs.h:1676
#define RtlEqualMemory(dst, src, len)
Definition: kdvm.h:18
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325
#define Vcb
Definition: cdprocs.h:1415
LIST_ENTRY VcbQueue
Definition: cdstruc.h:334
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
Definition: cdstruc.h:498
Definition: iotypes.h:189
WCHAR VolumeLabel[MAXIMUM_VOLUME_LABEL_LENGTH/sizeof(WCHAR)]
Definition: iotypes.h:198
USHORT VolumeLabelLength
Definition: iotypes.h:193
ULONG SerialNumber
Definition: iotypes.h:196
struct _DEVICE_OBJECT * RealDevice
Definition: iotypes.h:195
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
static int Link(const char **args)
Definition: vfdcmd.c:2414

◆ C_ASSERT() [1/7]

C_ASSERT ( offsetof(IMC, dwClientImcData)  = =0x18)

◆ C_ASSERT() [2/7]

C_ASSERT ( offsetof(IMC, head.cLockObj)  = =0x4)

◆ C_ASSERT() [3/7]

C_ASSERT ( offsetof(IMC, head.h = =0x0)

◆ C_ASSERT() [4/7]

C_ASSERT ( offsetof(IMC, head.pti)  = =0x8)

◆ C_ASSERT() [5/7]

C_ASSERT ( offsetof(IMC, hImeWnd)  = =0x1c)

◆ C_ASSERT() [6/7]

C_ASSERT ( offsetof(IMC, pImcNext)  = =0x14)

◆ C_ASSERT() [7/7]

C_ASSERT ( sizeof(CLIENTINFO)<=sizeof(((PTEB) 0) ->Win32ClientInfo)  )

◆ GetW32ProcessInfo()

◆ GetW32ThreadInfo()

◆ NtUserActivateKeyboardLayout()

HKL NTAPI NtUserActivateKeyboardLayout ( HKL  hKL,
ULONG  Flags 
)

Definition at line 1226 of file kbdlayout.c.

1229{
1230 PWINSTATION_OBJECT pWinSta;
1231 HKL hOldKL;
1232
1234
1235 /* FIXME */
1236
1238 hOldKL = co_IntActivateKeyboardLayout(pWinSta, hKL, Flags, NULL);
1239 UserLeave();
1240
1241 return hOldKL;
1242}
#define NULL
Definition: types.h:112
UINT_PTR HKL
Definition: msctf.idl:143
PWINSTATION_OBJECT FASTCALL IntGetProcessWindowStation(HWINSTA *phWinSta OPTIONAL)
Definition: winsta.c:400
VOID FASTCALL UserLeave(VOID)
Definition: ntuser.c:258
VOID FASTCALL UserEnterExclusive(VOID)
Definition: ntuser.c:249
HKL APIENTRY co_IntActivateKeyboardLayout(_Inout_ PWINSTATION_OBJECT pWinSta, _In_ HKL hKL, _In_ ULONG uFlags, _In_opt_ PWND pWnd)
Definition: kbdlayout.c:782
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

Referenced by LoadKeyboardLayoutW(), and User32DefWindowProc().

◆ NtUserAlterWindowStyle()

DWORD NTAPI NtUserAlterWindowStyle ( HWND  hWnd,
DWORD  Index,
LONG  NewValue 
)

Definition at line 4092 of file window.c.

4093{
4094 LONG ret;
4095
4097
4098 if (hWnd == IntGetDesktopWindow())
4099 {
4101 UserLeave();
4102 return 0;
4103 }
4104
4105 ret = co_IntSetWindowLongPtr(hWnd, Index, NewValue, FALSE, sizeof(LONG), TRUE);
4106
4107 UserLeave();
4108
4109 return ret;
4110}
HWND hWnd
Definition: settings.c:17
long LONG
Definition: pedump.c:60
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145
int ret
_In_ WDFCOLLECTION _In_ ULONG Index
HWND FASTCALL IntGetDesktopWindow(VOID)
Definition: desktop.c:1391
static LONG_PTR co_IntSetWindowLongPtr(HWND hWnd, DWORD Index, LONG_PTR NewValue, BOOL Ansi, ULONG Size, BOOL bAlter)
Definition: window.c:3828
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:22

Referenced by ButtonWndProc_common().

◆ NtUserAssociateInputContext()

DWORD NTAPI NtUserAssociateInputContext ( HWND  hWnd,
HIMC  hIMC,
DWORD  dwFlags 
)

Definition at line 1702 of file ime.c.

1703{
1704 DWORD ret = 2;
1705 PWND pWnd;
1706 PIMC pIMC;
1707
1709
1710 if (!IS_IMM_MODE())
1711 {
1712 ERR("!IS_IMM_MODE()\n");
1713 goto Quit;
1714 }
1715
1716 pWnd = ValidateHwndNoErr(hWnd);
1717 if (!pWnd)
1718 goto Quit;
1719
1720 pIMC = (hIMC ? UserGetObjectNoErr(gHandleTable, hIMC, TYPE_INPUTCONTEXT) : NULL);
1721 ret = IntAssociateInputContextEx(pWnd, pIMC, dwFlags);
1722
1723Quit:
1724 UserLeave();
1725 return ret;
1726}
#define ERR(fmt,...)
Definition: precomp.h:57
#define ValidateHwndNoErr(hwnd)
Definition: precomp.h:84
unsigned long DWORD
Definition: ntddk_ex.h:95
#define IS_IMM_MODE()
Definition: ntuser.h:1209
Definition: ntuser.h:694
Definition: ntuser.h:199
DWORD FASTCALL IntAssociateInputContextEx(PWND pWnd, PIMC pIMC, DWORD dwFlags)
Definition: ime.c:1636
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13
PVOID UserGetObjectNoErr(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type)
Definition: object.c:481
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

Referenced by ImmAssociateContext(), and ImmAssociateContextEx().

◆ NtUserAttachThreadInput()

BOOL NTAPI NtUserAttachThreadInput ( IN DWORD  idAttach,
IN DWORD  idAttachTo,
IN BOOL  fAttach 
)

Definition at line 665 of file input.c.

669{
671 PTHREADINFO pti, ptiTo;
672 BOOL Ret = FALSE;
673
675 TRACE("Enter NtUserAttachThreadInput %s\n",(fAttach ? "TRUE" : "FALSE" ));
676
677 pti = IntTID2PTI(UlongToHandle(idAttach));
678 ptiTo = IntTID2PTI(UlongToHandle(idAttachTo));
679
680 if ( !pti || !ptiTo )
681 {
682 TRACE("AttachThreadInput pti or ptiTo NULL.\n");
684 goto Exit;
685 }
686
687 Status = UserAttachThreadInput( pti, ptiTo, fAttach);
688 if (!NT_SUCCESS(Status))
689 {
690 TRACE("AttachThreadInput Error Status 0x%x. \n",Status);
692 }
693 else Ret = TRUE;
694
695Exit:
696 TRACE("Leave NtUserAttachThreadInput, ret=%d\n",Ret);
697 UserLeave();
698 return Ret;
699}
LONG NTSTATUS
Definition: precomp.h:26
#define UlongToHandle(ul)
Definition: basetsd.h:97
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
unsigned int BOOL
Definition: ntddk_ex.h:94
Status
Definition: gdiplustypes.h:25
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
static void Exit(void)
Definition: sock.c:1330
#define TRACE(s)
Definition: solgame.cpp:4
NTSTATUS FASTCALL UserAttachThreadInput(PTHREADINFO ptiFrom, PTHREADINFO ptiTo, BOOL fAttach)
Definition: input.c:480
PTHREADINFO FASTCALL IntTID2PTI(HANDLE id)
Definition: misc.c:42

◆ NtUserBeginPaint()

HDC NTAPI NtUserBeginPaint ( HWND  hWnd,
PAINTSTRUCT lPs 
)

Definition at line 1615 of file painting.c.

1616{
1617 PWND Window;
1618 PAINTSTRUCT Ps;
1620 HDC hDC;
1622 HDC Ret = NULL;
1623
1624 TRACE("Enter NtUserBeginPaint\n");
1626
1628 {
1629 goto Cleanup; // Return NULL
1630 }
1631
1632 UserRefObjectCo(Window, &Ref);
1633
1634 hDC = IntBeginPaint(Window, &Ps);
1635
1636 Status = MmCopyToCaller(UnsafePs, &Ps, sizeof(PAINTSTRUCT));
1637 if (! NT_SUCCESS(Status))
1638 {
1640 goto Cleanup; // Return NULL
1641 }
1642
1643 Ret = hDC;
1644
1645Cleanup:
1647
1648 TRACE("Leave NtUserBeginPaint, ret=%p\n", Ret);
1649 UserLeave();
1650 return Ret;
1651}
static HDC hDC
Definition: 3dtext.c:33
static const WCHAR Cleanup[]
Definition: register.c:80
#define MmCopyToCaller(x, y, z)
Definition: mmcopy.h:19
static HDC
Definition: imagelist.c:88
static __inline VOID UserDerefObjectCo(PVOID obj)
Definition: object.h:43
static __inline VOID UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
Definition: object.h:27
Definition: window.c:28
Definition: object.h:4
HDC FASTCALL IntBeginPaint(PWND Window, PPAINTSTRUCT Ps)
Definition: painting.c:1442
PWND FASTCALL UserGetWindowObject(HWND hWnd)
Definition: window.c:124
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
Definition: error.c:31

Referenced by BeginPaint().

◆ NtUserBitBltSysBmp()

BOOL NTAPI NtUserBitBltSysBmp ( HDC  hdc,
INT  nXDest,
INT  nYDest,
INT  nWidth,
INT  nHeight,
INT  nXSrc,
INT  nYSrc,
DWORD  dwRop 
)

Definition at line 17 of file ntstubs.c.

26{
27 BOOL Ret = FALSE;
29
30 Ret = NtGdiBitBlt( hdc,
31 nXDest,
32 nYDest,
33 nWidth,
34 nHeight,
36 nXSrc,
37 nYSrc,
38 dwRop,
39 0,
40 0);
41
42 UserLeave();
43 return Ret;
44}
HDC hSystemBM
Definition: stockobj.c:52
HDC hdc
Definition: main.c:9
__kernel_entry W32KAPI BOOL APIENTRY NtGdiBitBlt(_In_ HDC hdcDst, _In_ INT x, _In_ INT y, _In_ INT cx, _In_ INT cy, _In_opt_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ DWORD rop4, _In_ DWORD crBackColor, _In_ FLONG fl)

◆ NtUserBlockInput()

BOOL NTAPI NtUserBlockInput ( BOOL  BlockIt)

Definition at line 419 of file input.c.

421{
422 BOOL ret;
423
424 TRACE("Enter NtUserBlockInput\n");
426
428
429 UserLeave();
430 TRACE("Leave NtUserBlockInput, ret=%i\n", ret);
431
432 return ret;
433}
BOOL FASTCALL IntBlockInput(PTHREADINFO pti, BOOL BlockIt)
Definition: input.c:375

Referenced by BlockInput().

◆ NtUserBuildHimcList()

NTSTATUS NTAPI NtUserBuildHimcList ( DWORD  dwThreadId,
DWORD  dwCount,
HIMC phList,
LPDWORD  pdwCount 
)

Definition at line 690 of file ime.c.

691{
693 DWORD dwRealCount;
694 PTHREADINFO pti;
695
697
698 if (!IS_IMM_MODE())
699 {
700 ERR("!IS_IMM_MODE()\n");
702 goto Quit;
703 }
704
705 if (dwThreadId == 0)
706 {
707 pti = gptiCurrent;
708 }
709 else if (dwThreadId == INVALID_THREAD_ID)
710 {
711 pti = NULL;
712 }
713 else
714 {
716 if (!pti || !pti->rpdesk)
717 goto Quit;
718 }
719
721 {
722 ProbeForWrite(phList, dwCount * sizeof(HIMC), 1);
723 ProbeForWrite(pdwCount, sizeof(DWORD), 1);
724 *pdwCount = dwRealCount = UserBuildHimcList(pti, dwCount, phList);
725 }
727 {
728 ERR("%p, %p\n", phList, pdwCount);
729 _SEH2_YIELD(goto Quit);
730 }
731 _SEH2_END;
732
733 if (dwCount < dwRealCount)
735 else
737
738Quit:
739 UserLeave();
740 return ret;
741}
DWORD HIMC
Definition: dimm.idl:75
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:143
DWORD dwThreadId
Definition: fdebug.c:31
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
PTHREADINFO gptiCurrent
Definition: ntuser.c:15
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:82
#define _SEH2_END
Definition: pseh2_64.h:171
#define _SEH2_TRY
Definition: pseh2_64.h:71
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:184
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
struct _DESKTOP * rpdesk
Definition: win32.h:92
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define INVALID_THREAD_ID
Definition: ime.c:15
DWORD FASTCALL UserBuildHimcList(PTHREADINFO pti, DWORD dwCount, HIMC *phList)
Definition: ime.c:536

Referenced by Imm32BuildHimcList().

◆ NtUserBuildHwndList()

NTSTATUS NTAPI NtUserBuildHwndList ( HDESK  hDesktop,
HWND  hwndParent,
BOOLEAN  bChildren,
ULONG  dwThreadId,
ULONG  cHwnd,
HWND phwndList,
ULONG pcHwndNeeded 
)

Definition at line 1521 of file window.c.

1529{
1531 ULONG dwCount = 0;
1532
1533 if (pcHwndNeeded == NULL)
1535
1537
1538 if (hwndParent || !dwThreadId)
1539 {
1542
1543 if(!hwndParent)
1544 {
1545 if(hDesktop == NULL && !(Desktop = IntGetActiveDesktop()))
1546 {
1548 goto Quit;
1549 }
1550
1551 if(hDesktop)
1552 {
1554 UserMode,
1555 0,
1556 &Desktop);
1557 if(!NT_SUCCESS(Status))
1558 {
1560 goto Quit;
1561 }
1562 }
1563 hwndParent = Desktop->DesktopWindow;
1564 }
1565 else
1566 {
1567 hDesktop = 0;
1568 }
1569
1571 (Window = Parent->spwndChild))
1572 {
1573 BOOL bGoDown = TRUE;
1574
1576 while(TRUE)
1577 {
1578 if (bGoDown)
1579 {
1580 if (dwCount++ < cHwnd && phwndList)
1581 {
1582 _SEH2_TRY
1583 {
1584 ProbeForWrite(phwndList, sizeof(HWND), 1);
1585 *phwndList = UserHMGetHandle(Window);
1586 phwndList++;
1587 }
1589 {
1591 }
1592 _SEH2_END
1593 if(!NT_SUCCESS(Status))
1594 {
1595 break;
1596 }
1597 }
1598 if (Window->spwndChild && bChildren)
1599 {
1600 Window = Window->spwndChild;
1601 continue;
1602 }
1603 bGoDown = FALSE;
1604 }
1605 if (Window->spwndNext)
1606 {
1607 Window = Window->spwndNext;
1608 bGoDown = TRUE;
1609 continue;
1610 }
1611 Window = Window->spwndParent;
1612 if (Window == Parent)
1613 {
1614 break;
1615 }
1616 }
1617 }
1618
1619 if(hDesktop)
1620 {
1622 }
1623 }
1624 else // Build EnumThreadWindows list!
1625 {
1627 PTHREADINFO W32Thread;
1628 PWND Window;
1629 HWND *List = NULL;
1630
1632 if (!NT_SUCCESS(Status))
1633 {
1634 ERR("Thread Id is not valid!\n");
1636 goto Quit;
1637 }
1638 if (!(W32Thread = (PTHREADINFO)Thread->Tcb.Win32Thread))
1639 {
1641 TRACE("Tried to enumerate windows of a non gui thread\n");
1643 goto Quit;
1644 }
1645
1646 // Do not use Thread link list due to co_UserFreeWindow!!!
1647 // Current = W32Thread->WindowListHead.Flink;
1648 // Fixes Api:CreateWindowEx tests!!!
1650 if (List)
1651 {
1652 int i;
1653 for (i = 0; List[i]; i++)
1654 {
1656 if (Window && Window->head.pti == W32Thread)
1657 {
1658 if (dwCount < cHwnd && phwndList)
1659 {
1660 _SEH2_TRY
1661 {
1662 ProbeForWrite(phwndList, sizeof(HWND), 1);
1663 *phwndList = UserHMGetHandle(Window);
1664 phwndList++;
1665 }
1667 {
1669 }
1670 _SEH2_END
1671 if (!NT_SUCCESS(Status))
1672 {
1673 ERR("Failure to build window list!\n");
1674 break;
1675 }
1676 }
1677 dwCount++;
1678 }
1679 }
1681 }
1682
1684 }
1685
1686 *pcHwndNeeded = dwCount;
1688
1689Quit:
1691 UserLeave();
1692 return Status;
1693}
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE Parent
Definition: acpixf.h:732
static HWND hwndParent
Definition: cryptui.c:300
#define STATUS_INVALID_HANDLE
Definition: d3dkmdt.h:40
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define UserHMGetHandle(obj)
Definition: ntuser.h:230
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
#define UserMode
Definition: asm.h:39
NTSTATUS NTAPI PsLookupThreadByThreadId(IN HANDLE ThreadId, OUT PETHREAD *Thread)
Definition: thread.c:643
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:181
KTHREAD Tcb
Definition: pstypes.h:1104
PVOID Win32Thread
Definition: ketypes.h:1866
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
PDESKTOP FASTCALL IntGetActiveDesktop(VOID)
Definition: desktop.c:1279
PWND FASTCALL UserGetDesktopWindow(VOID)
Definition: desktop.c:1403
NTSTATUS FASTCALL IntValidateDesktopHandle(HDESK Desktop, KPROCESSOR_MODE AccessMode, ACCESS_MASK DesiredAccess, PDESKTOP *Object)
Definition: desktop.c:1254
#define USERTAG_WINDOWLIST
Definition: tags.h:298
HWND *FASTCALL IntWinListChildren(PWND Window)
Definition: window.c:276
PWND FASTCALL UserGetWindowObject(HWND hWnd)
Definition: window.c:124
#define ObDereferenceObject
Definition: obfuncs.h:203

Referenced by enum_windows(), User32EnumWindows(), and WIN_ListChildren().

◆ NtUserBuildNameList()

NTSTATUS NTAPI NtUserBuildNameList ( HWINSTA  hWinSta,
ULONG  dwSize,
PVOID  lpBuffer,
PULONG  pRequiredSize 
)

Definition at line 1937 of file winsta.c.

1942{
1943 /* The WindowStation name list and desktop name list are build in completely
1944 different ways. Call the appropriate function */
1945 return NULL == hWindowStation ? BuildWindowStationNameList(dwSize, lpBuffer, pRequiredSize) :
1946 BuildDesktopNameList(hWindowStation, dwSize, lpBuffer, pRequiredSize);
1947}
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:175
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
static NTSTATUS FASTCALL BuildWindowStationNameList(ULONG dwSize, PVOID lpBuffer, PULONG pRequiredSize)
Definition: winsta.c:1622
static NTSTATUS FASTCALL BuildDesktopNameList(HWINSTA hWindowStation, ULONG dwSize, PVOID lpBuffer, PULONG pRequiredSize)
Definition: winsta.c:1810

Referenced by EnumNamesW().

◆ NtUserBuildPropList()

NTSTATUS NTAPI NtUserBuildPropList ( HWND  hWnd,
LPVOID  Buffer,
DWORD  BufferSize,
DWORD Count 
)

◆ NtUserCalcMenuBar()

DWORD NTAPI NtUserCalcMenuBar ( HWND  hwnd,
DWORD  x,
DWORD  width,
DWORD  y,
LPRECT  prc 
)

Definition at line 5554 of file menu.c.

5560{
5561 HDC hdc;
5562 PWND Window;
5563 RECT Rect;
5564 DWORD ret;
5565
5567
5569 {
5571 UserLeave();
5572 return 0;
5573 }
5574
5576 if (!hdc)
5577 {
5578 UserLeave();
5579 return 0;
5580 }
5581
5582 Rect.left = leftBorder;
5583 Rect.right = Window->rcWindow.right - Window->rcWindow.left - rightBorder;
5584 Rect.top = top;
5585 Rect.bottom = 0;
5586
5588
5589 UserReleaseDC( 0, hdc, FALSE );
5590
5591 UserLeave();
5592
5593 return ret;
5594}
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
INT FASTCALL UserReleaseDC(PWND Window, HDC hDc, BOOL EndPaint)
Definition: windc.c:918
HDC FASTCALL UserGetDCEx(PWND Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
UINT MENU_DrawMenuBar(HDC hDC, LPRECT lprect, PWND pWnd, BOOL suppress_draw)
Definition: menu.c:2742
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define ERROR_INVALID_WINDOW_HANDLE
Definition: winerror.h:881
#define DCX_CACHE
Definition: winuser.h:2117

◆ NtUserCallHwnd()

DWORD_PTR NTAPI NtUserCallHwnd ( HWND  hWnd,
DWORD  Routine 
)

Definition at line 711 of file simplecall.c.

714{
715 switch (Routine)
716 {
718 {
719 PWND Window;
720 DWORD HelpId;
721
723
725 {
726 UserLeave();
727 return 0;
728 }
729
731
732 UserLeave();
733 return HelpId;
734 }
735
737 if (IntIsWindow(hWnd))
739 return FALSE;
740 break;
741
743 if (IntIsWindow(hWnd))
745 return FALSE;
746
748 {
749 PWND Window;
752 {
753 Window->state |= WNDS_MSGBOX;
754 }
755 UserLeave();
756 return FALSE;
757 }
758
760 {
761 PWND pWnd;
764 if (pWnd)
765 pWnd = DWP_GetEnabledPopup(pWnd);
766 UserLeave();
767 return (DWORD_PTR)pWnd;
768 }
769 }
770
771 STUB;
772
773 return 0;
774}
#define HandleToUlong(h)
Definition: basetsd.h:79
PSERVERINFO gpsi
Definition: imm.c:18
#define WNDS_MSGBOX
Definition: ntuser.h:610
#define STUB
Definition: kernel32.h:27
PWND FASTCALL DWP_GetEnabledPopup(PWND pWnd)
Definition: defwnd.c:499
VOID FASTCALL UserEnterShared(VOID)
Definition: ntuser.c:242
ATOM atomContextHelpIdProp
Definition: ntuser.h:1067
uint32_t DWORD_PTR
Definition: typedefs.h:65
BOOL IntDeRegisterShellHookWindow(HWND hWnd)
Definition: desktop.c:1801
BOOL IntRegisterShellHookWindow(HWND hWnd)
Definition: desktop.c:1769
HANDLE FASTCALL UserGetProp(_In_ PWND Window, _In_ ATOM Atom, _In_ BOOLEAN SystemProp)
Definition: prop.c:46
BOOL FASTCALL IntIsWindow(HWND hWnd)
Definition: window.c:178

Referenced by GetWindow(), NtUserxDeregisterShellHookWindow(), NtUserxGetWindowContextHelpId(), NtUserxRegisterShellHookWindow(), NtUserxSetMessageBox(), START_TEST(), Test_HwndParamRoutine_SetWindowContextHelpId(), Test_HwndRoutine_DeregisterShellHookWindow(), Test_HwndRoutine_GetWindowContextHelpId(), Test_HwndRoutine_SetMsgBox(), WIN_GetFullHandle(), WIN_IsCurrentProcess(), and WIN_IsCurrentThread().

◆ NtUserCallHwndLock()

BOOL NTAPI NtUserCallHwndLock ( HWND  hWnd,
DWORD  Routine 
)

Definition at line 585 of file simplecall.c.

588{
589 BOOL Ret = FALSE;
590 PWND Window;
592
593 TRACE("Enter NtUserCallHwndLock\n");
595
597 {
598 Ret = FALSE;
599 goto Exit;
600 }
601
602 UserRefObjectCo(Window, &Ref);
603
604 /* FIXME: Routine can be 0x53 - 0x5E */
605 switch (Routine)
606 {
609 break;
610
612 {
613 TRACE("HWNDLOCK_ROUTINE_DRAWMENUBAR\n");
614 Ret = TRUE;
615 if ((Window->style & (WS_CHILD | WS_POPUP)) != WS_CHILD)
618 0, 0, 0, 0,
619 SWP_NOSIZE |
620 SWP_NOMOVE |
624 break;
625 }
626
630 0, 0, 0, 0,
631 SWP_NOSIZE |
632 SWP_NOMOVE |
636 Ret = TRUE;
637 break;
638
642 0, 0, 0, 0,
643 SWP_NOSIZE |
644 SWP_NOMOVE |
648 if (!Window->spwndOwner && !IntGetParent(Window))
649 {
650 co_IntShellHookNotify(HSHELL_REDRAW, (WPARAM)hWnd, FALSE); // FIXME Flashing?
651 }
652 Ret = TRUE;
653 break;
654
656 TRACE("co_IntSetForegroundWindow 1 0x%p\n", hWnd);
658 TRACE("co_IntSetForegroundWindow 2 0x%p\n", hWnd);
659 break;
660
662 TRACE("co_IntSetForegroundWindow M 1 0x%p\n", hWnd);
664 TRACE("co_IntSetForegroundWindow M 2 0x%p\n", hWnd);
665 break;
666
669 Ret = TRUE;
670 break;
671
674 break;
675 }
676
678
679Exit:
680 TRACE("Leave NtUserCallHwndLock, ret=%u\n", Ret);
681 UserLeave();
682
683 return Ret;
684}
BOOL FASTCALL co_IntSetForegroundWindow(PWND Window)
Definition: focus.c:1552
BOOL FASTCALL co_IntSetForegroundWindowMouse(PWND Window)
Definition: focus.c:1563
#define HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOWMOUSE
Definition: ntuser.h:3585
UINT FASTCALL co_WinPosArrangeIconicWindows(PWND parent)
Definition: winpos.c:737
BOOLEAN FASTCALL co_WinPosSetWindowPos(PWND Window, HWND WndInsertAfter, INT x, INT y, INT cx, INT cy, UINT flags)
Definition: winpos.c:1792
#define WS_CHILD
Definition: pedump.c:617
#define WS_POPUP
Definition: pedump.c:616
VOID FASTCALL co_IntUpdateWindows(PWND Wnd, ULONG Flags, BOOL Recurse)
Definition: painting.c:519
VOID co_IntShellHookNotify(WPARAM Message, WPARAM wParam, LPARAM lParam)
Definition: desktop.c:1709
VOID FASTCALL IntCheckImeShowStatusInThread(PWND pImeWnd)
Definition: ime.c:2394
PWND FASTCALL IntGetParent(PWND Wnd)
Definition: window.c:206
UINT_PTR WPARAM
Definition: windef.h:207
#define SWP_NOACTIVATE
Definition: winuser.h:1245
#define SWP_FRAMECHANGED
Definition: winuser.h:1243
#define SWP_NOMOVE
Definition: winuser.h:1247
#define SWP_NOSIZE
Definition: winuser.h:1248
#define HWND_DESKTOP
Definition: winuser.h:1212
#define RDW_ALLCHILDREN
Definition: winuser.h:1224
#define SWP_NOZORDER
Definition: winuser.h:1250

Referenced by ImeWnd_OnImeSetContext(), NtUserxArrangeIconicWindows(), NtUserxDrawMenuBar(), NtUserxMDIRedrawFrame(), NtUserxSetForegroundWindow(), NtUserxUpdateWindow(), START_TEST(), Test_HwndLockRoutine_CheckImeShowStatusInThread(), Test_HwndLockRoutine_DrawMenuBar(), Test_HwndLockRoutine_GetSysMenuHandle(), and Test_HwndLockRoutine_UpdateWindow().

◆ NtUserCallHwndOpt()

HWND NTAPI NtUserCallHwndOpt ( HWND  hWnd,
DWORD  Routine 
)

Definition at line 691 of file simplecall.c.

694{
695 switch (Routine)
696 {
698 GetW32ThreadInfo()->pDeskInfo->hProgmanWindow = hWnd;
699 break;
700
702 GetW32ThreadInfo()->pDeskInfo->hTaskManWindow = hWnd;
703 break;
704 }
705
706 return hWnd;
707}
struct _THREADINFO * GetW32ThreadInfo(VOID)
Definition: misc.c:807

Referenced by NtUserxSetProgmanWindow(), and NtUserxSetTaskmanWindow().

◆ NtUserCallHwndParam()

DWORD NTAPI NtUserCallHwndParam ( HWND  hWnd,
DWORD_PTR  Param,
DWORD  Routine 
)

Definition at line 778 of file simplecall.c.

782{
783
784 switch (Routine)
785 {
787 {
788 DWORD ret;
789
792 UserLeave();
793 return ret;
794 }
795
797 {
798 PWND Window;
799
802 {
803 UserLeave();
804 return FALSE;
805 }
806
807 if (Param)
808 UserSetProp(Window, gpsi->atomContextHelpIdProp, (HANDLE)Param, TRUE);
809 else
811
812 UserLeave();
813 return TRUE;
814 }
815
817 {
818 PWND pWnd;
820
822
823 if (!(pWnd = UserGetWindowObject(hWnd)))
824 {
825 UserLeave();
826 return 0;
827 }
828 UserRefObjectCo(pWnd, &Ref);
829
830 if (pWnd->head.pti->ppi == PsGetCurrentProcessWin32Process() &&
831 pWnd->cbwndExtra >= DLGWINDOWEXTRA &&
833 {
834 pWnd->DialogPointer = (PVOID)Param;
835 if (Param)
836 {
837 if (!pWnd->fnid) pWnd->fnid = FNID_DIALOG;
838 pWnd->state |= WNDS_DIALOGWINDOW;
839 }
840 else
841 {
842 pWnd->fnid |= FNID_DESTROY;
843 pWnd->state &= ~WNDS_DIALOGWINDOW;
844 }
845 }
846
847 UserDerefObjectCo(pWnd);
848 UserLeave();
849 return 0;
850 }
851
853 {
854 PWND pWnd;
855 PNOTIFYEVENT pne;
857 pne = (PNOTIFYEVENT)Param;
858 if (hWnd)
860 else
861 pWnd = NULL;
862 IntNotifyWinEvent(pne->event, pWnd, pne->idObject, pne->idChild, pne->flags);
863 UserLeave();
864 return 0;
865 }
866
868 {
869 PWND pWnd;
872 if (pWnd) IntClearWindowState(pWnd, (UINT)Param);
873 UserLeave();
874 return 0;
875 }
876
878 {
879 PWND pWnd;
882 if (pWnd) IntSetWindowState(pWnd, (UINT)Param);
883 UserLeave();
884 return 0;
885 }
886 }
887
888 STUB;
889
890 return 0;
891}
struct _NOTIFYEVENT * PNOTIFYEVENT
#define FNID_DESTROY
Definition: ntuser.h:898
#define WNDS_SERVERSIDEWINDOWPROC
Definition: ntuser.h:623
#define FNID_DIALOG
Definition: ntuser.h:869
#define HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT
Definition: ntuser.h:3595
#define WNDS_DIALOGWINDOW
Definition: ntuser.h:621
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
unsigned int UINT
Definition: ndis.h:50
HANDLE FASTCALL UserRemoveProp(_In_ PWND Window, _In_ ATOM Atom, _In_ BOOLEAN SystemProp)
LONG idChild
Definition: hook.h:39
DWORD flags
Definition: hook.h:40
LONG idObject
Definition: hook.h:38
DWORD event
Definition: hook.h:37
THRDESKHEAD head
Definition: ntuser.h:695
DWORD fnid
Definition: ntuser.h:709
DWORD state
Definition: ntuser.h:701
PVOID DialogPointer
Definition: ntuser.h:766
ULONG cbwndExtra
Definition: ntuser.h:738
void * PVOID
Definition: typedefs.h:50
VOID FASTCALL IntNotifyWinEvent(DWORD Event, PWND pWnd, LONG idObject, LONG idChild, DWORD flags)
Definition: event.c:178
VOID FASTCALL IntClearWindowState(PWND pWnd, UINT Flag)
Definition: misc.c:618
VOID FASTCALL IntSetWindowState(PWND pWnd, UINT Flag)
Definition: misc.c:597
BOOL FASTCALL IntKillTimer(PWND Window, UINT_PTR IDEvent, BOOL SystemTimer)
Definition: timer.c:579
#define DLGWINDOWEXTRA
Definition: winuser.h:2568

Referenced by NtUserxClearWindowState(), NtUserxKillSystemTimer(), NtUserxNotifyWinEvent(), NtUserxSetDialogPointer(), NtUserxSetWindowContextHelpId(), NtUserxSetWindowState(), Test_HwndParamRoutine_SetWindowContextHelpId(), Test_HwndRoutine_GetWindowContextHelpId(), and WIN_SetStyle().

◆ NtUserCallHwndParamLock()

DWORD NTAPI NtUserCallHwndParamLock ( HWND  hWnd,
DWORD_PTR  Param,
DWORD  Routine 
)

Definition at line 895 of file simplecall.c.

899{
900 DWORD Ret = FALSE;
901 PWND Window;
903
904 TRACE("Enter NtUserCallHwndParamLock\n");
906
908 {
909 Ret = FALSE;
910 goto Exit;
911 }
912
913 UserRefObjectCo(Window, &Ref);
914
915 switch (Routine)
916 {
919 break;
920
922 {
923 PREGION Rgn = REGION_LockRgn((HRGN)Param);
925 if (Rgn) REGION_UnlockRgn(Rgn);
926 break;
927 }
928 }
929
931
932Exit:
933
934 TRACE("Leave NtUserCallHwndParamLock, ret=%lu\n", Ret);
935 UserLeave();
936
937 return Ret;
938}
#define DWORD
Definition: nt_native.h:44
Definition: region.h:8
BOOL FASTCALL co_UserRedrawWindow(PWND Window, const RECTL *UpdateRect, PREGION UpdateRgn, ULONG Flags)
Definition: painting.c:895
PREGION FASTCALL REGION_LockRgn(_In_ HRGN hrgn)
Definition: region.c:2358
VOID FASTCALL REGION_UnlockRgn(_In_ PREGION prgn)
Definition: region.c:2373
BOOL FASTCALL IntBroadcastImeShowStatusChange(PWND pImeWnd, BOOL bShow)
Definition: ime.c:2383
#define RDW_VALIDATE
Definition: winuser.h:1221

Referenced by ImeWnd_OnImeSystem(), and NtUserxValidateRgn().

◆ NtUserCallMsgFilter()

BOOL NTAPI NtUserCallMsgFilter ( LPMSG  msg,
INT  code 
)

Definition at line 2433 of file message.c.

2434{
2435 BOOL Ret = FALSE;
2436 MSG Msg;
2437
2438 _SEH2_TRY
2439 {
2440 ProbeForRead(lpmsg, sizeof(MSG), 1);
2441 RtlCopyMemory( &Msg, lpmsg, sizeof(MSG));
2442 }
2444 {
2445 _SEH2_YIELD(return FALSE);
2446 }
2447 _SEH2_END;
2448
2450
2452 {
2453 Ret = TRUE;
2454 }
2455 else
2456 {
2458 }
2459
2460 UserLeave();
2461
2462 _SEH2_TRY
2463 {
2464 ProbeForWrite(lpmsg, sizeof(MSG), 1);
2465 RtlCopyMemory(lpmsg, &Msg, sizeof(MSG));
2466 }
2468 {
2469 Ret = FALSE;
2470 }
2471 _SEH2_END;
2472
2473 return Ret;
2474}
struct @1671 Msg[]
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:102
LRESULT APIENTRY co_HOOK_CallHooks(INT HookId, INT Code, WPARAM wParam, LPARAM lParam)
Definition: hook.c:1102
Definition: inflate.c:139
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
LONG_PTR LPARAM
Definition: windef.h:208
#define WH_MSGFILTER
Definition: winuser.h:29
#define WH_SYSMSGFILTER
Definition: winuser.h:36

Referenced by CallMsgFilterA(), and CallMsgFilterW().

◆ NtUserCallNextHookEx()

LRESULT NTAPI NtUserCallNextHookEx ( int  Code,
WPARAM  wParam,
LPARAM  lParam,
BOOL  Ansi 
)

Definition at line 1370 of file hook.c.

1374{
1375 PTHREADINFO pti;
1376 PHOOK HookObj, NextObj;
1378 LRESULT lResult = 0;
1379
1380 TRACE("Enter NtUserCallNextHookEx\n");
1382
1383 pti = GetW32ThreadInfo();
1384
1385 HookObj = pti->sphkCurrent;
1386
1387 if (!HookObj)
1388 goto Exit; // Return 0
1389
1390 NextObj = HookObj->phkNext;
1391
1392 pti->sphkCurrent = NextObj;
1393 ClientInfo = pti->pClientInfo;
1394 _SEH2_TRY
1395 {
1396 ClientInfo->phkCurrent = NextObj;
1397 }
1399 {
1400 ClientInfo = NULL;
1401 }
1402 _SEH2_END;
1403
1404 /* Now in List run down. */
1405 if (ClientInfo && NextObj)
1406 {
1407 NextObj->phkNext = IntGetNextHook(NextObj);
1408 lResult = co_UserCallNextHookEx( NextObj, Code, wParam, lParam, NextObj->Ansi);
1409 }
1410
1411Exit:
1412 TRACE("Leave NtUserCallNextHookEx, ret=%i\n", lResult);
1413 UserLeave();
1414 return lResult;
1415}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
CLIENT_DATA ClientInfo
PHOOK FASTCALL IntGetNextHook(PHOOK Hook)
Definition: hook.c:995
static LRESULT APIENTRY co_UserCallNextHookEx(PHOOK Hook, int Code, WPARAM wParam, LPARAM lParam, BOOL Ansi)
Definition: hook.c:521
struct tagHOOK * sphkCurrent
Definition: win32.h:118
struct _CLIENTINFO * pClientInfo
Definition: win32.h:94
struct tagHOOK * phkNext
Definition: ntuser.h:241
BOOLEAN Ansi
Definition: ntuser.h:251
_In_ UCHAR _In_ UCHAR _In_ ULONG Code
Definition: wdfdevice.h:1701
LONG_PTR LRESULT
Definition: windef.h:209

Referenced by CallNextHookEx().

◆ NtUserCallNoParam()

DWORD_PTR NTAPI NtUserCallNoParam ( DWORD  Routine)

Definition at line 59 of file simplecall.c.

60{
61 DWORD_PTR Result = 0;
62
63 TRACE("Enter NtUserCallNoParam\n");
65
66 switch (Routine)
67 {
70 break;
71
74 break;
75
78 break;
79
82 break;
83
86 break;
87
90 break;
91
93 {
95 Result = (DWORD_PTR)MAKELONG(pti->ptLast.x, pti->ptLast.y);
96 break;
97 }
98
101 break;
102
105 break;
106
108 {
110 TRACE("Zapping the Active and Focus window out of the Queue!\n");
111 pti->MessageQueue->spwndFocus = NULL;
112 pti->MessageQueue->spwndActive = NULL;
113 Result = 0;
114 break;
115 }
116
119 break;
120
121 /* this is a ReactOS only case and is needed for gui-on-demand */
124 break;
125
127 if (UserIsIMMEnabled())
129 else
131
132 Result = TRUE; // Always return TRUE.
133 break;
134
135 default:
136 ERR("Calling invalid routine number 0x%x in NtUserCallNoParam\n", Routine);
138 break;
139 }
140
141 TRACE("Leave NtUserCallNoParam, ret=%p\n",(PVOID)Result);
142 UserLeave();
143
144 return Result;
145}
#define PsGetCurrentThread()
Definition: env_spec_w32.h:81
BOOL FASTCALL IntReleaseCapture(VOID)
Definition: focus.c:1532
#define NOPARAM_ROUTINE_ISCONSOLEMODE
Definition: ntuser.h:3580
#define SRVINFO_IMM32
Definition: ntuser.h:949
BOOL FASTCALL IntMsqClearWakeMask(VOID)
Definition: msgqueue.c:392
BOOL FASTCALL UserLoadApiHook(VOID)
Definition: hook.c:131
POINT ptLast
Definition: win32.h:129
struct _USER_MESSAGE_QUEUE * MessageQueue
Definition: win32.h:89
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
DWORD dwSRVIFlags
Definition: ntuser.h:1051
#define DWORD_PTR
Definition: treelist.c:76
#define MAKELONG(a, b)
Definition: typedefs.h:249
BOOL FASTCALL co_IntDestroyCaret(PTHREADINFO Win32Thread)
Definition: caret.c:159
HDC ScreenDeviceContext
Definition: desktop.c:53
BOOL gfIMEShowStatus
Definition: ime.c:29
HMENU FASTCALL UserCreateMenu(PDESKTOP Desktop, BOOL PopupMenu)
Definition: menu.c:5048
BOOL APIENTRY IntInitMessagePumpHook(VOID)
Definition: message.c:2160
BOOL APIENTRY IntUninitMessagePumpHook(VOID)
Definition: message.c:2173
BOOL FASTCALL UserIsIMMEnabled(VOID)
Definition: metric.c:22
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409

Referenced by EndDialog(), IsConsoleMode(), LoadUserApiHook(), NtUserxCreateMenu(), NtUserxCreatePopupMenu(), NtUserxDestroyCaret(), NtUserxGetMessagePos(), NtUserxInitMessagePump(), NtUserxMsqClearWakeMask(), NtUserxReleaseCapture(), NtUserxUnInitMessagePump(), Test_NoParamRoutine_CreateMenu(), Test_NoParamRoutine_CreatePopupMenu(), Test_NoParamRoutine_LoadUserApiHook(), UpdatePerUserImmEnabling(), and User32GetImeShowStatus().

◆ NtUserCallOneParam()

DWORD_PTR NTAPI NtUserCallOneParam ( DWORD_PTR  Param,
DWORD  Routine 
)

Definition at line 153 of file simplecall.c.

156{
158
159 TRACE("Enter NtUserCallOneParam\n");
160
162
163 switch (Routine)
164 {
166 {
167 PTHREADINFO pti;
169 MsqPostQuitMessage(pti, Param);
170 Result = TRUE;
171 break;
172 }
173
175 {
176 PSMWP psmwp;
177 HDWP hDwp = NULL;
178 INT count = (INT)Param;
179
180 if (count < 0)
181 {
183 Result = 0;
184 break;
185 }
186
187 /* Windows allows zero count, in which case it allocates context for 8 moves */
188 if (count == 0) count = 8;
189
191 NULL,
192 NULL,
193 (PHANDLE)&hDwp,
195 sizeof(SMWP));
196 if (!psmwp)
197 {
198 Result = 0;
199 break;
200 }
201
203 if (!psmwp->acvr)
204 {
206 Result = 0;
207 break;
208 }
209
210 RtlZeroMemory(psmwp->acvr, count * sizeof(CVR));
211 psmwp->bHandle = TRUE;
212 psmwp->ccvr = 0; // actualCount
213 psmwp->ccvrAlloc = count; // suggestedCount
214 Result = (DWORD_PTR)hDwp;
215 break;
216 }
217
220 break;
221
223 {
224 PTHREADINFO ti;
225 ti = GetW32ThreadInfo();
226 if (ti != NULL)
227 {
228 /* Try convert the pointer to a user mode pointer if the desktop is
229 mapped into the process */
231 }
232 else
233 {
234 Result = 0;
235 }
236 break;
237 }
238
241 break;
242
244 {
246 gspv.bMouseBtnSwap = Param ? TRUE : FALSE;
248 break;
249 }
250
253 break;
254
257 break;
258
260 {
262 {
264 Result = 0;
265 }
266 break;
267 }
268
270 {
271 BOOL Enable;
273
274 if (Process != NULL)
275 {
276 Enable = (BOOL)(Param != 0);
277
278 if (Enable)
279 {
280 Process->W32PF_flags &= ~W32PF_NOWINDOWGHOSTING;
281 }
282 else
283 {
284 Process->W32PF_flags |= W32PF_NOWINDOWGHOSTING;
285 }
286
287 Result = TRUE;
288 break;
289 }
290
291 Result = FALSE;
292 break;
293 }
294
297 break;
298
301 break;
302
305 break;
306
308 Result = UserReleaseDC(NULL, (HDC) Param, FALSE);
309 break;
310
312 Result = UserRealizePalette((HDC) Param);
313 break;
314
316 {
318 break;
319 }
320
322 /* FIXME: Should use UserEnterShared */
324 break;
325
326 case ONEPARAM_ROUTINE_GETCURSORPOS:
327 {
330 Result = TRUE;
331 if (pti->rpdesk != IntGetActiveDesktop())
332 {
333 Result = FALSE;
334 break;
335 }
337 {
338 ProbeForWrite((POINT*)Param,sizeof(POINT),1);
339 pptl = (PPOINTL)Param;
340 *pptl = gpsi->ptCursor;
341 }
343 {
344 Result = FALSE;
345 }
346 _SEH2_END;
347 break;
348 }
349
351 {
352 PPROCESSINFO ppi;
353 if (Param & LAYOUT_ORIENTATIONMASK || Param == LAYOUT_LTR)
354 {
356 ppi->dwLayout = Param;
357 Result = TRUE;
358 break;
359 }
361 Result = FALSE;
362 break;
363 }
364
366 {
367 PPROCESSINFO ppi;
368 PDWORD pdwLayout;
369 Result = TRUE;
370
372 {
374 Result = FALSE;
375 break;
376 }
377
380 {
381 pdwLayout = (PDWORD)Param;
382 *pdwLayout = ppi->dwLayout;
383 }
385 {
387 Result = FALSE;
388 }
389 _SEH2_END;
390 break;
391 }
392
395 break;
396
398 /* TODO: Implement sound sentry */
400 break;
401
402 case ONEPARAM_ROUTINE_CREATESYSTEMTHREADS:
404 break;
405
408 break;
409
412 break;
413
414 default:
415 ERR("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n",
416 Routine, Param);
418 Result = 0;
419 break;
420 }
421
422 TRACE("Leave NtUserCallOneParam, ret=%p\n", (PVOID)Result);
423 UserLeave();
424
425 return Result;
426}
PEPROCESS gpepCSRSS
Definition: csr.c:15
DWORD UserSystemThreadProc(BOOL bRemoteProcess)
Definition: csr.c:207
HWND FASTCALL IntWindowFromDC(HDC hDc)
Definition: windc.c:894
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PagedPool
Definition: env_spec_w32.h:308
BOOL FASTCALL IntLockSetForegroundWindow(UINT uLockCode)
Definition: focus.c:1574
BOOL FASTCALL IntAllowSetForegroundWindow(DWORD dwProcessId)
Definition: focus.c:1605
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
UINT WINAPI UserRealizePalette(HDC hDC)
Definition: painting.c:2346
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING
Definition: ntuser.h:3581
#define ONEPARAM_ROUTINE_GETDESKTOPMAPPING
Definition: ntuser.h:3582
#define LAYOUT_LTR
Definition: dc.c:36
VOID FASTCALL MsqPostQuitMessage(PTHREADINFO pti, ULONG ExitCode)
Definition: msgqueue.c:1381
int UserShowCursor(BOOL bShow)
Definition: msgqueue.c:168
LPARAM FASTCALL MsqSetMessageExtraInfo(LPARAM lParam)
Definition: msgqueue.c:2447
BOOL FASTCALL co_MsqReplyMessage(LRESULT lResult)
Definition: msgqueue.c:2484
HANDLE FASTCALL IntMsqSetWakeMask(DWORD WakeMask)
Definition: msgqueue.c:362
#define BOOL
Definition: nt_native.h:43
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:142
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
HWND hwndSAS
Definition: winsta.c:24
DWORD * PDWORD
Definition: pedump.c:68
#define INT
Definition: polytest.cpp:20
Definition: winpos.h:4
DWORD dwLayout
Definition: win32.h:280
Definition: winpos.h:21
PCVR acvr
Definition: winpos.h:27
INT ccvr
Definition: winpos.h:25
UINT bHandle
Definition: winpos.h:24
INT ccvrAlloc
Definition: winpos.h:26
BOOL bMouseBtnSwap
Definition: sysparams.h:82
int32_t INT
Definition: typedefs.h:58
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define WM_LOGONNOTIFY
Definition: undocuser.h:37
#define LN_MESSAGE_BEEP
Definition: undocuser.h:120
#define W32PF_NOWINDOWGHOSTING
Definition: win32.h:32
BOOL FASTCALL IntSetCaretBlinkTime(UINT uMSeconds)
Definition: caret.c:183
UINT APIENTRY UserEnumClipboardFormats(UINT fmt)
Definition: clipboard.c:443
HANDLE IntCreateCurIconHandle(BOOLEAN Animated)
Definition: cursoricon.c:285
static __inline PVOID DesktopHeapAddressToUser(PVOID lpMem)
Definition: desktop.h:308
HKL FASTCALL UserGetKeyboardLayout(DWORD dwThreadId)
Definition: kbdlayout.c:995
DWORD FASTCALL UserGetKeyboardType(DWORD dwTypeFlag)
Definition: keyboard.c:1684
DWORD APIENTRY IntGetQueueStatus(DWORD Changes)
Definition: message.c:2139
BOOL FASTCALL UserPostMessage(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: message.c:1395
BOOL FASTCALL UserDeleteObject(HANDLE h, HANDLE_TYPE type)
Definition: object.c:717
PVOID FASTCALL UserCreateObject(PUSER_HANDLE_TABLE ht, PDESKTOP pDesktop, PTHREADINFO pti, HANDLE *h, HANDLE_TYPE type, ULONG size)
Definition: object.c:568
SPIVALUES gspv
Definition: sysparams.c:17
#define USERTAG_SWP
Definition: tags.h:281
_In_ POINTL * pptl
Definition: winddi.h:3741
struct _POINTL * PPOINTL
#define ERROR_INVALID_ACCESS
Definition: winerror.h:115
#define LAYOUT_ORIENTATIONMASK
Definition: wingdi.h:1374
struct _SMWP SMWP
struct _SMWP * PSMWP
#define SM_SWAPBUTTON
Definition: winuser.h:987
#define PsGetCurrentProcess
Definition: psfuncs.h:17

Referenced by CreateSystemThreads(), DesktopPtrToUser(), GetProcessDefaultLayout(), GetWinStationInfo(), NtUserxAllowSetForegroundWindow(), NtUserxBeginDeferWindowPos(), NtUserxCreateEmptyCurObject(), NtUserxCreateSystemThreads(), NtUserxEnableProcessWindowGhosting(), NtUserxEnumClipboardFormats(), NtUserxGetCursorPos(), NtUserxGetDesktopMapping(), NtUserxGetKeyboardLayout(), NtUserxGetKeyboardType(), NtUserxGetQueueStatus(), NtUserxLockSetForegroundWindow(), NtUserxMessageBeep(), NtUserxMsqSetWakeMask(), NtUserxPostQuitMessage(), NtUserxRealizePalette(), NtUserxReleaseDC(), NtUserxReplyMessage(), NtUserxSetCaretBlinkTime(), NtUserxSetMessageExtraInfo(), NtUserxShowCursor(), NtUserxSwapMouseButton(), NtUserxWindowFromDC(), SetProcessDefaultLayout(), START_TEST(), Test_OneParamRoutine_BeginDeferWindowPos(), Test_OneParamRoutine_CreateEmptyCurObject(), Test_OneParamRoutine_MapDesktopObject(), Test_OneParamRoutine_SwapMouseButtons(), and Test_OneParamRoutine_WindowFromDC().

◆ NtUserCallTwoParam()

DWORD_PTR NTAPI NtUserCallTwoParam ( DWORD_PTR  Param1,
DWORD_PTR  Param2,
DWORD  Routine 
)

Definition at line 434 of file simplecall.c.

438{
439 PWND Window;
440 DWORD_PTR Ret;
441 TRACE("Enter NtUserCallTwoParam\n");
443
444 switch (Routine)
445 {
447 {
449 Ret = (DWORD_PTR)UserPaintCaption(Window, (INT)Param2);
450 break;
451 }
452
454 {
455 PMENU MenuObject = IntGetMenuObject((HMENU)Param1);
456 if (!MenuObject)
457 {
458 Ret = 0;
459 break;
460 }
461
462 if (Param2 > 0)
463 {
464 Ret = (MenuObject->cyMenu == (int)Param2);
465 MenuObject->cyMenu = (int)Param2;
466 }
467 else
468 Ret = (DWORD_PTR)MenuObject->cyMenu;
469 IntReleaseMenuObject(MenuObject);
470 break;
471 }
472
474 {
476 ASSERT(pti->MessageQueue);
477 Ret = (DWORD_PTR)MsqSetStateWindow(pti, (ULONG)Param1, (HWND)Param2);
478 break;
479 }
480
482 Ret = IntEnableWindow((HWND)Param1, (BOOL)Param2);
483 break;
484
486 {
488 if (!Window)
489 {
490 Ret = 0;
491 break;
492 }
493
494 Ret = (DWORD_PTR)IntShowOwnedPopups(Window, (BOOL)Param2);
495 break;
496 }
497
499 {
502 if (!Window)
503 {
504 Ret = 0;
505 break;
506 }
507
508 /* Unpack wParam */
509 wParam = MAKEWPARAM((Param2 >> 3) & 0x3,
510 Param2 & (UISF_HIDEFOCUS | UISF_HIDEACCEL | UISF_ACTIVE));
511
513 break;
514 }
515
517 {
518 HWND hwnd = (HWND)Param1;
519 BOOL fAltTab = (BOOL)Param2;
520 Ret = 0;
522 if (!Window)
523 break;
524
525 if (gpqForeground && !fAltTab)
526 {
527 PWND pwndActive = gpqForeground->spwndActive;
528 if (pwndActive && !(pwndActive->ExStyle & WS_EX_TOPMOST))
529 {
530 co_WinPosSetWindowPos(pwndActive, HWND_BOTTOM, 0, 0, 0, 0,
533 }
534
536 break;
537 }
538
540
541 if (fAltTab && (Window->style & WS_MINIMIZE))
542 {
544 MsqPostMessage(Window->head.pti, &msg, FALSE, QS_POSTMESSAGE, 0, 0);
545 }
546 break;
547 }
548
550 Ret = (DWORD_PTR)co_IntSetCaretPos((int)Param1, (int)Param2);
551 break;
552
554 Ret = (DWORD_PTR)co_IntRegisterLogonProcess((HANDLE)Param1, (BOOL)Param2);
555 break;
556
558 Ret = (DWORD_PTR)UserSetCursorPos((int)Param1, (int)Param2, 0, 0, FALSE);
559 break;
560
562 Ret = IntUnhookWindowsHook((int)Param1, (HOOKPROC)Param2);
563 break;
564
565 default:
566 ERR("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x Parm2=0x%x\n",
567 Routine, Param1, Param2);
569 Ret = 0;
570 }
571
572
573 TRACE("Leave NtUserCallTwoParam, ret=%p\n", (PVOID)Ret);
574 UserLeave();
575
576 return Ret;
577}
#define msg(x)
Definition: auth_time.c:54
HANDLE HWND
Definition: compat.h:19
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
BOOL FASTCALL UserSetActiveWindow(_In_opt_ PWND Wnd)
Definition: focus.c:1263
PUSER_MESSAGE_QUEUE gpqForeground
Definition: focus.c:13
#define TWOPARAM_ROUTINE_SETGUITHRDHANDLE
Definition: ntuser.h:3584
#define TWOPARAM_ROUTINE_ROS_UPDATEUISTATE
Definition: ntuser.h:3594
#define TWOPARAM_ROUTINE_SETMENUBARHEIGHT
Definition: ntuser.h:3583
#define IntReleaseMenuObject(MenuObj)
Definition: menu.h:130
#define ASSERT(a)
Definition: mode.c:44
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
HWND FASTCALL MsqSetStateWindow(PTHREADINFO pti, ULONG Type, HWND hWnd)
Definition: msgqueue.c:2507
VOID FASTCALL MsqPostMessage(PTHREADINFO pti, MSG *Msg, BOOLEAN HardwareMessage, DWORD MessageBits, DWORD dwQEvent, LONG_PTR ExtraInfo)
Definition: msgqueue.c:1337
BOOL UserPaintCaption(PWND pWnd, INT Flags)
Definition: defwnd.c:398
BOOL FASTCALL IntUnhookWindowsHook(int HookId, HOOKPROC pfnFilterProc)
Definition: hook.c:1319
struct _THREADINFO * PTHREADINFO
Definition: ntwin32.h:6
#define WS_MINIMIZE
Definition: pedump.c:622
#define WS_EX_TOPMOST
Definition: pedump.c:647
BOOL FASTCALL co_IntRegisterLogonProcess(HANDLE ProcessId, BOOL Register)
Definition: simplecall.c:18
DWORD ExStyle
Definition: ntuser.h:704
ULONG cyMenu
Definition: ntuser.h:423
BOOL FASTCALL co_IntSetCaretPos(int X, int Y)
Definition: caret.c:193
BOOL UserSetCursorPos(INT x, INT y, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook)
Definition: cursoricon.c:238
PMENU FASTCALL IntGetMenuObject(HMENU hMenu)
Definition: menu.c:192
BOOL FASTCALL IntEnableWindow(HWND hWnd, BOOL bEnable)
Definition: window.c:222
BOOL FASTCALL IntShowOwnedPopups(PWND OwnerWnd, BOOL fShow)
Definition: window.c:4654
BOOL FASTCALL UserUpdateUiState(PWND Wnd, WPARAM wParam)
Definition: window.c:40
#define MAKEWPARAM(l, h)
Definition: winuser.h:4012
LRESULT(CALLBACK * HOOKPROC)(int, WPARAM, LPARAM)
Definition: winuser.h:2902
#define WM_SYSCOMMAND
Definition: winuser.h:1744
#define SWP_ASYNCWINDOWPOS
Definition: winuser.h:1256
#define QS_POSTMESSAGE
Definition: winuser.h:880
#define SC_RESTORE
Definition: winuser.h:2601
#define HWND_BOTTOM
Definition: winuser.h:1208

Referenced by MDI_UpdateFrameText(), NtUserxEnableWindow(), NtUserxRegisterLogonProcess(), NtUserxSetCaretPos(), NtUserxSetCursorPos(), NtUserxSetGUIThreadHandle(), NtUserxSetMenuBarHeight(), NtUserxShowOwnedPopups(), NtUserxSwitchToThisWindow(), NtUserxUnhookWindowsHook(), NtUserxUpdateUiState(), and set_dialog_proc().

◆ NtUserChangeClipboardChain()

BOOL NTAPI NtUserChangeClipboardChain ( HWND  hWndRemove,
HWND  hWndNewNext 
)

Definition at line 624 of file clipboard.c.

625{
626 BOOL bRet = FALSE;
627 PWND pWindowRemove;
628 PWINSTATION_OBJECT pWinStaObj;
629
630 TRACE("NtUserChangeClipboardChain(%p, %p)\n", hWndRemove, hWndNewNext);
631
633
634 pWinStaObj = IntGetWinStaForCbAccess();
635 if (!pWinStaObj)
636 goto cleanup;
637
638 pWindowRemove = UserGetWindowObject(hWndRemove);
639
640 if (pWindowRemove && pWinStaObj->spwndClipViewer)
641 {
642 if (pWindowRemove == pWinStaObj->spwndClipViewer)
643 pWinStaObj->spwndClipViewer = UserGetWindowObject(hWndNewNext);
644
645 if (pWinStaObj->spwndClipViewer)
646 bRet = (BOOL)co_IntSendMessage(UserHMGetHandle(pWinStaObj->spwndClipViewer), WM_CHANGECBCHAIN, (WPARAM)hWndRemove, (LPARAM)hWndNewNext);
647 }
648
649 ObDereferenceObject(pWinStaObj);
650
651cleanup:
652 UserLeave();
653
654 return bRet;
655}
static void cleanup(void)
Definition: main.c:1335
PWND spwndClipViewer
Definition: winsta.h:27
static PWINSTATION_OBJECT FASTCALL IntGetWinStaForCbAccess(VOID)
Definition: clipboard.c:21
LRESULT FASTCALL co_IntSendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: message.c:1495
#define WM_CHANGECBCHAIN
Definition: winuser.h:1877

Referenced by ChangeClipboardChain().

◆ NtUserChangeDisplaySettings()

LONG NTAPI NtUserChangeDisplaySettings ( PUNICODE_STRING  lpszDeviceName,
LPDEVMODEW  lpDevMode,
DWORD  dwflags,
LPVOID  lParam 
)

Definition at line 930 of file display.c.

935{
936 WCHAR awcDevice[CCHDEVICENAME];
937 UNICODE_STRING ustrDevice;
938 DEVMODEW dmLocal;
939 LONG lRet;
940
941 /* Check arguments */
942 if ((dwflags != CDS_VIDEOPARAMETERS) && (lParam != NULL))
943 {
946 }
947
948 /* Check flags */
950 {
952 }
953
954 if ((dwflags & CDS_RESET) && (dwflags & CDS_NORESET))
955 {
957 }
958
959 /* Copy the device name */
960 if (pustrDevice)
961 {
962 /* Initialize destination string */
963 RtlInitEmptyUnicodeString(&ustrDevice, awcDevice, sizeof(awcDevice));
964
966 {
967 /* Probe the UNICODE_STRING and the buffer */
968 ProbeForRead(pustrDevice, sizeof(UNICODE_STRING), 1);
969 ProbeForRead(pustrDevice->Buffer, pustrDevice->Length, 1);
970
971 /* Copy the string */
972 RtlCopyUnicodeString(&ustrDevice, pustrDevice);
973 }
975 {
976 /* Set and return error */
979 }
981
982 pustrDevice = &ustrDevice;
983 }
984
985 /* Copy devmode */
986 if (lpDevMode)
987 {
989 {
990 /* Probe the size field of the structure */
991 ProbeForRead(lpDevMode, sizeof(dmLocal.dmSize), 1);
992
993 /* Calculate usable size */
994 dmLocal.dmSize = min(sizeof(dmLocal), lpDevMode->dmSize);
995
996 /* Probe and copy the full DEVMODE */
997 ProbeForRead(lpDevMode, dmLocal.dmSize, 1);
998 RtlCopyMemory(&dmLocal, lpDevMode, dmLocal.dmSize);
999 }
1001 {
1002 /* Set and return error */
1005 }
1006 _SEH2_END
1007
1008 /* Check for extra parameters */
1009 if (dmLocal.dmDriverExtra > 0)
1010 {
1011 /* FIXME: TODO */
1012 ERR("lpDevMode->dmDriverExtra is IGNORED!\n");
1013 dmLocal.dmDriverExtra = 0;
1014 }
1015
1016 /* Use the local structure */
1017 lpDevMode = &dmLocal;
1018 }
1019
1020 // FIXME: Copy videoparameters
1021
1022 /* Acquire global USER lock */
1024
1025 /* Call internal function */
1026 lRet = UserChangeDisplaySettings(pustrDevice, lpDevMode, dwflags, NULL);
1027
1028 /* Release lock */
1029 UserLeave();
1030
1031 return lRet;
1032}
#define CCHDEVICENAME
Definition: ddrawi.h:63
static _In_ DWORD dwflags
Definition: dispmode.c:64
static _In_ DWORD _Inout_ PDEVMODEA lpDevMode
Definition: dispmode.c:77
#define min(a, b)
Definition: monoChain.cc:55
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
WORD dmSize
Definition: wingdi.h:1568
WORD dmDriverExtra
Definition: wingdi.h:1621
WORD dmSize
Definition: wingdi.h:1620
LONG APIENTRY UserChangeDisplaySettings(PUNICODE_STRING pustrDevice, LPDEVMODEW pdm, DWORD flags, LPVOID lParam)
Definition: display.c:700
#define CDS_VIDEOPARAMETERS
Definition: winuser.h:186
#define DISP_CHANGE_BADPARAM
Definition: winuser.h:193
#define CDS_UPDATEREGISTRY
Definition: winuser.h:181
#define DISP_CHANGE_BADFLAGS
Definition: winuser.h:192
#define CDS_NORESET
Definition: winuser.h:189
#define CDS_RESET
Definition: winuser.h:187
#define CDS_GLOBAL
Definition: winuser.h:184
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by ChangeDisplaySettingsExA(), and ChangeDisplaySettingsExW().

◆ NtUserCheckDesktopByThreadId()

BOOL NTAPI NtUserCheckDesktopByThreadId ( DWORD  dwThreadId)

◆ NtUserCheckImeHotKey()

DWORD NTAPI NtUserCheckImeHotKey ( UINT  uVirtualKey,
LPARAM  lParam 
)

Definition at line 467 of file ime.c.

468{
469 PIMEHOTKEY pNode;
471
473
474 if (!gpqForeground || !IS_IMM_MODE())
475 goto Quit;
476
477 pNode = IntCheckImeHotKey(gpqForeground, uVirtualKey, lParam);
478 if (pNode)
479 ret = pNode->dwHotKeyId;
480
481Quit:
482 UserLeave();
483 return ret;
484}
DWORD dwHotKeyId
Definition: ime.c:34
#define INVALID_HOTKEY
Definition: ime.c:16
PIMEHOTKEY IntCheckImeHotKey(PUSER_MESSAGE_QUEUE MessageQueue, UINT uVirtualKey, LPARAM lParam)
Definition: ime.c:275

◆ NtUserCheckMenuItem()

DWORD NTAPI NtUserCheckMenuItem ( HMENU  hmenu,
UINT  uIDCheckItem,
UINT  uCheck 
)

Definition at line 5600 of file menu.c.

5604{
5605 PMENU Menu;
5606 DWORD Ret = (DWORD)-1;
5607
5608 TRACE("Enter NtUserCheckMenuItem\n");
5610
5611 Menu = UserGetMenuObject(hMenu);
5612 if (Menu)
5613 {
5614 Ret = IntCheckMenuItem(Menu, uIDCheckItem, uCheck);
5615 }
5616
5617 TRACE("Leave NtUserCheckMenuItem, ret=%lu\n", Ret);
5618 UserLeave();
5619 return Ret;
5620}
FORCEINLINE PMENU UserGetMenuObject(HMENU hMenu)
Definition: userfuncs.h:4
DWORD FASTCALL IntCheckMenuItem(PMENU MenuObject, UINT uIDCheckItem, UINT uCheck)
Definition: menu.c:1259

Referenced by CheckMenuItem().

◆ NtUserCheckWindowThreadDesktop()

BOOL NTAPI NtUserCheckWindowThreadDesktop ( HWND  hwnd,
DWORD  dwThreadId,
ULONG  ReturnValue 
)

◆ NtUserChildWindowFromPointEx()

HWND NTAPI NtUserChildWindowFromPointEx ( HWND  Parent,
LONG  x,
LONG  y,
UINT  Flags 
)

Definition at line 3252 of file winpos.c.

3256{
3257 PWND pwndParent;
3258 TRACE("Enter NtUserChildWindowFromPointEx\n");
3260 if ((pwndParent = UserGetWindowObject(hwndParent)))
3261 {
3262 pwndParent = IntChildWindowFromPointEx(pwndParent, x, y, uiFlags);
3263 }
3264 UserLeave();
3265 TRACE("Leave NtUserChildWindowFromPointEx\n");
3266 return pwndParent ? UserHMGetHandle(pwndParent) : NULL;
3267}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
PWND APIENTRY IntChildWindowFromPointEx(PWND Parent, LONG x, LONG y, UINT uiFlags)
Definition: winpos.c:3038

Referenced by ChildWindowFromPoint(), and ChildWindowFromPointEx().

◆ NtUserClipCursor()

BOOL NTAPI NtUserClipCursor ( RECT lpRect)

Referenced by ClipCursor().

◆ NtUserCloseClipboard()

BOOL NTAPI NtUserCloseClipboard ( VOID  )

Definition at line 589 of file clipboard.c.

590{
591 BOOL bRet;
592
594 bRet = UserCloseClipboard();
595 UserLeave();
596
597 return bRet;
598}
BOOL NTAPI UserCloseClipboard(VOID)
Definition: clipboard.c:545

Referenced by CloseClipboard().

◆ NtUserCloseDesktop()

BOOL NTAPI NtUserCloseDesktop ( HDESK  hDesktop)

Definition at line 2758 of file desktop.c.

2759{
2760 PDESKTOP pdesk;
2762 BOOL Ret = FALSE;
2763
2764 TRACE("NtUserCloseDesktop(0x%p) called\n", hDesktop);
2766
2767 if (hDesktop == gptiCurrent->hdesk || hDesktop == gptiCurrent->ppi->hdeskStartup)
2768 {
2769 ERR("Attempted to close thread desktop\n");
2771 goto Exit; // Return FALSE
2772 }
2773
2774 Status = IntValidateDesktopHandle(hDesktop, UserMode, 0, &pdesk);
2775 if (!NT_SUCCESS(Status))
2776 {
2777 ERR("Validation of desktop handle 0x%p failed\n", hDesktop);
2778 goto Exit; // Return FALSE
2779 }
2780
2781 ObDereferenceObject(pdesk);
2782
2783 Status = ObCloseHandle(hDesktop, UserMode);
2784 if (!NT_SUCCESS(Status))
2785 {
2786 ERR("Failed to close desktop handle 0x%p\n", hDesktop);
2788 goto Exit; // Return FALSE
2789 }
2790
2791 Ret = TRUE;
2792
2793Exit:
2794 TRACE("Leave NtUserCloseDesktop, ret=%i\n", Ret);
2795 UserLeave();
2796 return Ret;
2797}
#define ERROR_BUSY
Definition: dderror.h:12
NTSTATUS NTAPI ObCloseHandle(IN HANDLE Handle, IN KPROCESSOR_MODE AccessMode)
Definition: obhandle.c:3379
HDESK hdeskStartup
Definition: win32.h:264
PPROCESSINFO ppi
Definition: win32.h:88
HDESK hdesk
Definition: win32.h:108

Referenced by CloseDesktop().

◆ NtUserCloseWindowStation()

BOOL NTAPI NtUserCloseWindowStation ( HWINSTA  hWinSta)

Definition at line 1019 of file winsta.c.

1021{
1024
1025 TRACE("NtUserCloseWindowStation called (%p)\n", hWinSta);
1026
1027 if (hWinSta == UserGetProcessWindowStation())
1028 {
1029 ERR("Attempted to close process window station\n");
1030 return FALSE;
1031 }
1032
1034 UserMode,
1035 0,
1036 &Object,
1037 NULL);
1038 if (!NT_SUCCESS(Status))
1039 {
1040 ERR("Validation of window station handle (%p) failed\n", hWinSta);
1041 return FALSE;
1042 }
1043
1045
1046 TRACE("Closing window station handle (%p)\n", hWinSta);
1047
1048 Status = ObCloseHandle(hWinSta, UserMode);
1049 if (!NT_SUCCESS(Status))
1050 {
1052 return FALSE;
1053 }
1054
1055 return TRUE;
1056}
HWINSTA FASTCALL UserGetProcessWindowStation(VOID)
Definition: winsta.c:1353
NTSTATUS FASTCALL IntValidateWindowStationHandle(HWINSTA WindowStation, KPROCESSOR_MODE AccessMode, ACCESS_MASK DesiredAccess, PWINSTATION_OBJECT *Object, POBJECT_HANDLE_INFORMATION pObjectHandleInfo)
Definition: winsta.c:232
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object

Referenced by CloseWindowStation().

◆ NtUserConsoleControl()

NTSTATUS APIENTRY NtUserConsoleControl ( IN CONSOLECONTROL  ConsoleCtrl,
IN PVOID  ConsoleCtrlInfo,
IN ULONG  ConsoleCtrlInfoLength 
)

Definition at line 14 of file console.c.

18{
20
21 /* Allow only the Console Server to perform this operation (via CSRSS) */
24
26
27 switch (ConsoleCtrl)
28 {
30 {
31 DESKTOP_CONSOLE_THREAD DesktopConsoleThreadInfo;
33 ULONG_PTR OldThreadId;
34
35 if (ConsoleCtrlInfoLength != sizeof(DesktopConsoleThreadInfo))
36 {
38 break;
39 }
40
42 {
43 ProbeForWrite(ConsoleCtrlInfo, ConsoleCtrlInfoLength, sizeof(USHORT));
44 DesktopConsoleThreadInfo = *(PDESKTOP_CONSOLE_THREAD)ConsoleCtrlInfo;
45 }
47 {
49 _SEH2_YIELD(break);
50 }
52
53 /* Reference the desktop */
54 Status = ObReferenceObjectByHandle(DesktopConsoleThreadInfo.DesktopHandle,
55 0,
58 (PVOID*)&Desktop,
59 NULL);
60 if (!NT_SUCCESS(Status)) break;
61
62 /* Save the old thread ID, it is always returned to the caller */
63 OldThreadId = Desktop->dwConsoleThreadId;
64
65 /* Set the new console input thread ID for this desktop if required */
66 if (DesktopConsoleThreadInfo.ThreadId != (ULONG_PTR)INVALID_HANDLE_VALUE)
67 {
68 Desktop->dwConsoleThreadId = DesktopConsoleThreadInfo.ThreadId;
69 }
70
71 /* Always return the old thread ID */
72 DesktopConsoleThreadInfo.ThreadId = OldThreadId;
73
74 /* Dereference the desktop */
76
77 /* Return the information back to the caller */
79 {
80 *(PDESKTOP_CONSOLE_THREAD)ConsoleCtrlInfo = DesktopConsoleThreadInfo;
81 }
83 {
85 }
87
88 break;
89 }
90
92 {
93 if (ConsoleCtrlInfoLength != sizeof(ATOM))
94 {
96 break;
97 }
98
100 {
101 ProbeForRead(ConsoleCtrlInfo, ConsoleCtrlInfoLength, sizeof(USHORT));
102 gaGuiConsoleWndClass = *(ATOM*)ConsoleCtrlInfo;
103 }
105 {
107 }
108 _SEH2_END;
109
110 break;
111 }
112
114 {
115 HPALETTE hPalette;
116
117 if (ConsoleCtrlInfoLength != sizeof(hPalette))
118 {
120 break;
121 }
122
124 {
125 ProbeForRead(ConsoleCtrlInfo, ConsoleCtrlInfoLength, sizeof(USHORT));
126 hPalette = *(HPALETTE*)ConsoleCtrlInfo;
127 }
129 {
131 _SEH2_YIELD(break);
132 }
133 _SEH2_END;
134
135 /* Make the palette handle public */
136 GreSetObjectOwnerEx(hPalette,
139 break;
140 }
141
143 {
144 ERR("NtUserConsoleControl - ConsoleAcquireDisplayOwnership is UNIMPLEMENTED\n");
146 break;
147 }
148
149 default:
150 ERR("Calling invalid control %d in NtUserConsoleControl\n", ConsoleCtrl);
152 break;
153 }
154
155 UserLeave();
156
157 return Status;
158}
#define STATUS_NOT_IMPLEMENTED
Definition: d3dkmdt.h:42
WORD ATOM
Definition: dimm.idl:113
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
@ GDIOBJFLAG_IGNOREPID
Definition: gdiobj.h:72
struct _DESKTOP_CONSOLE_THREAD * PDESKTOP_CONSOLE_THREAD
#define GDI_OBJ_HMGR_PUBLIC
Definition: ntgdihdl.h:116
#define STATUS_INVALID_INFO_CLASS
Definition: ntstatus.h:240
ATOM gaGuiConsoleWndClass
Definition: ntuser.c:27
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
Definition: obref.c:494
unsigned short USHORT
Definition: pedump.c:61
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
POBJECT_TYPE ExDesktopObjectType
Definition: win32k.c:22
BOOL NTAPI GreSetObjectOwnerEx(HGDIOBJ hobj, ULONG ulOwner, ULONG Flags)
Definition: gdiobj.c:1228

Referenced by CON_API(), GuiConsoleInputThread(), GuiInit(), and RegisterConWndClass().

◆ NtUserConvertMemHandle()

HANDLE NTAPI NtUserConvertMemHandle ( PVOID  pData,
DWORD  cbData 
)

Definition at line 1187 of file clipboard.c.

1190{
1191 HANDLE hMem = NULL;
1192 PCLIPBOARDDATA pMemObj;
1193
1195
1196 /* Create Clipboard data object */
1197 pMemObj = UserCreateObject(gHandleTable, NULL, NULL, &hMem, TYPE_CLIPDATA, sizeof(CLIPBOARDDATA) + cbData);
1198 if (!pMemObj)
1199 goto cleanup;
1200
1201 pMemObj->cbData = cbData;
1202
1203 /* Copy data */
1204 _SEH2_TRY
1205 {
1206 ProbeForRead(pData, cbData, 1);
1207 memcpy(pMemObj->Data, pData, cbData);
1208 }
1210 {
1211 pMemObj = NULL;
1212 }
1213 _SEH2_END;
1214
1215 /* Release the extra reference (UserCreateObject added 2 references) */
1216 UserDereferenceObject(pMemObj);
1217
1218 /* If we failed to copy data, remove handle */
1219 if (!pMemObj)
1220 {
1222 hMem = NULL;
1223 }
1224
1225cleanup:
1226 UserLeave();
1227
1228 return hMem;
1229}
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
BYTE Data[0]
Definition: ntuser.h:259
DWORD cbData
Definition: ntuser.h:258
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
BOOL FASTCALL UserDereferenceObject(PVOID Object)
Definition: object.c:644

Referenced by GetClipboardData(), and SetClipboardData().

◆ NtUserCopyAcceleratorTable()

ULONG NTAPI NtUserCopyAcceleratorTable ( HACCEL  Table,
LPACCEL  Entries,
ULONG  EntriesCount 
)

Definition at line 171 of file accelerator.c.

175{
176 PACCELERATOR_TABLE Accel;
177 ULONG Ret = 0;
178
179 TRACE("Enter NtUserCopyAcceleratorTable\n");
181
182 Accel = UserGetAccelObject(hAccel);
183 if (!Accel)
184 {
185 goto Exit; // Return 0
186 }
187
188 /* If Entries is NULL return table size */
189 if (!Entries)
190 {
191 Ret = Accel->Count;
192 goto Exit;
193 }
194
195 /* Don't overrun */
196 if (Accel->Count < EntriesCount)
197 EntriesCount = Accel->Count;
198
200 {
201 ProbeForWrite(Entries, EntriesCount*sizeof(Entries[0]), 4);
202
203 for (Ret = 0; Ret < EntriesCount; Ret++)
204 {
205 Entries[Ret].fVirt = Accel->Table[Ret].fVirt;
206 Entries[Ret].key = Accel->Table[Ret].key;
207 Entries[Ret].cmd = Accel->Table[Ret].cmd;
208 }
209 }
211 {
213 Ret = 0;
214 }
215 _SEH2_END;
216
217Exit:
218 TRACE("Leave NtUserCopyAcceleratorTable, ret=%lu\n", Ret);
219 UserLeave();
220 return Ret;
221}
HACCEL hAccel
Definition: main.c:47
static const ENTRY Entries[]
WORD cmd
Definition: winuser.h:2928
BYTE fVirt
Definition: winuser.h:2926
WORD key
Definition: winuser.h:2927
PACCELERATOR_TABLE FASTCALL UserGetAccelObject(HACCEL hAccel)
Definition: accelerator.c:21

Referenced by CopyAcceleratorTableW().

◆ NtUserCountClipboardFormats()

DWORD NTAPI NtUserCountClipboardFormats ( VOID  )

Definition at line 658 of file clipboard.c.

659{
660 DWORD cFormats = 0;
661 PWINSTATION_OBJECT pWinStaObj;
662
664
665 pWinStaObj = IntGetWinStaForCbAccess();
666 if (!pWinStaObj)
667 goto cleanup;
668
669 cFormats = pWinStaObj->cNumClipFormats;
670
671 ObDereferenceObject(pWinStaObj);
672
673cleanup:
674 UserLeave();
675
676 return cFormats;
677}
DWORD cNumClipFormats
Definition: winsta.h:30

Referenced by CountClipboardFormats(), and START_TEST().

◆ NtUserCreateAcceleratorTable()

HACCEL NTAPI NtUserCreateAcceleratorTable ( LPACCEL  Entries,
ULONG  EntriesCount 
)

Definition at line 225 of file accelerator.c.

228{
229 PACCELERATOR_TABLE Accel;
230 HACCEL hAccel;
231 ULONG Index;
233 HACCEL Ret = NULL;
234 PTHREADINFO pti;
235
236 TRACE("Enter NtUserCreateAcceleratorTable(Entries %p, EntriesCount %u)\n",
237 Entries, EntriesCount);
239
240 if (!Entries || EntriesCount <= 0)
241 {
243 goto Exit; // Return NULL
244 }
245
247
249 pti->rpdesk,
250 pti,
251 (PHANDLE)&hAccel,
253 sizeof(ACCELERATOR_TABLE));
254
255 if (Accel == NULL)
256 {
258 goto Exit; // Return NULL
259 }
260
261 Accel->Count = EntriesCount;
262 Accel->Table = ExAllocatePoolWithTag(PagedPool, EntriesCount * sizeof(ACCEL), USERTAG_ACCEL);
263 if (Accel->Table == NULL)
264 {
268 goto Exit; // Return NULL
269 }
270
272 {
273 ProbeForRead(Entries, EntriesCount * sizeof(ACCEL), 4);
274
275 for (Index = 0; Index < EntriesCount; Index++)
276 {
277 Accel->Table[Index].fVirt = Entries[Index].fVirt & FVIRT_MASK;
278 if(Accel->Table[Index].fVirt & FVIRTKEY)
279 {
280 Accel->Table[Index].key = Entries[Index].key;
281 }
282 else
283 {
285 sizeof(WCHAR),
286 NULL,
287 (PCSTR)&Entries[Index].key,
288 sizeof(CHAR));
289 }
290
291 Accel->Table[Index].cmd = Entries[Index].cmd;
292 }
293 }
295 {
297 }
298 _SEH2_END;
299
300 if (!NT_SUCCESS(Status))
301 {
306 goto Exit; // Return NULL
307 }
308
309 /* FIXME: Save HandleTable in a list somewhere so we can clean it up again */
310
311 /* Release the extra reference (UserCreateObject added 2 references) */
313
314 Ret = hAccel;
315
316Exit:
317 TRACE("Leave NtUserCreateAcceleratorTable(Entries %p, EntriesCount %u) = %p\n",
318 Entries, EntriesCount, Ret);
319 UserLeave();
320 return Ret;
321}
#define STATUS_NO_MEMORY
Definition: d3dkmdt.h:51
_Use_decl_annotations_ NTSTATUS NTAPI RtlMultiByteToUnicodeN(_Out_ PWCH UnicodeString, _In_ ULONG UnicodeSize, _Out_opt_ PULONG ResultSize, _In_ PCCH MbString, _In_ ULONG MbSize)
Definition: nlsboot.c:62
const char * PCSTR
Definition: typedefs.h:52
#define FVIRT_MASK
Definition: accelerator.c:17
#define USERTAG_ACCEL
Definition: tags.h:196
#define FVIRTKEY
Definition: winuser.h:24
char CHAR
Definition: xmlstorage.h:175

Referenced by CreateAcceleratorTableW(), and U32LoadAccelerators().

◆ NtUserCreateCaret()

BOOL NTAPI NtUserCreateCaret ( HWND  hWnd,
HBITMAP  hBitmap,
int  nWidth,
int  nHeight 
)

Definition at line 310 of file caret.c.

315{
316 PWND Window;
317 PTHREADINFO pti;
318 PUSER_MESSAGE_QUEUE ThreadQueue;
319 BOOL Ret = FALSE;
320
321 TRACE("Enter NtUserCreateCaret\n");
323
325 {
326 goto Exit; // Return FALSE
327 }
328
329 if(Window->head.pti->pEThread != PsGetCurrentThread())
330 {
332 goto Exit; // Return FALSE
333 }
334
336 ThreadQueue = pti->MessageQueue;
337
338 if (ThreadQueue->CaretInfo.Visible)
339 {
341 co_IntHideCaret(&ThreadQueue->CaretInfo);
342 }
343
344 ThreadQueue->CaretInfo.hWnd = hWnd;
345 if(hBitmap)
346 {
347 ThreadQueue->CaretInfo.Bitmap = hBitmap;
348 ThreadQueue->CaretInfo.Size.cx = ThreadQueue->CaretInfo.Size.cy = 0;
349 }
350 else
351 {
352 if (nWidth == 0)
353 {
355 }
356 if (nHeight == 0)
357 {
359 }
360 ThreadQueue->CaretInfo.Bitmap = (HBITMAP)0;
361 ThreadQueue->CaretInfo.Size.cx = nWidth;
362 ThreadQueue->CaretInfo.Size.cy = nHeight;
363 }
364 ThreadQueue->CaretInfo.Visible = 0;
365 ThreadQueue->CaretInfo.Showing = 0;
366
368
369 IntNotifyWinEvent(EVENT_OBJECT_CREATE, Window, OBJID_CARET, CHILDID_SELF, 0);
370
371 Ret = TRUE;
372
373Exit:
374 TRACE("Leave NtUserCreateCaret, ret=%i\n", Ret);
375 UserLeave();
376 return Ret;
377}
static HBITMAP hBitmap
Definition: timezone.c:26
#define ERROR_ACCESS_DENIED
Definition: compat.h:97
static HBITMAP
Definition: button.c:44
LONG cx
Definition: kdterminal.h:27
LONG cy
Definition: kdterminal.h:28
HBITMAP Bitmap
Definition: ntusrtyp.h:130
THRDCARETINFO CaretInfo
Definition: msgqueue.h:92
#define IDCARETTIMER
Definition: undocuser.h:80
VOID CALLBACK CaretSystemTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
Definition: caret.c:97
static BOOL FASTCALL co_IntHideCaret(PTHRDCARETINFO CaretInfo)
Definition: caret.c:143
LONG NTAPI UserGetSystemMetrics(ULONG Index)
Definition: metric.c:214
UINT_PTR FASTCALL IntSetTimer(PWND Window, UINT_PTR IDEvent, UINT Elapse, TIMERPROC TimerFunc, INT Type)
Definition: timer.c:182
#define TMRF_SYSTEM
Definition: timer.h:20
#define OBJID_CARET
Definition: winable.h:23
#define CHILDID_SELF
Definition: winable.h:14
#define SM_CYBORDER
Definition: winuser.h:968
#define SM_CXBORDER
Definition: winuser.h:967

Referenced by CreateCaret().

◆ NtUserCreateDesktop()

HDESK NTAPI NtUserCreateDesktop ( POBJECT_ATTRIBUTES  poa,
PUNICODE_STRING  lpszDesktopDevice,
LPDEVMODEW  lpdmw,
DWORD  dwFlags,
ACCESS_MASK  dwDesiredAccess 
)

Definition at line 2565 of file desktop.c.

2571{
2573 HDESK hDesk;
2574 HDESK Ret = NULL;
2575
2576 TRACE("Enter NtUserCreateDesktop\n");
2578
2579 Status = IntCreateDesktop(&hDesk,
2581 UserMode,
2582 lpszDesktopDevice,
2583 lpdmw,
2584 dwFlags,
2585 dwDesiredAccess);
2586 if (!NT_SUCCESS(Status))
2587 {
2588 ERR("IntCreateDesktop failed, Status 0x%08lx\n", Status);
2589 // SetLastNtError(Status);
2590 goto Exit; // Return NULL
2591 }
2592
2593 Ret = hDesk;
2594
2595Exit:
2596 TRACE("Leave NtUserCreateDesktop, ret=0x%p\n", Ret);
2597 UserLeave();
2598 return Ret;
2599}
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
NTSTATUS FASTCALL IntCreateDesktop(OUT HDESK *phDesktop, IN POBJECT_ATTRIBUTES ObjectAttributes, IN KPROCESSOR_MODE AccessMode, IN PUNICODE_STRING lpszDesktopDevice OPTIONAL, IN LPDEVMODEW lpdmw OPTIONAL, IN DWORD dwFlags, IN ACCESS_MASK dwDesiredAccess)
Definition: desktop.c:2388

Referenced by CreateDesktopW().

◆ NtUserCreateInputContext()

HIMC NTAPI NtUserCreateInputContext ( ULONG_PTR  dwClientImcData)

Definition at line 1606 of file ime.c.

1607{
1608 PIMC pIMC;
1609 HIMC ret = NULL;
1610
1612
1613 if (!IS_IMM_MODE())
1614 {
1615 ERR("!IS_IMM_MODE()\n");
1617 goto Quit;
1618 }
1619
1620 if (!dwClientImcData)
1621 {
1623 goto Quit;
1624 }
1625
1626 pIMC = UserCreateInputContext(dwClientImcData);
1627 if (pIMC)
1628 ret = UserHMGetHandle(pIMC);
1629
1630Quit:
1631 UserLeave();
1632 return ret;
1633}
PIMC FASTCALL UserCreateInputContext(ULONG_PTR dwClientImcData)
Definition: ime.c:1558

Referenced by ImmCreateContext().

◆ NtUserCreateLocalMemHandle()

NTSTATUS NTAPI NtUserCreateLocalMemHandle ( HANDLE  hMem,
PVOID  pData,
DWORD  cbData,
DWORD pcbData 
)

Definition at line 1232 of file clipboard.c.

1237{
1238 PCLIPBOARDDATA pMemObj;
1240
1242
1243 /* Get Clipboard data object */
1245 if (!pMemObj)
1246 {
1248 goto cleanup;
1249 }
1250
1251 /* Don't overrun */
1252 if (cbData > pMemObj->cbData)
1253 cbData = pMemObj->cbData;
1254
1255 /* Copy data to usermode */
1256 _SEH2_TRY
1257 {
1258 if (pcbData)
1259 {
1260 ProbeForWrite(pcbData, sizeof(*pcbData), 1);
1261 *pcbData = pMemObj->cbData;
1262 }
1263
1264 ProbeForWrite(pData, cbData, 1);
1265 memcpy(pData, pMemObj->Data, cbData);
1266 }
1268 {
1270 }
1271 _SEH2_END;
1272
1273cleanup:
1274 UserLeave();
1275
1276 return Status;
1277}
struct tagCLIPBOARDDATA * PCLIPBOARDDATA
PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type)
Definition: object.c:495
_In_ DWORD _Out_writes_bytes_to_opt_ pcbData void _Inout_ DWORD * pcbData
Definition: wincrypt.h:4950

Referenced by GetClipboardData().

◆ NtUserCreateWindowEx()

HWND NTAPI NtUserCreateWindowEx ( DWORD  dwExStyle,
PLARGE_STRING  plstrClassName,
PLARGE_STRING  plstrClsVersion,
PLARGE_STRING  plstrWindowName,
DWORD  dwStyle,
int  x,
int  y,
int  nWidth,
int  nHeight,
HWND  hWndParent,
HMENU  hMenu,
HINSTANCE  hInstance,
LPVOID  lpParam,
DWORD  dwFlags,
PVOID  acbiBuffer 
)
Todo:
Allow passing plstrClassName as ANSI.

Definition at line 2669 of file window.c.

2685{
2687 LARGE_STRING lstrWindowName;
2688 LARGE_STRING lstrClassName;
2689 LARGE_STRING lstrClsVersion;
2690 UNICODE_STRING ustrClassName;
2691 UNICODE_STRING ustrClsVersion;
2692 CREATESTRUCTW Cs;
2693 HWND hwnd = NULL;
2694 PWND pwnd;
2695
2696 lstrWindowName.Buffer = NULL;
2697 lstrClassName.Buffer = NULL;
2698 lstrClsVersion.Buffer = NULL;
2699
2700 if ( (dwStyle & (WS_POPUP|WS_CHILD)) != WS_CHILD)
2701 {
2702 /* check hMenu is valid handle */
2703 if (hMenu && !UserGetMenuObject(hMenu))
2704 {
2705 ERR("NtUserCreateWindowEx: Got an invalid menu handle!\n");
2707 return NULL;
2708 }
2709 }
2710
2711 /* Copy the window name to kernel mode */
2712 Status = ProbeAndCaptureLargeString(&lstrWindowName, plstrWindowName);
2713 if (!NT_SUCCESS(Status))
2714 {
2715 ERR("NtUserCreateWindowEx: failed to capture plstrWindowName\n");
2717 return NULL;
2718 }
2719
2720 plstrWindowName = &lstrWindowName;
2721
2722 /* Check if the class is an atom */
2723 if (IS_ATOM(plstrClassName))
2724 {
2725 /* It is, pass the atom in the UNICODE_STRING */
2726 ustrClassName.Buffer = (PVOID)plstrClassName;
2727 ustrClassName.Length = 0;
2728 ustrClassName.MaximumLength = 0;
2729 }
2730 else
2731 {
2732 /* It's not, capture the class name */
2733 Status = ProbeAndCaptureLargeString(&lstrClassName, plstrClassName);
2734 if (!NT_SUCCESS(Status))
2735 {
2736 ERR("NtUserCreateWindowEx: failed to capture plstrClassName\n");
2737 /* Set last error, cleanup and return */
2739 goto cleanup;
2740 }
2741
2742 /* We pass it on as a UNICODE_STRING */
2743 ustrClassName.Buffer = lstrClassName.Buffer;
2744 ustrClassName.Length = (USHORT)min(lstrClassName.Length, MAXUSHORT); // FIXME: LARGE_STRING truncated
2745 ustrClassName.MaximumLength = (USHORT)min(lstrClassName.MaximumLength, MAXUSHORT);
2746 }
2747
2748 /* Check if the class version is an atom */
2749 if (IS_ATOM(plstrClsVersion))
2750 {
2751 /* It is, pass the atom in the UNICODE_STRING */
2752 ustrClsVersion.Buffer = (PVOID)plstrClsVersion;
2753 ustrClsVersion.Length = 0;
2754 ustrClsVersion.MaximumLength = 0;
2755 }
2756 else
2757 {
2758 /* It's not, capture the class name */
2759 Status = ProbeAndCaptureLargeString(&lstrClsVersion, plstrClsVersion);
2760 if (!NT_SUCCESS(Status))
2761 {
2762 ERR("NtUserCreateWindowEx: failed to capture plstrClsVersion\n");
2763 /* Set last error, cleanup and return */
2765 goto cleanup;
2766 }
2767
2768 /* We pass it on as a UNICODE_STRING */
2769 ustrClsVersion.Buffer = lstrClsVersion.Buffer;
2770 ustrClsVersion.Length = (USHORT)min(lstrClsVersion.Length, MAXUSHORT); // FIXME: LARGE_STRING truncated
2771 ustrClsVersion.MaximumLength = (USHORT)min(lstrClsVersion.MaximumLength, MAXUSHORT);
2772 }
2773
2774 /* Fill the CREATESTRUCTW */
2775 /* we will keep here the original parameters */
2776 Cs.style = dwStyle;
2777 Cs.lpCreateParams = lpParam;
2778 Cs.hInstance = hInstance;
2779 Cs.hMenu = hMenu;
2781 Cs.cx = nWidth;
2782 Cs.cy = nHeight;
2783 Cs.x = x;
2784 Cs.y = y;
2785 Cs.lpszName = (LPCWSTR) plstrWindowName->Buffer;
2786 Cs.lpszClass = ustrClassName.Buffer;
2787 Cs.dwExStyle = dwExStyle;
2788
2790
2791 /* Call the internal function */
2792 pwnd = co_UserCreateWindowEx(&Cs, &ustrClsVersion, plstrWindowName, acbiBuffer, dwFlags);
2793
2794 if(!pwnd)
2795 {
2796 ERR("co_UserCreateWindowEx failed!\n");
2797 }
2798 hwnd = pwnd ? UserHMGetHandle(pwnd) : NULL;
2799
2800 UserLeave();
2801
2802cleanup:
2803 if (lstrWindowName.Buffer)
2804 {
2805 ExFreePoolWithTag(lstrWindowName.Buffer, TAG_STRING);
2806 }
2807 if (lstrClassName.Buffer)
2808 {
2809 ExFreePoolWithTag(lstrClassName.Buffer, TAG_STRING);
2810 }
2811 if (lstrClsVersion.Buffer)
2812 {
2813 ExFreePoolWithTag(lstrClsVersion.Buffer, TAG_STRING);
2814 }
2815
2816 return hwnd;
2817}
HINSTANCE hInstance
Definition: charmap.c:19
#define IS_ATOM(x)
Definition: class.h:3
#define TAG_STRING
Definition: oslist.h:22
ULONG Length
Definition: ntuser.h:91
ULONG MaximumLength
Definition: ntuser.h:92
PVOID Buffer
Definition: ntuser.h:94
USHORT MaximumLength
Definition: env_spec_w32.h:370
LPCWSTR lpszClass
Definition: winuser.h:2968
LPCWSTR lpszName
Definition: winuser.h:2967
LPVOID lpCreateParams
Definition: winuser.h:2958
HINSTANCE hInstance
Definition: winuser.h:2959
#define MAXUSHORT
Definition: typedefs.h:83
PWND FASTCALL co_UserCreateWindowEx(CREATESTRUCTW *Cs, PUNICODE_STRING ClassName, PLARGE_STRING WindowName, PVOID acbiBuffer, DWORD dwVer)
Definition: window.c:2176
NTSTATUS NTAPI ProbeAndCaptureLargeString(OUT PLARGE_STRING plstrSafe, IN PLARGE_STRING plstrUnsafe)
Definition: window.c:2612
#define ERROR_INVALID_MENU_HANDLE
Definition: winerror.h:882
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by CreateWnd(), User32CreateWindowEx(), and WIN_CreateWindowEx().

◆ NtUserCreateWindowStation()

HWINSTA NTAPI NtUserCreateWindowStation ( POBJECT_ATTRIBUTES  ObjectAttributes,
ACCESS_MASK  dwDesiredAccess,
DWORD  Unknown2,
DWORD  Unknown3,
DWORD  Unknown4,
DWORD  Unknown5,
DWORD  Unknown6 
)

◆ NtUserCtxDisplayIOCtl()

DWORD NTAPI NtUserCtxDisplayIOCtl ( DWORD  dwUnknown1,
DWORD  dwUnknown2,
DWORD  dwUnknown3 
)

Definition at line 899 of file ntstubs.c.

903{
904 STUB;
905 return 0;
906}

◆ NtUserDbgWin32HeapFail()

DWORD APIENTRY NtUserDbgWin32HeapFail ( DWORD  Unknown0,
DWORD  Unknown1 
)

Definition at line 266 of file ntstubs.c.

269{
270 STUB
271
272 return 0;
273}

◆ NtUserDbgWin32HeapStat()

DWORD APIENTRY NtUserDbgWin32HeapStat ( DWORD  Unknown0,
DWORD  Unknown1 
)

Definition at line 277 of file ntstubs.c.

280{
281 STUB
282
283 return 0;
284}

◆ NtUserDdeGetQualityOfService()

BOOL NTAPI NtUserDdeGetQualityOfService ( IN HWND  hwndClient,
IN HWND  hWndServer,
OUT PSECURITY_QUALITY_OF_SERVICE  pqosPrev 
)

Definition at line 430 of file dde.c.

434{
435 STUB
436
437 return 0;
438}

◆ NtUserDdeInitialize()

DWORD NTAPI NtUserDdeInitialize ( DWORD  Unknown0,
DWORD  Unknown1,
DWORD  Unknown2,
DWORD  Unknown3,
DWORD  Unknown4 
)

Definition at line 465 of file dde.c.

471{
472 STUB
473
474 return 0;
475}

◆ NtUserDdeSetQualityOfService()

BOOL NTAPI NtUserDdeSetQualityOfService ( IN HWND  hwndClient,
IN PSECURITY_QUALITY_OF_SERVICE  pqosNew,
OUT PSECURITY_QUALITY_OF_SERVICE  pqosPrev 
)

Definition at line 442 of file dde.c.

446{
447 STUB
448
449 return 0;
450}

◆ NtUserDeferWindowPos()

HDWP NTAPI NtUserDeferWindowPos ( HDWP  WinPosInfo,
HWND  Wnd,
HWND  WndInsertAfter,
int  x,
int  y,
int  cx,
int  cy,
UINT  Flags 
)

Definition at line 3289 of file winpos.c.

3297{
3298 PWND pWnd, pWndIA;
3299 HDWP Ret = NULL;
3303
3304 TRACE("Enter NtUserDeferWindowPos\n");
3306
3307 if ( Flags & Tmp )
3308 {
3310 goto Exit;
3311 }
3312
3313 pWnd = UserGetWindowObject(Wnd);
3314 if (!pWnd || UserIsDesktopWindow(pWnd) || UserIsMessageWindow(pWnd))
3315 {
3316 goto Exit;
3317 }
3318
3319 if ( WndInsertAfter &&
3320 WndInsertAfter != HWND_BOTTOM &&
3321 WndInsertAfter != HWND_TOPMOST &&
3322 WndInsertAfter != HWND_NOTOPMOST )
3323 {
3324 pWndIA = UserGetWindowObject(WndInsertAfter);
3325 if (!pWndIA || UserIsDesktopWindow(pWndIA) || UserIsMessageWindow(pWndIA))
3326 {
3327 goto Exit;
3328 }
3329 }
3330
3331 Ret = IntDeferWindowPos(WinPosInfo, Wnd, WndInsertAfter, x, y, cx, cy, Flags);
3332
3333Exit:
3334 TRACE("Leave NtUserDeferWindowPos, ret=%p\n", Ret);
3335 UserLeave();
3336 return Ret;
3337}
HDWP FASTCALL IntDeferWindowPos(HDWP hdwp, HWND hwnd, HWND hwndAfter, INT x, INT y, INT cx, INT cy, UINT flags)
Definition: winpos.c:3091
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
#define UserIsMessageWindow(pWnd)
Definition: desktop.h:197
#define UserIsDesktopWindow(pWnd)
Definition: desktop.h:194
#define ERROR_INVALID_FLAGS
Definition: winerror.h:583
#define SWP_NOREDRAW
Definition: winuser.h:1249
#define SWP_NOREPOSITION
Definition: winuser.h:1253
#define HWND_TOPMOST
Definition: winuser.h:1211
#define SWP_DEFERERASE
Definition: winuser.h:1255
#define SWP_NOCOPYBITS
Definition: winuser.h:1246
#define SWP_SHOWWINDOW
Definition: winuser.h:1251
#define SWP_HIDEWINDOW
Definition: winuser.h:1244
#define SWP_NOSENDCHANGING
Definition: winuser.h:1254
#define HWND_NOTOPMOST
Definition: winuser.h:1209

Referenced by DeferWindowPos().

◆ NtUserDefSetText()

BOOL NTAPI NtUserDefSetText ( HWND  WindowHandle,
PLARGE_STRING  WindowText 
)

Definition at line 4458 of file window.c.

4459{
4460 PWND Wnd;
4461 LARGE_STRING SafeText;
4463 BOOL Ret = TRUE;
4464
4465 TRACE("Enter NtUserDefSetText\n");
4466
4467 if (WindowText != NULL)
4468 {
4469 _SEH2_TRY
4470 {
4471 SafeText = ProbeForReadLargeString(WindowText);
4472 }
4474 {
4475 Ret = FALSE;
4477 }
4478 _SEH2_END;
4479
4480 if (!Ret)
4481 return FALSE;
4482 }
4483 else
4484 return TRUE;
4485
4487
4488 if(!(Wnd = UserGetWindowObject(hWnd)))
4489 {
4490 UserLeave();
4491 return FALSE;
4492 }
4493
4494 // ReactOS uses Unicode and not mixed. Up/Down converting will take time.
4495 // Brought to you by: The Wine Project! Dysfunctional Thought Processes!
4496 // Now we know what the bAnsi is for.
4498 if (SafeText.Buffer)
4499 {
4500 _SEH2_TRY
4501 {
4502 if (SafeText.bAnsi)
4503 ProbeForRead(SafeText.Buffer, SafeText.Length, sizeof(CHAR));
4504 else
4505 ProbeForRead(SafeText.Buffer, SafeText.Length, sizeof(WCHAR));
4507 }
4509 {
4510 Ret = FALSE;
4512 }
4513 _SEH2_END;
4514 if (!Ret) goto Exit;
4515 }
4516
4517 if (UnicodeString.Length != 0)
4518 {
4519 if (Wnd->strName.MaximumLength > 0 &&
4520 UnicodeString.Length <= Wnd->strName.MaximumLength - sizeof(UNICODE_NULL))
4521 {
4522 ASSERT(Wnd->strName.Buffer != NULL);
4523
4524 Wnd->strName.Length = UnicodeString.Length;
4525 Wnd->strName.Buffer[UnicodeString.Length / sizeof(WCHAR)] = L'\0';
4527 UnicodeString.Buffer,
4528 UnicodeString.Length);
4529 }
4530 else
4531 {
4532 PWCHAR buf;
4533 Wnd->strName.MaximumLength = Wnd->strName.Length = 0;
4534 buf = Wnd->strName.Buffer;
4535 Wnd->strName.Buffer = NULL;
4536 if (buf != NULL)
4537 {
4539 }
4540
4542 UnicodeString.Length + sizeof(UNICODE_NULL));
4543 if (Wnd->strName.Buffer != NULL)
4544 {
4545 Wnd->strName.Buffer[UnicodeString.Length / sizeof(WCHAR)] = L'\0';
4547 UnicodeString.Buffer,
4548 UnicodeString.Length);
4549 Wnd->strName.MaximumLength = UnicodeString.Length + sizeof(UNICODE_NULL);
4550 Wnd->strName.Length = UnicodeString.Length;
4551 }
4552 else
4553 {
4555 Ret = FALSE;
4556 goto Exit;
4557 }
4558 }
4559 }
4560 else
4561 {
4562 Wnd->strName.Length = 0;
4563 if (Wnd->strName.Buffer != NULL)
4564 Wnd->strName.Buffer[0] = L'\0';
4565 }
4566
4567 // FIXME: HAX! Windows does not do this in here!
4568 // In User32, these are called after: NotifyWinEvent EVENT_OBJECT_NAMECHANGE than
4569 // RepaintButton, StaticRepaint, NtUserCallHwndLock HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK, etc.
4570 /* Send shell notifications */
4571 if (!Wnd->spwndOwner && !IntGetParent(Wnd))
4572 {
4573 co_IntShellHookNotify(HSHELL_REDRAW, (WPARAM) hWnd, FALSE); // FIXME Flashing?
4574 }
4575
4576 Ret = TRUE;
4577Exit:
4579 TRACE("Leave NtUserDefSetText, ret=%i\n", Ret);
4580 UserLeave();
4581 return Ret;
4582}
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
BOOL NTAPI RtlLargeStringToUnicodeString(PUNICODE_STRING, PLARGE_STRING)
Definition: rtlstr.c:67
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define UNICODE_NULL
#define L(x)
Definition: ntvdm.h:50
ULONG bAnsi
Definition: ntuser.h:93
struct _DESKTOP * rpdesk
Definition: ntuser.h:194
struct _WND * spwndOwner
Definition: ntuser.h:715
LARGE_UNICODE_STRING strName
Definition: ntuser.h:736
uint16_t * PWCHAR
Definition: typedefs.h:56
static __inline PVOID DesktopHeapAlloc(IN PDESKTOP Desktop, IN SIZE_T Bytes)
Definition: desktop.h:204
static __inline BOOL DesktopHeapFree(IN PDESKTOP Desktop, IN PVOID lpMem)
Definition: desktop.h:215

Referenced by DefSetText().

◆ NtUserDeleteMenu()

BOOL NTAPI NtUserDeleteMenu ( HMENU  hMenu,
UINT  uPosition,
UINT  uFlags 
)

Definition at line 5626 of file menu.c.

5630{
5631 PMENU Menu;
5632 BOOL Ret = FALSE;
5633
5634 TRACE("Enter NtUserDeleteMenu\n");
5636
5637 Menu = UserGetMenuObject(hMenu);
5638 if (Menu)
5639 {
5640 Ret = IntRemoveMenuItem(Menu, uPosition, uFlags, TRUE);
5641 }
5642
5643 TRACE("Leave NtUserDeleteMenu, ret=%i\n", Ret);
5644 UserLeave();
5645 return Ret;
5646}
UINT uFlags
Definition: api.c:59
BOOL FASTCALL IntRemoveMenuItem(PMENU pMenu, UINT nPos, UINT wFlags, BOOL bRecurse)
Definition: menu.c:596

Referenced by DeleteMenu().

◆ NtUserDestroyAcceleratorTable()

BOOLEAN NTAPI NtUserDestroyAcceleratorTable ( HACCEL  Table)

Definition at line 340 of file accelerator.c.

342{
343 PACCELERATOR_TABLE Accel;
344 BOOLEAN Ret = FALSE;
345
346 /* FIXME: If the handle table is from a call to LoadAcceleratorTable, decrement it's
347 usage count (and return TRUE).
348 FIXME: Destroy only tables created using CreateAcceleratorTable.
349 */
350
351 TRACE("NtUserDestroyAcceleratorTable(Table %p)\n", hAccel);
353
354 Accel = UserGetAccelObject(hAccel);
355 if (Accel)
356 {
357 Ret = UserDestroyAccelTable(Accel);
358 }
359
360 TRACE("Leave NtUserDestroyAcceleratorTable(Table %p) = %u\n", hAccel, Ret);
361 UserLeave();
362 return Ret;
363}
BOOLEAN UserDestroyAccelTable(PVOID Object)
Definition: accelerator.c:324

Referenced by DestroyAcceleratorTable().

◆ NtUserDestroyCursor()

BOOL NTAPI NtUserDestroyCursor ( _In_ HANDLE  Handle,
_In_ BOOL  bForce 
)

Definition at line 793 of file cursoricon.c.

796{
797 BOOL ret;
798 PCURICON_OBJECT CurIcon = NULL;
799
800 TRACE("Enter NtUserDestroyCursorIcon (%p, %i)\n", hCurIcon, bForce);
802
803 CurIcon = UserGetCurIconObject(hCurIcon);
804 if (!CurIcon)
805 {
806 ret = FALSE;
807 goto leave;
808 }
809
810 if (!bForce)
811 {
812 /* Can not destroy global objects */
813 if (CurIcon->head.ppi == NULL)
814 {
815 ERR("Trying to delete global cursor!\n");
816 ret = TRUE;
817 goto leave;
818 }
819
820 /* Maybe we have good reasons not to destroy this object */
821 if (CurIcon->head.ppi != PsGetCurrentProcessWin32Process())
822 {
823 /* No way, you're not touching my cursor */
824 ret = FALSE;
825 goto leave;
826 }
827
828 if (CurIcon->CURSORF_flags & CURSORF_CURRENT)
829 {
830 WARN("Trying to delete current cursor!\n");
831 ret = FALSE;
832 goto leave;
833 }
834
835 if (CurIcon->CURSORF_flags & CURSORF_LRSHARED)
836 {
837 WARN("Trying to delete shared cursor.\n");
838 /* This one is not an error */
839 ret = TRUE;
840 goto leave;
841 }
842 }
843
844 /* Destroy the handle */
845 ret = IntDestroyCurIconObject(CurIcon);
846
847leave:
848 if (CurIcon)
849 UserDereferenceObject(CurIcon);
850 TRACE("Leave NtUserDestroyCursorIcon, ret=%i\n", ret);
851 UserLeave();
852 return ret;
853}
#define WARN(fmt,...)
Definition: precomp.h:61
#define leave
Definition: btrfs_drv.h:138
#define CURSORF_LRSHARED
Definition: ntuser.h:1201
#define CURSORF_CURRENT
Definition: ntuser.h:1207
PROCMARKHEAD head
Definition: cursoricon.h:11
ULONG CURSORF_flags
Definition: cursoricon.h:16
struct _PROCESSINFO * ppi
Definition: ntuser.h:227
PCURICON_OBJECT FASTCALL UserGetCurIconObject(HCURSOR hCurIcon)
Definition: cursoricon.c:200
BOOLEAN IntDestroyCurIconObject(_In_ PVOID Object)
Definition: cursoricon.c:317

Referenced by CreateIconFromResourceEx(), CreateIconIndirect(), CURSORICON_CopyImage(), CURSORICON_LoadFromFileW(), CURSORICON_LoadImageW(), DestroyCursor(), DestroyIcon(), START_TEST(), and Test_OneParamRoutine_CreateEmptyCurObject().

◆ NtUserDestroyInputContext()

BOOL NTAPI NtUserDestroyInputContext ( HIMC  hIMC)

Definition at line 1535 of file ime.c.

1536{
1537 BOOL ret = FALSE;
1538 PIMC pIMC;
1539
1541
1542 if (!IS_IMM_MODE())
1543 {
1545 goto Quit;
1546 }
1547
1549 if (pIMC)
1551
1552Quit:
1553 UserLeave();
1554 return ret;
1555}
BOOL IntDestroyInputContext(PIMC pIMC)
Definition: ime.c:1496

Referenced by Imm32DestroyInputContext().

◆ NtUserDestroyMenu()

BOOL NTAPI NtUserDestroyMenu ( HMENU  hMenu)

Definition at line 5834 of file menu.c.

5836{
5837 PMENU Menu;
5838 BOOL Ret = FALSE;
5839
5840 TRACE("Enter NtUserDestroyMenu\n");
5842
5843 if(!(Menu = UserGetMenuObject(hMenu)))
5844 {
5845 goto Exit; // Return FALSE
5846 }
5847 if (Menu->head.rpdesk != gptiCurrent->rpdesk)
5848 {
5850 goto Exit; // Return FALSE
5851 }
5852 Ret = IntDestroyMenuObject(Menu, TRUE);
5853
5854Exit:
5855 TRACE("Leave NtUserDestroyMenu, ret=%i\n", Ret);
5856 UserLeave();
5857 return Ret;
5858}
struct _DESKTOP * rpdesk
Definition: ntuser.h:219
PROCDESKHEAD head
Definition: ntuser.h:417
BOOL FASTCALL IntDestroyMenuObject(PMENU Menu, BOOL bRecurse)
Definition: menu.c:317

Referenced by DestroyMenu(), and WIN_CreateWindowEx().

◆ NtUserDestroyWindow()

BOOLEAN NTAPI NtUserDestroyWindow ( HWND  Wnd)

Definition at line 3040 of file window.c.

3041{
3042 PWND Window;
3043 BOOLEAN ret = FALSE;
3045
3046 TRACE("Enter NtUserDestroyWindow\n");
3048
3050 if (Window)
3051 {
3052 UserRefObjectCo(Window, &Ref); // FIXME: Dunno if win should be reffed during destroy...
3054 UserDerefObjectCo(Window); // FIXME: Dunno if win should be reffed during destroy...
3055 }
3056
3057 TRACE("Leave NtUserDestroyWindow, ret=%u\n", ret);
3058 UserLeave();
3059 return ret;
3060}
BOOLEAN co_UserDestroyWindow(PVOID Object)
Definition: window.c:2856

Referenced by DestroyWindow(), and User32DestroyImeUIWindow().

◆ NtUserDisableThreadIme()

BOOL NTAPI NtUserDisableThreadIme ( DWORD  dwThreadID)

Definition at line 852 of file ime.c.

854{
855 PTHREADINFO pti, ptiCurrent;
856 PPROCESSINFO ppi;
857 BOOL ret = FALSE;
858
860
861 if (!IS_IMM_MODE())
862 {
863 ERR("!IS_IMM_MODE()\n");
865 goto Quit;
866 }
867
868 ptiCurrent = GetW32ThreadInfo();
869
870 if (dwThreadID == INVALID_THREAD_ID)
871 {
872 ppi = ptiCurrent->ppi;
873 ppi->W32PF_flags |= W32PF_DISABLEIME;
874
875Retry:
876 for (pti = ppi->ptiList; pti; pti = pti->ptiSibling)
877 {
879
880 if (pti->spwndDefaultIme)
881 {
883 pti->spwndDefaultIme = NULL;
884 goto Retry; /* The contents of ppi->ptiList may be changed. */
885 }
886 }
887 }
888 else
889 {
890 if (dwThreadID == 0)
891 {
892 pti = ptiCurrent;
893 }
894 else
895 {
896 pti = IntTID2PTI(UlongToHandle(dwThreadID));
897
898 /* The thread needs to reside in the current process. */
899 if (!pti || pti->ppi != ptiCurrent->ppi)
900 goto Quit;
901 }
902
904
905 if (pti->spwndDefaultIme)
906 {
908 pti->spwndDefaultIme = NULL;
909 }
910 }
911
912 ret = TRUE;
913
914Quit:
915 UserLeave();
916 return ret;
917}
_In_ PSCSI_REQUEST_BLOCK _Out_ NTSTATUS _Inout_ BOOLEAN * Retry
Definition: classpnp.h:312
#define TIF_DISABLEIME
Definition: ntuser.h:288
PTHREADINFO ptiList
Definition: win32.h:257
PTHREADINFO ptiSibling
Definition: win32.h:116
FLONG TIF_flags
Definition: win32.h:95
struct _WND * spwndDefaultIme
Definition: win32.h:131
BOOLEAN co_UserDestroyWindow(PVOID Object)
Definition: window.c:2856
#define W32PF_DISABLEIME
Definition: win32.h:28

Referenced by ImmDisableIME().

◆ NtUserDispatchMessage()

LRESULT NTAPI NtUserDispatchMessage ( PMSG  pMsg)

Definition at line 2477 of file message.c.

2478{
2479 LRESULT Res = 0;
2480 MSG SafeMsg;
2481
2482 _SEH2_TRY
2483 {
2484 ProbeForRead(UnsafeMsgInfo, sizeof(MSG), 1);
2485 RtlCopyMemory(&SafeMsg, UnsafeMsgInfo, sizeof(MSG));
2486 }
2488 {
2490 _SEH2_YIELD(return FALSE);
2491 }
2492 _SEH2_END;
2493
2495
2496 Res = IntDispatchMessage(&SafeMsg);
2497
2498 UserLeave();
2499 return Res;
2500}
LRESULT FASTCALL IntDispatchMessage(PMSG pMsg)
Definition: message.c:890

Referenced by DispatchMessageA(), and DispatchMessageW().

◆ NtUserDragDetect()

BOOL NTAPI NtUserDragDetect ( HWND  hWnd,
POINT  pt 
)

Functions

Definition at line 2209 of file message.c.

2212{
2213 MSG msg;
2214 RECT rect;
2215 ULONG wDragWidth, wDragHeight;
2216 BOOL Ret = FALSE;
2217
2218 TRACE("Enter NtUserDragDetect(%p)\n", hWnd);
2220
2221 wDragWidth = UserGetSystemMetrics(SM_CXDRAG);
2222 wDragHeight= UserGetSystemMetrics(SM_CYDRAG);
2223
2224 rect.left = pt.x - wDragWidth;
2225 rect.right = pt.x + wDragWidth;
2226
2227 rect.top = pt.y - wDragHeight;
2228 rect.bottom = pt.y + wDragHeight;
2229
2231
2232 for (;;)
2233 {
2237 {
2238 if ( msg.message == WM_LBUTTONUP )
2239 {
2241 goto Exit; // Return FALSE
2242 }
2243 if ( msg.message == WM_MOUSEMOVE )
2244 {
2245 POINT tmp;
2246 tmp.x = (short)LOWORD(msg.lParam);
2247 tmp.y = (short)HIWORD(msg.lParam);
2248 if( !RECTL_bPointInRect( &rect, tmp.x, tmp.y ) )
2249 {
2251 Ret = TRUE;
2252 goto Exit;
2253 }
2254 }
2255 if ( msg.message == WM_KEYDOWN )
2256 {
2257 if ( msg.wParam == VK_ESCAPE )
2258 {
2260 Ret = TRUE;
2261 goto Exit;
2262 }
2263 }
2264 if ( msg.message == WM_QUEUESYNC )
2265 {
2267 }
2268 }
2269 co_IntWaitMessage(NULL, 0, 0);
2270 }
2271
2272Exit:
2273 TRACE("Leave NtUserDragDetect, ret=%i\n", Ret);
2274 UserLeave();
2275 return Ret;
2276}
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:94
#define pt(x, y)
Definition: drawing.c:79
HWND FASTCALL co_UserSetCapture(HWND hWnd)
Definition: focus.c:1460
#define LOWORD(l)
Definition: pedump.c:82
& rect
Definition: startmenu.cpp:1413
#define HIWORD(l)
Definition: typedefs.h:247
FORCEINLINE BOOL RECTL_bPointInRect(_In_ const RECTL *prcl, _In_ INT x, _In_ INT y)
Definition: rect.h:52
BOOL FASTCALL co_IntWaitMessage(PWND Window, UINT MsgFilterMin, UINT MsgFilterMax)
Definition: message.c:1180
BOOL APIENTRY co_IntGetPeekMessage(PMSG pMsg, HWND hWnd, UINT MsgFilterMin, UINT MsgFilterMax, UINT RemoveMsg, BOOL bGMSG)
Definition: message.c:1226
#define WM_MOUSEFIRST
Definition: winuser.h:1777
#define SM_CXDRAG
Definition: winuser.h:1031
#define WM_MOUSELAST
Definition: winuser.h:1804
#define WM_KEYFIRST
Definition: winuser.h:1717
#define WM_MOUSEMOVE
Definition: winuser.h:1778
#define WH_CBT
Definition: winuser.h:35
#define WM_QUEUESYNC
Definition: winuser.h:1642
#define PM_REMOVE
Definition: winuser.h:1199
#define HCBT_QS
Definition: winuser.h:57
#define WM_LBUTTONUP
Definition: winuser.h:1780
#define WM_KEYDOWN
Definition: winuser.h:1718
#define SM_CYDRAG
Definition: winuser.h:1032
#define WM_KEYLAST
Definition: winuser.h:1731
#define VK_ESCAPE
Definition: winuser.h:2217

Referenced by DragDetect().

◆ NtUserDragObject()

DWORD NTAPI NtUserDragObject ( HWND  hwnd1,
HWND  hwnd2,
UINT  u1,
DWORD  dw1,
HCURSOR  hc1 
)

Definition at line 48 of file ntstubs.c.

55{
56 STUB
57
58 return 0;
59}

Referenced by DragObject().

◆ NtUserDrawAnimatedRects()

BOOL NTAPI NtUserDrawAnimatedRects ( HWND  hwnd,
INT  idAni,
RECT lprcFrom,
RECT lprcTo 
)

Definition at line 63 of file ntstubs.c.

68{
69 STUB
70
71 return 0;
72}

Referenced by DrawAnimatedRects().

◆ NtUserDrawCaption()

BOOL NTAPI NtUserDrawCaption ( HWND  hWnd,
HDC  hDc,
LPCRECT  lpRc,
UINT  uFlags 
)

Definition at line 2457 of file painting.c.

2461{
2462 return NtUserDrawCaptionTemp(hWnd, hDC, lpRc, 0, 0, NULL, uFlags);
2463}
BOOL APIENTRY NtUserDrawCaptionTemp(HWND hWnd, HDC hDC, LPCRECT lpRc, HFONT hFont, HICON hIcon, const PUNICODE_STRING str, UINT uFlags)
Definition: painting.c:2374

Referenced by DrawCaption(), RealUserDrawCaption(), and UserPaintCaption().

◆ NtUserDrawCaptionTemp()

BOOL NTAPI NtUserDrawCaptionTemp ( HWND  hWnd,
HDC  hDC,
LPCRECT  lpRc,
HFONT  hFont,
HICON  hIcon,
const PUNICODE_STRING  str,
UINT  uFlags 
)

Definition at line 2374 of file painting.c.

2382{
2383 PWND pWnd = NULL;
2384 UNICODE_STRING SafeStr = {0};
2386 RECTL SafeRect;
2387 BOOL Ret;
2388
2390
2391 if (hWnd != NULL)
2392 {
2393 if(!(pWnd = UserGetWindowObject(hWnd)))
2394 {
2395 UserLeave();
2396 return FALSE;
2397 }
2398 }
2399
2400 _SEH2_TRY
2401 {
2402 ProbeForRead(lpRc, sizeof(RECTL), sizeof(ULONG));
2403 RtlCopyMemory(&SafeRect, lpRc, sizeof(RECTL));
2404 if (str != NULL)
2405 {
2406 SafeStr = ProbeForReadUnicodeString(str);
2407 if (SafeStr.Length != 0)
2408 {
2409 ProbeForRead( SafeStr.Buffer,
2410 SafeStr.Length,
2411 sizeof(WCHAR));
2412 }
2413 }
2414 }
2416 {
2418 }
2419 _SEH2_END;
2420
2421 if (Status != STATUS_SUCCESS)
2422 {
2424 UserLeave();
2425 return FALSE;
2426 }
2427
2428 if (str != NULL)
2429 Ret = UserDrawCaption(pWnd, hDC, &SafeRect, hFont, hIcon, &SafeStr, uFlags);
2430 else
2431 {
2432 if ( RECTL_bIsEmptyRect(&SafeRect) && hFont == 0 && hIcon == 0 )
2433 {
2434 Ret = TRUE;
2436 {
2437 ERR("NC Caption Mode\n");
2439 goto Exit;
2440 }
2441 else if (uFlags & DC_DRAWFRAMEMD)
2442 {
2443 ERR("NC Paint Mode\n");
2444 NC_DoNCPaint(pWnd, hDC, uFlags); // Update Menus too!
2445 goto Exit;
2446 }
2447 }
2448 Ret = UserDrawCaption(pWnd, hDC, &SafeRect, hFont, hIcon, NULL, uFlags);
2449 }
2450Exit:
2451 UserLeave();
2452 return Ret;
2453}
HFONT hFont
Definition: main.c:53
HICON hIcon
Definition: msconfig.c:44
const WCHAR * str
#define ProbeForReadUnicodeString(Ptr)
Definition: probe.h:77
#define DC_DRAWCAPTIONMD
Definition: undocuser.h:151
#define DC_DRAWFRAMEMD
Definition: undocuser.h:153
BOOL UserDrawCaption(PWND pWnd, HDC hDc, RECTL *lpRc, HFONT hFont, HICON hIcon, const PUNICODE_STRING Str, UINT uFlags)
Definition: painting.c:2192
FORCEINLINE BOOL RECTL_bIsEmptyRect(_In_ const RECTL *prcl)
Definition: rect.h:44
VOID UserDrawCaptionBar(PWND pWnd, HDC hDC, INT Flags)
Definition: nonclient.c:952
LRESULT NC_DoNCPaint(PWND pWnd, HDC hDC, INT Flags)
Definition: nonclient.c:1094

Referenced by DrawCaptionTempW(), and NtUserDrawCaption().

◆ NtUserDrawIconEx()

BOOL NTAPI NtUserDrawIconEx ( HDC  hdc,
int  xLeft,
int  yTop,
HICON  hIcon,
int  cxWidth,
int  cyWidth,
UINT  istepIfAniCur,
HBRUSH  hbrFlickerFreeDraw,
UINT  diFlags,
BOOL  bMetaHDC,
PVOID  pDIXData 
)

Definition at line 2084 of file cursoricon.c.

2096{
2097 PCURICON_OBJECT pIcon;
2098 BOOL Ret;
2099
2100 TRACE("Enter NtUserDrawIconEx\n");
2102
2103 if (!(pIcon = UserGetCurIconObject(hIcon)))
2104 {
2105 ERR("UserGetCurIconObject(0x%p) failed!\n", hIcon);
2106 UserLeave();
2107 return FALSE;
2108 }
2109
2110 Ret = UserDrawIconEx(hdc,
2111 xLeft,
2112 yTop,
2113 pIcon,
2114 cxWidth,
2115 cyHeight,
2116 istepIfAniCur,
2117 hbrFlickerFreeDraw,
2118 diFlags);
2119
2120 UserDereferenceObject(pIcon);
2121
2122 UserLeave();
2123 return Ret;
2124}
BOOL UserDrawIconEx(HDC hDc, INT xLeft, INT yTop, PCURICON_OBJECT pIcon, INT cxWidth, INT cyHeight, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags)
Definition: cursoricon.c:1689

Referenced by DrawIconEx().

◆ NtUserDrawMenuBarTemp()

DWORD NTAPI NtUserDrawMenuBarTemp ( HWND  hWnd,
HDC  hDC,
PRECT  hRect,
HMENU  hMenu,
HFONT  hFont 
)

Definition at line 6240 of file menu.c.

6246{
6247 PMENU Menu;
6248 PWND Window;
6249 RECT Rect;
6251 DWORD Ret = 0;
6252
6253 ERR("Enter NtUserDrawMenuBarTemp\n");
6255
6257 {
6259 goto Exit; // Return 0
6260 }
6261
6262 if(!(Menu = UserGetMenuObject(hMenu)))
6263 {
6265 goto Exit; // Return 0
6266 }
6267
6268 _SEH2_TRY
6269 {
6270 ProbeForRead(pRect, sizeof(RECT), sizeof(ULONG));
6271 RtlCopyMemory(&Rect, pRect, sizeof(RECT));
6272 }
6274 {
6276 }
6277 _SEH2_END;
6278
6279 if (Status != STATUS_SUCCESS)
6280 {
6282 goto Exit; // Return 0
6283 }
6284
6285 Ret = IntDrawMenuBarTemp(Window, hDC, &Rect, Menu, hFont);
6286
6287Exit:
6288 ERR("Leave NtUserDrawMenuBarTemp, ret=%lu\n", Ret);
6289 UserLeave();
6290 return Ret;
6291}
DWORD WINAPI IntDrawMenuBarTemp(PWND pWnd, HDC hDC, LPRECT Rect, PMENU pMenu, HFONT Font)
Definition: menu.c:2685

◆ NtUserEmptyClipboard()

BOOL NTAPI NtUserEmptyClipboard ( VOID  )

Definition at line 722 of file clipboard.c.

723{
724 BOOL bRet;
725
726 TRACE("NtUserEmptyClipboard()\n");
727
729 bRet = UserEmptyClipboard();
730 UserLeave();
731
732 return bRet;
733}
BOOL NTAPI UserEmptyClipboard(VOID)
Definition: clipboard.c:680

Referenced by EmptyClipboard().

◆ NtUserEnableMenuItem()

UINT NTAPI NtUserEnableMenuItem ( HMENU  hMenu,
UINT  uIDEnableItem,
UINT  uEnable 
)

Definition at line 5864 of file menu.c.

5868{
5869 PMENU Menu;
5870 UINT Ret = (UINT)-1;
5871
5872 TRACE("Enter NtUserEnableMenuItem\n");
5874
5875 Menu = UserGetMenuObject(hMenu);
5876 if (Menu)
5877 {
5878 Ret = IntEnableMenuItem(Menu, uIDEnableItem, uEnable);
5879 }
5880
5881 TRACE("Leave NtUserEnableMenuItem, ret=%u\n", Ret);
5882 UserLeave();
5883 return Ret;
5884}
UINT FASTCALL IntEnableMenuItem(PMENU MenuObject, UINT uIDEnableItem, UINT uEnable)
Definition: menu.c:1217

Referenced by EnableMenuItem().

◆ NtUserEnableScrollBar()

BOOL NTAPI NtUserEnableScrollBar ( HWND  hWnd,
UINT  wSBflags,
UINT  wArrows 
)

Definition at line 1242 of file scrollbar.c.

1246{
1247 UINT OrigArrows;
1248 PWND Window = NULL;
1249 PSCROLLBARINFO InfoV = NULL, InfoH = NULL;
1250 BOOL Chg = FALSE;
1251 BOOL Ret = FALSE;
1253
1254 TRACE("Enter NtUserEnableScrollBar\n");
1256
1258 goto Cleanup; // Return FALSE
1259
1260 UserRefObjectCo(Window, &Ref);
1261
1263 goto Cleanup; // Return FALSE
1264
1265 OrigArrows = Window->pSBInfo->WSBflags;
1266 Window->pSBInfo->WSBflags = wArrows;
1267
1268 if (wSBflags == SB_CTL)
1269 {
1270 if ((wArrows == ESB_DISABLE_BOTH || wArrows == ESB_ENABLE_BOTH))
1271 IntEnableWindow(hWnd, (wArrows == ESB_ENABLE_BOTH));
1272
1273 Ret = TRUE;
1274 goto Cleanup;
1275 }
1276
1277 if(wSBflags != SB_BOTH && !SBID_IS_VALID(wSBflags))
1278 {
1280 ERR("Trying to set scrollinfo for unknown scrollbar type %u\n", wSBflags);
1281 goto Cleanup; // Return FALSE
1282 }
1283
1284 switch(wSBflags)
1285 {
1286 case SB_BOTH:
1288 // Fall through
1289 case SB_HORZ:
1291 break;
1292 case SB_VERT:
1294 break;
1295 default:
1296 goto Cleanup; // Return FALSE
1297 }
1298
1299 if(InfoV)
1300 Chg = IntEnableScrollBar(FALSE, InfoV, wArrows);
1301
1302 if(InfoH)
1303 Chg = (IntEnableScrollBar(TRUE, InfoH, wArrows) || Chg);
1304
1305 ERR("FIXME: EnableScrollBar wSBflags %u wArrows %u Chg %d\n", wSBflags, wArrows, Chg);
1306// Done in user32:
1307// SCROLL_RefreshScrollBar(hwnd, nBar, TRUE, TRUE);
1308
1309 Ret = Chg;
1310 goto Cleanup; // FIXME
1311
1312 if (OrigArrows == wArrows)
1313 {
1314 Ret = FALSE;
1315 goto Cleanup;
1316 }
1317
1318 Ret = TRUE;
1319
1320Cleanup:
1321 if (Window)
1323
1324 TRACE("Leave NtUserEnableScrollBar, ret=%i\n", Ret);
1325 UserLeave();
1326 return Ret;
1327}
BOOL FASTCALL co_IntCreateScrollBars(PWND Window)
Definition: scrollbar.c:748
BOOL APIENTRY IntEnableScrollBar(BOOL Horz, PSCROLLBARINFO Info, UINT wArrows)
Definition: scrollbar.c:813
#define SBID_IS_VALID(id)
Definition: scroll.h:40
#define IntGetScrollbarInfoFromWindow(Window, i)
Definition: scroll.h:33
#define SB_VERT
Definition: winuser.h:553
#define ESB_DISABLE_BOTH
Definition: winuser.h:556
#define SB_BOTH
Definition: winuser.h:555
#define SB_CTL
Definition: winuser.h:554
#define ESB_ENABLE_BOTH
Definition: winuser.h:563
#define SB_HORZ
Definition: winuser.h:552

Referenced by EnableScrollBar(), and ResetUserApiHook().

◆ NtUserEndDeferWindowPosEx()

BOOL NTAPI NtUserEndDeferWindowPosEx ( HDWP  WinPosInfo,
BOOL  bAsync 
)

Definition at line 3273 of file winpos.c.

3275{
3276 BOOL Ret;
3277 TRACE("Enter NtUserEndDeferWindowPosEx\n");
3279 Ret = IntEndDeferWindowPosEx(WinPosInfo, bAsync);
3280 TRACE("Leave NtUserEndDeferWindowPosEx, ret=%i\n", Ret);
3281 UserLeave();
3282 return Ret;
3283}
BOOL FASTCALL IntEndDeferWindowPosEx(HDWP hdwp, BOOL bAsync)
Definition: winpos.c:3180

Referenced by CascadeWindows(), EndDeferWindowPos(), and TileWindows().

◆ NtUserEndMenu()

BOOL NTAPI NtUserEndMenu ( VOID  )

Definition at line 5890 of file menu.c.

5891{
5892 //PWND pWnd;
5893 TRACE("Enter NtUserEndMenu\n");
5895 /* if ( gptiCurrent->pMenuState &&
5896 gptiCurrent->pMenuState->pGlobalPopupMenu )
5897 {
5898 pWnd = IntGetMSWND(gptiCurrent->pMenuState);
5899 if (pWnd)
5900 {
5901 UserPostMessage( UserHMGetHandle(pWnd), WM_CANCELMODE, 0, 0);
5902 }
5903 else
5904 gptiCurrent->pMenuState->fInsideMenuLoop = FALSE;
5905 }*/
5907 {
5910 }
5911 UserLeave();
5912 TRACE("Leave NtUserEndMenu\n");
5913 return TRUE;
5914}
static HWND top_popup
Definition: menu.c:22
BOOL fInsideMenuLoop
Definition: menu.c:25
#define WM_CANCELMODE
Definition: winuser.h:1638

◆ NtUserEndPaint()

BOOL NTAPI NtUserEndPaint ( HWND  hWnd,
CONST PAINTSTRUCT lPs 
)

Definition at line 1661 of file painting.c.

1662{
1664 PWND Window;
1665 PAINTSTRUCT Ps;
1667 BOOL Ret = FALSE;
1668
1669 TRACE("Enter NtUserEndPaint\n");
1671
1673 {
1674 goto Cleanup; // Return FALSE
1675 }
1676
1677 UserRefObjectCo(Window, &Ref); // Here for the exception.
1678
1679 _SEH2_TRY
1680 {
1681 ProbeForRead(pUnsafePs, sizeof(*pUnsafePs), 1);
1682 RtlCopyMemory(&Ps, pUnsafePs, sizeof(PAINTSTRUCT));
1683 }
1685 {
1687 }
1688 _SEH2_END
1689 if (!NT_SUCCESS(Status))
1690 {
1691 goto Cleanup; // Return FALSE
1692 }
1693
1694 Ret = IntEndPaint(Window, &Ps);
1695
1696Cleanup:
1698
1699 TRACE("Leave NtUserEndPaint, ret=%i\n", Ret);
1700 UserLeave();
1701 return Ret;
1702}
BOOL FASTCALL IntEndPaint(PWND Wnd, PPAINTSTRUCT Ps)
Definition: painting.c:1539

Referenced by EndPaint().

◆ NtUserEnumDisplayDevices()

BOOL NTAPI NtUserEnumDisplayDevices ( PUNICODE_STRING  lpDevice,
DWORD  iDevNum,
PDISPLAY_DEVICEW  lpDisplayDevice,
DWORD  dwFlags 
)

Definition at line 350 of file display.c.

355{
356 UNICODE_STRING ustrDevice;
357 WCHAR awcDevice[CCHDEVICENAME];
358 DISPLAY_DEVICEW dispdev;
360
361 TRACE("Enter NtUserEnumDisplayDevices(%wZ, %lu)\n",
362 pustrDevice, iDevNum);
363
364 dispdev.cb = sizeof(dispdev);
365
366 if (pustrDevice)
367 {
368 /* Initialize destination string */
369 RtlInitEmptyUnicodeString(&ustrDevice, awcDevice, sizeof(awcDevice));
370
372 {
373 /* Probe the UNICODE_STRING and the buffer */
374 ProbeForRead(pustrDevice, sizeof(UNICODE_STRING), 1);
375 ProbeForRead(pustrDevice->Buffer, pustrDevice->Length, 1);
376
377 /* Copy the string */
378 RtlCopyUnicodeString(&ustrDevice, pustrDevice);
379 }
381 {
382// _SEH2_YIELD(return _SEH2_GetExceptionCode());
384 }
386
387 if (ustrDevice.Length > 0)
388 pustrDevice = &ustrDevice;
389 else
390 pustrDevice = NULL;
391 }
392
393 /* If name is given only iDevNum==0 gives results */
394 if (pustrDevice && iDevNum != 0)
395 return FALSE;
396
397 /* Acquire global USER lock */
399
400 /* Call the internal function */
401 Status = UserEnumDisplayDevices(pustrDevice, iDevNum, &dispdev, dwFlags);
402
403 /* Release lock */
404 UserLeave();
405
406 /* On success copy data to caller */
407 if (NT_SUCCESS(Status))
408 {
409 /* Enter SEH */
411 {
412 /* First probe the cb field */
413 ProbeForWrite(&pDisplayDevice->cb, sizeof(DWORD), 1);
414
415 /* Check the buffer size */
416 if (pDisplayDevice->cb)
417 {
418 /* Probe the output buffer */
419 pDisplayDevice->cb = min(pDisplayDevice->cb, sizeof(dispdev));
420 ProbeForWrite(pDisplayDevice, pDisplayDevice->cb, 1);
421
422 /* Copy as much as the given buffer allows */
423 RtlCopyMemory(pDisplayDevice, &dispdev, pDisplayDevice->cb);
424 }
425 }
427 {
429 }
431 }
432
433 TRACE("Leave NtUserEnumDisplayDevices, Status = 0x%lx\n", Status);
434 /* Return the result */
435// return Status;
436 return NT_SUCCESS(Status); // FIXME
437}
NTSTATUS NTAPI UserEnumDisplayDevices(PUNICODE_STRING pustrDevice, DWORD iDevNum, PDISPLAY_DEVICEW pdispdev, DWORD dwFlags)
Definition: display.c:217

Referenced by EnumDisplayDevicesA(), and EnumDisplayDevicesW().

◆ NtUserEnumDisplayMonitors()

INT NTAPI NtUserEnumDisplayMonitors ( OPTIONAL IN HDC  hDC,
OPTIONAL IN LPCRECT  pRect,
OPTIONAL OUT HMONITOR hMonitorList,
OPTIONAL OUT LPRECT  monitorRectList,
OPTIONAL IN DWORD  listSize 
)

Referenced by EnumDisplayMonitors(), and START_TEST().

◆ NtUserEnumDisplaySettings()

NTSTATUS NTAPI NtUserEnumDisplaySettings ( PUNICODE_STRING  lpszDeviceName,
DWORD  iModeNum,
LPDEVMODEW  lpDevMode,
DWORD  dwFlags 
)

Referenced by START_TEST().

◆ NtUserEvent()

DWORD NTAPI NtUserEvent ( DWORD  Unknown0)

Definition at line 76 of file ntstubs.c.

78{
79 STUB
80
81 return 0;
82}

◆ NtUserExcludeUpdateRgn()

INT NTAPI NtUserExcludeUpdateRgn ( HDC  hDC,
HWND  hWnd 
)

Definition at line 2519 of file painting.c.

2522{
2523 INT ret = ERROR;
2524 PWND pWnd;
2525
2526 TRACE("Enter NtUserExcludeUpdateRgn\n");
2528
2529 pWnd = UserGetWindowObject(hWnd);
2530
2531 if (hDC && pWnd)
2533
2534 TRACE("Leave NtUserExcludeUpdateRgn, ret=%i\n", ret);
2535
2536 UserLeave();
2537 return ret;
2538}
#define ERROR(name)
Definition: error_private.h:53
INT FASTCALL co_UserExcludeUpdateRgn(HDC hDC, PWND Window)
Definition: painting.c:2466

Referenced by ExcludeUpdateRgn().

◆ NtUserFillWindow()

BOOL NTAPI NtUserFillWindow ( HWND  hWndPaint,
HWND  hWndPaint1,
HDC  hDC,
HBRUSH  hBrush 
)

Definition at line 1711 of file painting.c.

1715{
1716 BOOL ret = FALSE;
1717 PWND pWnd, pWndParent = NULL;
1719
1720 TRACE("Enter NtUserFillWindow\n");
1722
1723 if (!hDC)
1724 {
1725 goto Exit;
1726 }
1727
1728 if (!(pWnd = UserGetWindowObject(hWnd)))
1729 {
1730 goto Exit;
1731 }
1732
1733 if (hWndParent && !(pWndParent = UserGetWindowObject(hWndParent)))
1734 {
1735 goto Exit;
1736 }
1737
1738 UserRefObjectCo(pWnd, &Ref);
1739 ret = IntFillWindow( pWndParent, pWnd, hDC, hBrush );
1740 UserDerefObjectCo(pWnd);
1741
1742Exit:
1743 TRACE("Leave NtUserFillWindow, ret=%i\n",ret);
1744 UserLeave();
1745 return ret;
1746}
BOOL FASTCALL IntFillWindow(PWND pWndParent, PWND pWnd, HDC hDC, HBRUSH hBrush)
Definition: painting.c:1562

◆ NtUserFindExistingCursorIcon()

HICON NTAPI NtUserFindExistingCursorIcon ( _In_ PUNICODE_STRING  pustrModule,
_In_ PUNICODE_STRING  pustrRsrc,
_In_ FINDEXISTINGCURICONPARAM param 
)

Definition at line 861 of file cursoricon.c.

865{
866 PCURICON_OBJECT CurIcon;
867 HICON Ret = NULL;
868 UNICODE_STRING ustrModuleSafe, ustrRsrcSafe;
869 FINDEXISTINGCURICONPARAM paramSafe;
872 RTL_ATOM atomModName;
873
874 TRACE("Enter NtUserFindExistingCursorIcon\n");
875
877 {
878 ProbeForRead(param, sizeof(*param), 1);
879 RtlCopyMemory(&paramSafe, param, sizeof(paramSafe));
880 }
882 {
884 }
886
887 /* Capture resource name (it can be an INTRESOURCE == ATOM) */
888 Status = ProbeAndCaptureUnicodeStringOrAtom(&ustrRsrcSafe, pustrRsrc);
889 if (!NT_SUCCESS(Status))
890 return NULL;
891 Status = ProbeAndCaptureUnicodeString(&ustrModuleSafe, UserMode, pustrModule);
892 if (!NT_SUCCESS(Status))
893 goto done;
894 Status = RtlLookupAtomInAtomTable(gAtomTable, ustrModuleSafe.Buffer, &atomModName);
895 ReleaseCapturedUnicodeString(&ustrModuleSafe, UserMode);
896 if (!NT_SUCCESS(Status))
897 {
898 /* The module is not in the atom table. No chance to find the cursor */
899 goto done;
900 }
901
903 CurIcon = pProcInfo->pCursorCache;
904 while (CurIcon)
905 {
906 /* Icon/cursor */
907 if (paramSafe.bIcon != is_icon(CurIcon))
908 {
909 CurIcon = CurIcon->pcurNext;
910 continue;
911 }
912 /* See if module names match */
913 if (atomModName == CurIcon->atomModName)
914 {
915 /* They do. Now see if this is the same resource */
916 if (IS_INTRESOURCE(CurIcon->strName.Buffer) != IS_INTRESOURCE(ustrRsrcSafe.Buffer))
917 {
918 /* One is an INT resource and the other is not -> no match */
919 CurIcon = CurIcon->pcurNext;
920 continue;
921 }
922
923 if (IS_INTRESOURCE(CurIcon->strName.Buffer))
924 {
925 if (CurIcon->strName.Buffer == ustrRsrcSafe.Buffer)
926 {
927 /* INT resources match */
928 break;
929 }
930 }
931 else if (RtlCompareUnicodeString(&ustrRsrcSafe, &CurIcon->strName, TRUE) == 0)
932 {
933 /* Resource name strings match */
934 break;
935 }
936 }
937 CurIcon = CurIcon->pcurNext;
938 }
939
940 /* Now search Global Cursors or Icons. */
941 if (CurIcon == NULL)
942 {
943 CurIcon = gcurFirst;
944 while (CurIcon)
945 {
946 /* Icon/cursor */
947 if (paramSafe.bIcon != is_icon(CurIcon))
948 {
949 CurIcon = CurIcon->pcurNext;
950 continue;
951 }
952 /* See if module names match */
953 if (atomModName == CurIcon->atomModName)
954 {
955 /* They do. Now see if this is the same resource */
956 if (IS_INTRESOURCE(CurIcon->strName.Buffer) != IS_INTRESOURCE(ustrRsrcSafe.Buffer))
957 {
958 /* One is an INT resource and the other is not -> no match */
959 CurIcon = CurIcon->pcurNext;
960 continue;
961 }
962 if (IS_INTRESOURCE(CurIcon->strName.Buffer))
963 {
964 if (CurIcon->strName.Buffer == ustrRsrcSafe.Buffer)
965 {
966 /* INT resources match */
967 break;
968 }
969 }
970 else if (RtlCompareUnicodeString(&ustrRsrcSafe, &CurIcon->strName, TRUE) == 0)
971 {
972 /* Resource name strings match */
973 break;
974 }
975 }
976 CurIcon = CurIcon->pcurNext;
977 }
978 }
979 if (CurIcon)
980 Ret = UserHMGetHandle(CurIcon);
981 UserLeave();
982
983done:
984 if (!IS_INTRESOURCE(ustrRsrcSafe.Buffer))
985 ExFreePoolWithTag(ustrRsrcSafe.Buffer, TAG_STRING);
986
987 return Ret;
988}
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
Definition: string_lib.cpp:31
GLfloat param
Definition: glext.h:5796
static HICON
Definition: imagelist.c:80
unsigned short RTL_ATOM
Definition: atom.c:42
NTSYSAPI NTSTATUS NTAPI RtlLookupAtomInAtomTable(_In_ PRTL_ATOM_TABLE AtomTable, _In_ PWSTR AtomName, _Out_ PRTL_ATOM Atom)
static __inline NTSTATUS ProbeAndCaptureUnicodeString(OUT PUNICODE_STRING Dest, IN KPROCESSOR_MODE CurrentMode, IN const UNICODE_STRING *UnsafeSrc)
Definition: probe.h:142
static __inline VOID ReleaseCapturedUnicodeString(IN PUNICODE_STRING CapturedString, IN KPROCESSOR_MODE CurrentMode)
Definition: probe.h:239
struct _CURICON_OBJECT * pcurNext
Definition: cursoricon.h:12
UNICODE_STRING strName
Definition: cursoricon.h:13
USHORT atomModName
Definition: cursoricon.h:14
struct _CURICON_OBJECT * pCursorCache
Definition: win32.h:273
_Must_inspect_result_ NTSTATUS NTAPI ProbeAndCaptureUnicodeStringOrAtom(_Out_ _When_(return >=0, _At_(pustrOut->Buffer, _Post_ _Notnull_)) PUNICODE_STRING pustrOut, __in_data_source(USER_MODE) _In_ PUNICODE_STRING pustrUnsafe)
Definition: class.c:152
FORCEINLINE BOOL is_icon(PCURICON_OBJECT object)
Definition: cursoricon.c:194
PCURICON_OBJECT gcurFirst
Definition: cursoricon.c:27
PRTL_ATOM_TABLE gAtomTable
Definition: session.c:13
#define IS_INTRESOURCE(i)
Definition: winuser.h:580

Referenced by CURSORICON_LoadImageW().

◆ NtUserFindWindowEx()

HWND NTAPI NtUserFindWindowEx ( HWND  hwndParent,
HWND  hwndChildAfter,
PUNICODE_STRING  ucClassName,
PUNICODE_STRING  ucWindowName,
DWORD  dwUnknown 
)

Definition at line 3146 of file window.c.

3151{
3152 PWND Parent, ChildAfter;
3153 UNICODE_STRING ClassName = {0}, WindowName = {0};
3154 HWND Desktop, Ret = NULL;
3155 BOOL DoMessageWnd = FALSE;
3156 RTL_ATOM ClassAtom = (RTL_ATOM)0;
3157
3158 TRACE("Enter NtUserFindWindowEx\n");
3160
3161 if (ucClassName != NULL || ucWindowName != NULL)
3162 {
3163 _SEH2_TRY
3164 {
3165 if (ucClassName != NULL)
3166 {
3167 ClassName = ProbeForReadUnicodeString(ucClassName);
3168 if (ClassName.Length != 0)
3169 {
3170 ProbeForRead(ClassName.Buffer,
3171 ClassName.Length,
3172 sizeof(WCHAR));
3173 }
3174 else if (!IS_ATOM(ClassName.Buffer))
3175 {
3178 }
3179
3180 if (!IntGetAtomFromStringOrAtom(&ClassName,
3181 &ClassAtom))
3182 {
3185 }
3186 }
3187
3188 if (ucWindowName != NULL)
3189 {
3190 WindowName = ProbeForReadUnicodeString(ucWindowName);
3191 if (WindowName.Length != 0)
3192 {
3193 ProbeForRead(WindowName.Buffer,
3194 WindowName.Length,
3195 sizeof(WCHAR));
3196 }
3197 }
3198 }
3200 {
3202 _SEH2_YIELD(goto Exit); // Return NULL
3203 }
3204 _SEH2_END;
3205
3206 if (ucClassName != NULL)
3207 {
3208 if (ClassName.Length == 0 && ClassName.Buffer != NULL &&
3209 !IS_ATOM(ClassName.Buffer))
3210 {
3212 goto Exit; // Return NULL
3213 }
3214 else if (ClassAtom == (RTL_ATOM)0)
3215 {
3216 /* LastError code was set by IntGetAtomFromStringOrAtom */
3217 goto Exit; // Return NULL
3218 }
3219 }
3220 }
3221
3223
3224 if(hwndParent == NULL)
3225 {
3227 DoMessageWnd = TRUE;
3228 }
3229 else if(hwndParent == HWND_MESSAGE)
3230 {
3232 }
3233
3235 {
3236 goto Exit; // Return NULL
3237 }
3238
3239 ChildAfter = NULL;
3240 if(hwndChildAfter && !(ChildAfter = UserGetWindowObject(hwndChildAfter)))
3241 {
3242 goto Exit; // Return NULL
3243 }
3244
3245 _SEH2_TRY
3246 {
3248 {
3249 HWND *List, *phWnd;
3250 PWND TopLevelWindow;
3251 BOOLEAN CheckWindowName;
3252 BOOLEAN WindowMatches;
3253 BOOLEAN ClassMatches;
3254
3255 /* windows searches through all top-level windows if the parent is the desktop
3256 window */
3257
3259 {
3260 phWnd = List;
3261
3262 if(ChildAfter)
3263 {
3264 /* skip handles before and including ChildAfter */
3265 while(*phWnd && (*(phWnd++) != UserHMGetHandle(ChildAfter)))
3266 ;
3267 }
3268
3269 CheckWindowName = WindowName.Buffer != 0;
3270
3271 /* search children */
3272 while(*phWnd)
3273 {
3274 UNICODE_STRING ustr;
3275
3276 if(!(TopLevelWindow = UserGetWindowObject(*(phWnd++))))
3277 {
3278 continue;
3279 }
3280
3281 /* Do not send WM_GETTEXT messages in the kernel mode version!
3282 The user mode version however calls GetWindowText() which will
3283 send WM_GETTEXT messages to windows belonging to its processes */
3284 ustr.Buffer = TopLevelWindow->strName.Buffer;
3285 ustr.Length = (USHORT)min(TopLevelWindow->strName.Length, MAXUSHORT); // FIXME:LARGE_STRING truncated
3286 ustr.MaximumLength = (USHORT)min(TopLevelWindow->strName.MaximumLength, MAXUSHORT);
3287 WindowMatches = !CheckWindowName ||
3288 (TopLevelWindow->strName.Length < 0xFFFF &&
3289 !RtlCompareUnicodeString(&WindowName, &ustr, TRUE));
3290 ClassMatches = (ClassAtom == (RTL_ATOM)0) ||
3291 ClassAtom == TopLevelWindow->pcls->atomNVClassName;
3292
3293 if (WindowMatches && ClassMatches)
3294 {
3295 Ret = UserHMGetHandle(TopLevelWindow);
3296 break;
3297 }
3298
3299 if (IntFindWindow(TopLevelWindow, NULL, ClassAtom, &WindowName))
3300 {
3301 /* window returns the handle of the top-level window, in case it found
3302 the child window */
3303 Ret = UserHMGetHandle(TopLevelWindow);
3304 break;
3305 }
3306
3307 }
3309 }
3310 }
3311 else
3312 {
3313 TRACE("FindWindowEx: Not Desktop Parent!\n");
3314 Ret = IntFindWindow(Parent, ChildAfter, ClassAtom, &WindowName);
3315 }
3316
3317 if (Ret == NULL && DoMessageWnd)
3318 {
3319 PWND MsgWindows;
3320
3321 if((MsgWindows = UserGetWindowObject(IntGetMessageWindow())))
3322 {
3323 Ret = IntFindWindow(MsgWindows, ChildAfter, ClassAtom, &WindowName);
3324 }
3325 }
3326 }
3328 {
3330 Ret = NULL;
3331 }
3332 _SEH2_END;
3333
3334Exit:
3335 TRACE("Leave NtUserFindWindowEx, ret %p\n", Ret);
3336 UserLeave();
3337 return Ret;
3338}
#define _SEH2_LEAVE
Definition: pseh2_64.h:183
ATOM atomNVClassName
Definition: ntuser.h:569
PCLS pcls
Definition: ntuser.h:720
HWND FASTCALL IntGetCurrentThreadDesktopWindow(VOID)
Definition: desktop.c:1441
HWND FASTCALL IntGetMessageWindow(VOID)
Definition: desktop.c:1416
HWND FASTCALL IntFindWindow(PWND Parent, PWND ChildAfter, RTL_ATOM ClassAtom, PUNICODE_STRING WindowName)
Definition: window.c:3064
#define ERROR_CANNOT_FIND_WND_CLASS
Definition: winerror.h:888
#define HWND_MESSAGE
Definition: winuser.h:1213

Referenced by FindWindowExW(), and START_TEST().

◆ NtUserFlashWindowEx()

BOOL NTAPI NtUserFlashWindowEx ( IN PFLASHWINFO  pfwi)

Definition at line 1752 of file painting.c.

1753{
1754 PWND pWnd;
1755 FLASHWINFO finfo = {0};
1756 BOOL Ret = FALSE;
1757
1759
1760 _SEH2_TRY
1761 {
1762 ProbeForRead(pfwi, sizeof(FLASHWINFO), 1);
1763 RtlCopyMemory(&finfo, pfwi, sizeof(FLASHWINFO));
1764 }
1766 {
1768 _SEH2_YIELD(goto Exit);
1769 }
1770 _SEH2_END
1771
1772 if (!( pWnd = ValidateHwndNoErr(finfo.hwnd)) ||
1773 finfo.cbSize != sizeof(FLASHWINFO) ||
1774 finfo.dwFlags & ~(FLASHW_ALL|FLASHW_TIMER|FLASHW_TIMERNOFG) )
1775 {
1777 goto Exit;
1778 }
1779
1780 Ret = IntFlashWindowEx(pWnd, &finfo);
1781
1782Exit:
1783 UserLeave();
1784 return Ret;
1785}
BOOL FASTCALL IntFlashWindowEx(PWND pWnd, PFLASHWINFO pfwi)
Definition: painting.c:1311

Referenced by FlashWindow(), and FlashWindowEx().

◆ NtUserGetAltTabInfo()

BOOL NTAPI NtUserGetAltTabInfo ( HWND  hwnd,
INT  iItem,
PALTTABINFO  pati,
LPWSTR  pszItemText,
UINT  cchItemText,
BOOL  Ansi 
)

Definition at line 86 of file ntstubs.c.

93{
94 STUB
95
96 return 0;
97}

Referenced by GetAltTabInfoA(), and GetAltTabInfoW().

◆ NtUserGetAncestor()

HWND NTAPI NtUserGetAncestor ( HWND  hWnd,
UINT  Flags 
)

Definition at line 3413 of file window.c.

3414{
3415 PWND Window, Ancestor;
3416 HWND Ret = NULL;
3417
3418 TRACE("Enter NtUserGetAncestor\n");
3420
3422 if (Window)
3423 {
3424 Ancestor = UserGetAncestor(Window, Type);
3425 /* fixme: can UserGetAncestor ever return NULL for a valid window? */
3426
3427 Ret = (Ancestor ? UserHMGetHandle(Ancestor) : NULL);
3428 }
3429
3430 TRACE("Leave NtUserGetAncestor, ret=%p\n", Ret);
3431 UserLeave();
3432 return Ret;
3433}
Type
Definition: Type.h:7
PWND FASTCALL UserGetAncestor(PWND Wnd, UINT Type)
Definition: window.c:3344

Referenced by GetAncestor().

◆ NtUserGetAppImeLevel()

DWORD NTAPI NtUserGetAppImeLevel ( HWND  hWnd)

Definition at line 921 of file ime.c.

922{
923 DWORD ret = 0;
924 PWND pWnd;
925 PTHREADINFO pti;
926
928
929 pWnd = ValidateHwndNoErr(hWnd);
930 if (!pWnd)
931 goto Quit;
932
933 if (!IS_IMM_MODE())
934 {
935 ERR("!IS_IMM_MODE()\n");
937 goto Quit;
938 }
939
941 if (pWnd->head.pti->ppi == pti->ppi)
943
944Quit:
945 UserLeave();
946 return ret;
947}
ATOM AtomImeLevel
Definition: ntuser.c:28

Referenced by ImmGenerateMessage(), and ImmPostMessages().

◆ NtUserGetAsyncKeyState()

SHORT NTAPI NtUserGetAsyncKeyState ( INT  Key)

Definition at line 634 of file keyboard.c.

635{
636 WORD wRet = 0;
637
638 TRACE("Enter NtUserGetAsyncKeyState\n");
639
640 if (Key >= 0x100 || Key < 0)
641 {
643 ERR("Invalid parameter Key\n");
644 return 0;
645 }
646
648
650 wRet |= 0x8000; // If down, windows returns 0x8000.
651 if (gafAsyncKeyStateRecentDown[Key / 8] & (1 << (Key % 8)))
652 wRet |= 0x1;
653 gafAsyncKeyStateRecentDown[Key / 8] &= ~(1 << (Key % 8));
654
655 UserLeave();
656
657 TRACE("Leave NtUserGetAsyncKeyState, ret=%u\n", wRet);
658 return wRet;
659}
unsigned short WORD
Definition: ntddk_ex.h:93
#define IS_KEY_DOWN(ks, vk)
Definition: input.h:98
BYTE gafAsyncKeyState[256 *2/8]
Definition: keyboard.c:13
static BYTE gafAsyncKeyStateRecentDown[256/8]
Definition: keyboard.c:14

Referenced by GetAsyncKeyState(), and START_TEST().

◆ NtUserGetCaretBlinkTime()

UINT NTAPI NtUserGetCaretBlinkTime ( VOID  )

Definition at line 381 of file caret.c.

382{
383 UINT ret;
384
386
387 ret = gpsi->dtCaretBlink;
388
389 UserLeave();
390
391 return ret;
392}

Referenced by GetCaretBlinkTime().

◆ NtUserGetCaretPos()

BOOL NTAPI NtUserGetCaretPos ( LPPOINT  lpPoint)

Definition at line 396 of file caret.c.

398{
399 PTHREADINFO pti;
400 PUSER_MESSAGE_QUEUE ThreadQueue;
402 BOOL Ret = TRUE;
403
404 TRACE("Enter NtUserGetCaretPos\n");
406
408 ThreadQueue = pti->MessageQueue;
409
410 Status = MmCopyToCaller(lpPoint, &ThreadQueue->CaretInfo.Pos, sizeof(POINT));
411 if(!NT_SUCCESS(Status))
412 {
414 Ret = FALSE;
415 }
416
417 TRACE("Leave NtUserGetCaretPos, ret=%i\n", Ret);
418 UserLeave();
419 return Ret;
420}

Referenced by GetCaretPos().

◆ NtUserGetClassInfo()

BOOL NTAPI NtUserGetClassInfo ( HINSTANCE  hInstance,
PUNICODE_STRING  ClassName,
LPWNDCLASSEXW  wcex,
LPWSTR ppszMenuName,
BOOL  Ansi 
)

Definition at line 2779 of file class.c.

2785{
2786 UNICODE_STRING SafeClassName;
2787 WNDCLASSEXW Safewcexw;
2788 PCLS Class;
2789 RTL_ATOM ClassAtom = 0;
2790 PPROCESSINFO ppi;
2791 BOOL Ret = TRUE;
2793
2794 _SEH2_TRY
2795 {
2796 ProbeForWrite( lpWndClassEx, sizeof(WNDCLASSEXW), sizeof(ULONG));
2797 RtlCopyMemory( &Safewcexw, lpWndClassEx, sizeof(WNDCLASSEXW));
2798 if (ppszMenuName)
2799 {
2800 ProbeForWrite(ppszMenuName, sizeof(*ppszMenuName), sizeof(PVOID));
2801 }
2802 }
2804 {
2806 _SEH2_YIELD(return FALSE);
2807 }
2808 _SEH2_END;
2809
2810 Status = ProbeAndCaptureUnicodeStringOrAtom(&SafeClassName, ClassName);
2811 if (!NT_SUCCESS(Status))
2812 {
2813 ERR("Error capturing the class name\n");
2815 return FALSE;
2816 }
2817
2818 // If null instance use client.
2820
2821 TRACE("GetClassInfo(%wZ, %p)\n", &SafeClassName, hInstance);
2822
2823 /* NOTE: Need exclusive lock because getting the wndproc might require the
2824 creation of a call procedure handle */
2826
2827 ppi = GetW32ProcessInfo();
2828 if (!(ppi->W32PF_flags & W32PF_CLASSESREGISTERED))
2829 {
2831 }
2832
2833 ClassAtom = IntGetClassAtom(&SafeClassName,
2834 hInstance,
2835 ppi,
2836 &Class,
2837 NULL);
2838 if (ClassAtom != (RTL_ATOM)0)
2839 {
2840 ClassAtom = Class->atomNVClassName;
2841 Ret = UserGetClassInfo(Class, &Safewcexw, bAnsi, hInstance);
2842 }
2843 else
2844 {
2846 Ret = FALSE;
2847 }
2848
2849 UserLeave();
2850
2851 if (Ret)
2852 {
2853 _SEH2_TRY
2854 {
2855 /* Emulate Function. */
2856 if (ppszMenuName) *ppszMenuName = (LPWSTR)Safewcexw.lpszMenuName;
2857
2858 RtlCopyMemory(lpWndClassEx, &Safewcexw, sizeof(WNDCLASSEXW));
2859
2860 // From Wine:
2861 /* We must return the atom of the class here instead of just TRUE. */
2862 /* Undocumented behavior! Return the class atom as a BOOL! */
2863 Ret = (BOOL)ClassAtom;
2864 }
2866 {
2868 Ret = FALSE;
2869 }
2870 _SEH2_END;
2871 }
2872
2873 if (!IS_ATOM(SafeClassName.Buffer))
2874 ExFreePoolWithTag(SafeClassName.Buffer, TAG_STRING);
2875
2876 return Ret;
2877}
struct _PROCESSINFO * GetW32ProcessInfo(VOID)
Definition: misc.c:801
HINSTANCE hModClient
Definition: ntuser.c:25
Definition: ntuser.h:566
LPCWSTR lpszMenuName
Definition: winuser.h:3228
#define W32PF_CLASSESREGISTERED
Definition: win32.h:17
static BOOL UserGetClassInfo(IN PCLS Class, OUT PWNDCLASSEXW lpwcx, IN BOOL Ansi, HINSTANCE hInstance)
Definition: class.c:2280
RTL_ATOM IntGetClassAtom(_In_ PUNICODE_STRING ClassName, IN HINSTANCE hInstance OPTIONAL, IN PPROCESSINFO pi OPTIONAL, OUT PCLS *BaseClass OPTIONAL, OUT PCLS **Link OPTIONAL)
Definition: class.c:1377
BOOL FASTCALL UserRegisterSystemClasses(VOID)
Definition: class.c:2337
#define ERROR_CLASS_DOES_NOT_EXIST
Definition: winerror.h:892
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by GetClassInfoExA(), GetClassInfoExW(), and START_TEST().

◆ NtUserGetClassName()

INT NTAPI NtUserGetClassName ( HWND  hWnd,
BOOL  Real,
PUNICODE_STRING  ClassName 
)

Referenced by START_TEST().

◆ NtUserGetClipboardData()

HANDLE NTAPI NtUserGetClipboardData ( UINT  fmt,
PGETCLIPBDATA  pgcd 
)

Definition at line 897 of file clipboard.c.

898{
899 HANDLE hRet = NULL;
900 PCLIP pElement;
901 PWINSTATION_OBJECT pWinStaObj;
902 UINT uSourceFmt = fmt;
903
904 TRACE("NtUserGetClipboardData(%x, %p)\n", fmt, pgcd);
905
907
908 pWinStaObj = IntGetWinStaForCbAccess();
909 if (!pWinStaObj)
910 goto cleanup;
911
912 /* Check if the clipboard has been opened */
913 if (!IntIsClipboardOpenByMe(pWinStaObj))
914 {
916 goto cleanup;
917 }
918
919 pElement = IntGetFormatElement(pWinStaObj, fmt);
920 if (!pElement)
921 goto cleanup;
922
923 if (IS_DATA_SYNTHESIZED(pElement))
924 {
925 /* Note: Data is synthesized in usermode */
926 /* TODO: Add more formats */
927 switch (fmt)
928 {
929 case CF_UNICODETEXT:
930 case CF_TEXT:
931 case CF_OEMTEXT:
932 uSourceFmt = CF_UNICODETEXT;
933 pElement = IntGetFormatElement(pWinStaObj, uSourceFmt);
934 if (IS_DATA_SYNTHESIZED(pElement))
935 {
936 uSourceFmt = CF_TEXT;
937 pElement = IntGetFormatElement(pWinStaObj, uSourceFmt);
938 }
939 if (IS_DATA_SYNTHESIZED(pElement))
940 {
941 uSourceFmt = CF_OEMTEXT;
942 pElement = IntGetFormatElement(pWinStaObj, uSourceFmt);
943 }
944 break;
945
946 case CF_BITMAP:
947 IntSynthesizeBitmap(pWinStaObj, pElement);
948 break;
949
950 case CF_METAFILEPICT:
951 uSourceFmt = CF_ENHMETAFILE;
952 pElement = IntGetFormatElement(pWinStaObj, uSourceFmt);
953 break;
954
955 case CF_ENHMETAFILE:
956 uSourceFmt = CF_METAFILEPICT;
957 pElement = IntGetFormatElement(pWinStaObj, uSourceFmt);
958 break;
959
960 default:
961 ASSERT(FALSE);
962 }
963 }
964
965 if (pElement && IS_DATA_DELAYED(pElement) && pWinStaObj->spwndClipOwner)
966 {
967 /* Send WM_RENDERFORMAT message */
968 pWinStaObj->fInDelayedRendering = TRUE;
970 pWinStaObj->fInDelayedRendering = FALSE;
971
972 /* Data should be in clipboard now */
973 pElement = IntGetFormatElement(pWinStaObj, uSourceFmt);
974 }
975
976 if (!pElement || IS_DATA_DELAYED(pElement))
977 goto cleanup;
978
980 {
981 ProbeForWrite(pgcd, sizeof(*pgcd), 1);
982 pgcd->uFmtRet = pElement->fmt;
983 pgcd->fGlobalHandle = pElement->fGlobalHandle;
984
985 /* Text and bitmap needs more data */
986 if (fmt == CF_TEXT)
987 {
988 PCLIP pLocaleEl;
989
990 pLocaleEl = IntGetFormatElement(pWinStaObj, CF_LOCALE);
991 if (pLocaleEl && !IS_DATA_DELAYED(pLocaleEl))
992 pgcd->hLocale = pLocaleEl->hData;
993 }
994 else if (fmt == CF_BITMAP)
995 {
996 PCLIP pPaletteEl;
997
998 pPaletteEl = IntGetFormatElement(pWinStaObj, CF_PALETTE);
999 if (pPaletteEl && !IS_DATA_DELAYED(pPaletteEl))
1000 pgcd->hPalette = pPaletteEl->hData;
1001 }
1002
1003 hRet = pElement->hData;
1004 }
1006 {
1008 }
1009 _SEH2_END;
1010
1011cleanup:
1012 if (pWinStaObj)
1013 ObDereferenceObject(pWinStaObj);
1014
1015 UserLeave();
1016
1017 TRACE("NtUserGetClipboardData returns %p\n", hRet);
1018
1019 return hRet;
1020}
#define CF_UNICODETEXT
Definition: constants.h:408
#define CF_METAFILEPICT
Definition: constants.h:398
#define CF_BITMAP
Definition: constants.h:397
#define CF_PALETTE
Definition: constants.h:404
#define CF_LOCALE
Definition: constants.h:411
#define CF_ENHMETAFILE
Definition: constants.h:409
#define CF_TEXT
Definition: constants.h:396
#define CF_OEMTEXT
Definition: constants.h:402
Definition: clipboard.h:4
HANDLE hData
Definition: clipboard.h:6
BOOL fGlobalHandle
Definition: clipboard.h:7
UINT fmt
Definition: clipboard.h:5
INT fInDelayedRendering
Definition: winsta.h:34
PWND spwndClipOwner
Definition: winsta.h:28
Definition: dsound.c:943
BOOL fGlobalHandle
Definition: ntuser.h:1158
HANDLE hPalette
Definition: ntuser.h:1162
HANDLE hLocale
Definition: ntuser.h:1161
static BOOL FASTCALL IntIsClipboardOpenByMe(PWINSTATION_OBJECT pWinSta)
Definition: clipboard.c:136
#define IS_DATA_SYNTHESIZED(ce)
Definition: clipboard.c:18
static PCLIP FASTCALL IntGetFormatElement(PWINSTATION_OBJECT pWinStaObj, UINT fmt)
Definition: clipboard.c:41
static VOID WINAPI IntSynthesizeBitmap(PWINSTATION_OBJECT pWinStaObj, PCLIP pBmEl)
Definition: clipboard.c:230
#define IS_DATA_DELAYED(ce)
Definition: clipboard.c:17
#define ERROR_CLIPBOARD_NOT_OPEN
Definition: winerror.h:899
#define WM_RENDERFORMAT
Definition: winuser.h:1869

Referenced by GetClipboardData().

◆ NtUserGetClipboardFormatName()

INT NTAPI NtUserGetClipboardFormatName ( UINT  uFormat,
LPWSTR  lpszFormatName,
INT  cchMaxCount 
)

Definition at line 736 of file clipboard.c.

737{
738 INT iRet = 0;
739
741
742 /* If the format is built-in we fail */
743 if (fmt < 0xc000 || fmt > 0xffff)
744 {
745 /* Registetrated formats are >= 0xc000 */
746 goto cleanup;
747 }
748
749 if (cchMaxCount < 1 || !lpszFormatName)
750 {
752 goto cleanup;
753 }
754
756 {
757 ProbeForWrite(lpszFormatName, cchMaxCount * sizeof(WCHAR), 1);
758
760 lpszFormatName,
761 cchMaxCount * sizeof(WCHAR));
762 iRet /= sizeof(WCHAR);
763 }
765 {
767 }
768 _SEH2_END;
769
770cleanup:
771 UserLeave();
772
773 return iRet;
774}
ULONG FASTCALL IntGetAtomName(RTL_ATOM nAtom, LPWSTR lpBuffer, ULONG cjBufSize)
Definition: useratom.c:37

Referenced by GetClipboardFormatNameA(), and GetClipboardFormatNameW().

◆ NtUserGetClipboardOwner()

HWND NTAPI NtUserGetClipboardOwner ( VOID  )

Definition at line 777 of file clipboard.c.

778{
779 HWND hWnd = NULL;
780 PWINSTATION_OBJECT pWinStaObj;
781
783
784 pWinStaObj = IntGetWinStaForCbAccess();
785 if (!pWinStaObj)
786 goto cleanup;
787
788 if (pWinStaObj->spwndClipOwner)
789 hWnd = UserHMGetHandle(pWinStaObj->spwndClipOwner);
790
791 ObDereferenceObject(pWinStaObj);
792
793cleanup:
794 UserLeave();
795
796 return hWnd;
797}

Referenced by GetClipboardOwner().

◆ NtUserGetClipboardSequenceNumber()

DWORD NTAPI NtUserGetClipboardSequenceNumber ( VOID  )

Definition at line 1164 of file clipboard.c.

1165{
1166 DWORD dwRet = 0;
1167 PWINSTATION_OBJECT pWinStaObj;
1168
1170
1171 pWinStaObj = IntGetWinStaForCbAccess();
1172 if (!pWinStaObj)
1173 goto cleanup;
1174
1175 /* Get windowstation sequence number */
1176 dwRet = (DWORD)pWinStaObj->iClipSequenceNumber;
1177
1178 ObDereferenceObject(pWinStaObj);
1179
1180cleanup:
1181 UserLeave();
1182
1183 return dwRet;
1184}
INT iClipSequenceNumber
Definition: winsta.h:32

Referenced by GetClipboardSequenceNumber().

◆ NtUserGetClipboardViewer()

HWND NTAPI NtUserGetClipboardViewer ( VOID  )

Definition at line 800 of file clipboard.c.

801{
802 HWND hWnd = NULL;
803 PWINSTATION_OBJECT pWinStaObj;
804
806
807 pWinStaObj = IntGetWinStaForCbAccess();
808 if (!pWinStaObj)
809 goto cleanup;
810
811 if (pWinStaObj->spwndClipViewer)
812 hWnd = UserHMGetHandle(pWinStaObj->spwndClipViewer);
813
814 ObDereferenceObject(pWinStaObj);
815
816cleanup:
817 UserLeave();
818
819 return hWnd;
820}

Referenced by GetClipboardViewer().

◆ NtUserGetClipCursor()

BOOL NTAPI NtUserGetClipCursor ( RECT lpRect)

Referenced by GetClipCursor().

◆ NtUserGetComboBoxInfo()

BOOL NTAPI NtUserGetComboBoxInfo ( HWND  hWnd,
PCOMBOBOXINFO  pcbi 
)

Definition at line 3471 of file window.c.

3474{
3475 PWND Wnd;
3476 PPROCESSINFO ppi;
3477 BOOL NotSameppi = FALSE;
3478 BOOL Ret = TRUE;
3479
3480 TRACE("Enter NtUserGetComboBoxInfo\n");
3482
3483 if (!(Wnd = UserGetWindowObject(hWnd)))
3484 {
3485 Ret = FALSE;
3486 goto Exit;
3487 }
3488 _SEH2_TRY
3489 {
3490 ProbeForWrite(pcbi, sizeof(COMBOBOXINFO), 1);
3491 }
3493 {
3495 Ret = FALSE;
3496 _SEH2_YIELD(goto Exit);
3497 }
3498 _SEH2_END;
3499
3500 if (pcbi->cbSize < sizeof(COMBOBOXINFO))
3501 {
3503 Ret = FALSE;
3504 goto Exit;
3505 }
3506
3507 // Pass the user pointer, it was already probed.
3509 {
3511 goto Exit;
3512 }
3513
3515 NotSameppi = ppi != Wnd->head.pti->ppi;
3516 if (NotSameppi)
3517 {
3518 KeAttachProcess(&Wnd->head.pti->ppi->peProcess->Pcb);
3519 }
3520
3521 _SEH2_TRY
3522 {
3523 LPHEADCOMBO lphc = ((PWND2CBOX)Wnd)->pCBox;
3524 pcbi->rcItem = lphc->textRect;
3525 pcbi->rcButton = lphc->buttonRect;
3526 pcbi->stateButton = 0;
3527 if (lphc->wState & CBF_BUTTONDOWN)
3529 if (RECTL_bIsEmptyRect(&lphc->buttonRect))
3531 pcbi->hwndCombo = lphc->self;
3532 pcbi->hwndItem = lphc->hWndEdit;
3533 pcbi->hwndList = lphc->hWndLBox;
3534 }
3536 {
3537 Ret = FALSE;
3539 }
3540 _SEH2_END;
3541
3542Exit:
3543 if (NotSameppi) KeDetachProcess();
3544 TRACE("Leave NtUserGetComboBoxInfo, ret=%i\n", Ret);
3545 UserLeave();
3546 return Ret;
3547}
#define ICLS_COMBOBOX
Definition: ntuser.h:917
#define FNID_COMBOBOX
Definition: ntuser.h:867
VOID NTAPI KeDetachProcess(VOID)
Definition: procobj.c:621
VOID NTAPI KeAttachProcess(IN PKPROCESS Process)
Definition: procobj.c:582
RECT buttonRect
Definition: comctl32.h:158
RECT textRect
Definition: comctl32.h:157
UINT wState
Definition: comctl32.h:155
HWND hWndLBox
Definition: comctl32.h:154
HWND hWndEdit
Definition: comctl32.h:153
HWND self
Definition: comctl32.h:150
RTL_ATOM atomClassName
Definition: ntuser.h:568
DWORD stateButton
Definition: winuser.h:3715
ATOM atomSysClass[ICLS_NOTUSED+1]
Definition: ntuser.h:1060
struct _WND2CBOX * PWND2CBOX
#define CBF_BUTTONDOWN
Definition: window.c:3465
#define STATE_SYSTEM_PRESSED
Definition: winuser.h:2868
#define CB_GETCOMBOBOXINFO
Definition: winuser.h:1944
#define STATE_SYSTEM_INVISIBLE
Definition: winuser.h:2880

Referenced by GetComboBoxInfo().

◆ NtUserGetControlBrush()

HBRUSH NTAPI NtUserGetControlBrush ( HWND  hwnd,
HDC  hdc,
UINT  ctlType 
)

Definition at line 191 of file misc.c.

195{
196 PWND pwnd;
197 HBRUSH hBrush = NULL;
198
200 if ( (pwnd = UserGetWindowObject(hwnd)) &&
201 ((ctlType - WM_CTLCOLORMSGBOX) < CTLCOLOR_MAX) &&
202 hdc )
203 {
204 hBrush = GetControlBrush(pwnd, hdc, ctlType);
205 }
206 UserLeave();
207 return hBrush;
208}
HBRUSH FASTCALL GetControlBrush(PWND pwnd, HDC hdc, UINT ctlType)
Definition: misc.c:180
#define WM_CTLCOLORMSGBOX
Definition: winuser.h:1769
#define CTLCOLOR_MAX
Definition: winuser.h:961

Referenced by GetControlBrush().

◆ NtUserGetControlColor()

HBRUSH NTAPI NtUserGetControlColor ( HWND  hwndParent,
HWND  hwnd,
HDC  hdc,
UINT  CtlMsg 
)

Definition at line 215 of file misc.c.

220{
221 PWND pwnd, pwndParent = NULL;
222 HBRUSH hBrush = NULL;
223
225 if ( (pwnd = UserGetWindowObject(hwnd)) &&
226 ((CtlMsg - WM_CTLCOLORMSGBOX) < CTLCOLOR_MAX) &&
227 hdc )
228 {
229 if (hwndParent) pwndParent = UserGetWindowObject(hwndParent);
230 hBrush = GetControlColor( pwndParent, pwnd, hdc, CtlMsg);
231 }
232 UserLeave();
233 return hBrush;
234}
HBRUSH FASTCALL GetControlColor(PWND pwndParent, PWND pwnd, HDC hdc, UINT CtlMsg)
Definition: misc.c:154

Referenced by GetControlColor().

◆ NtUserGetCPD()

ULONG_PTR NTAPI NtUserGetCPD ( HWND  hWnd,
GETCPD  Flags,
ULONG_PTR  Proc 
)

Definition at line 176 of file callproc.c.

180{
181 PWND Wnd;
182 ULONG_PTR Result = 0;
183
185 if (!(Wnd = UserGetWindowObject(hWnd)))
186 {
187 goto Cleanup;
188 }
189
190 // Processing Window only from User space.
192 Result = UserGetCPD(Wnd, Flags, ProcIn);
193
194Cleanup:
195 UserLeave();
196 return Result;
197}
ULONG_PTR FASTCALL UserGetCPD(PVOID pvClsWnd, GETCPD Flags, ULONG_PTR ProcIn)
Definition: callproc.c:107

Referenced by IntGetClsWndProc(), and IntGetWndProc().

◆ NtUserGetCursorFrameInfo()

HCURSOR NTAPI NtUserGetCursorFrameInfo ( HCURSOR  hCursor,
DWORD  istep,
INT rate_jiffies,
DWORD num_steps 
)

Definition at line 2131 of file cursoricon.c.

2136{
2137 PCURICON_OBJECT CurIcon;
2138 HCURSOR ret;
2139 INT jiffies = 0;
2140 DWORD steps = 1;
2142
2143 TRACE("Enter NtUserGetCursorFrameInfo\n");
2145
2146 if (!(CurIcon = UserGetCurIconObject(hCursor)))
2147 {
2148 UserLeave();
2149 return NULL;
2150 }
2151
2152 ret = UserHMGetHandle(CurIcon);
2153
2154 if (CurIcon->CURSORF_flags & CURSORF_ACON)
2155 {
2156 PACON AniCurIcon = (PACON)CurIcon;
2157 if (istep >= AniCurIcon->cicur)
2158 {
2159 UserDereferenceObject(CurIcon);
2160 UserLeave();
2161 return NULL;
2162 }
2163 jiffies = AniCurIcon->ajifRate[istep];
2164 steps = AniCurIcon->cicur;
2165 ret = UserHMGetHandle(AniCurIcon->aspcur[AniCurIcon->aicur[istep]]);
2166 }
2167
2168 _SEH2_TRY
2169 {
2170 ProbeForWrite(rate_jiffies, sizeof(INT), 1);
2171 ProbeForWrite(num_steps, sizeof(DWORD), 1);
2172 *rate_jiffies = jiffies;
2173 *num_steps = steps;
2174 }
2176 {
2178 }
2179 _SEH2_END
2180
2181 if (!NT_SUCCESS(Status))
2182 {
2183 WARN("Status: 0x%08lx\n", Status);
2185 ret = NULL;
2186 }
2187
2188 UserDereferenceObject(CurIcon);
2189 UserLeave();
2190
2191 TRACE("Leaving NtUserGetCursorFrameInfo, ret = 0x%p\n", ret);
2192
2193 return ret;
2194}
struct tagACON * PACON
#define CURSORF_ACON
Definition: ntuser.h:1202
#define jiffies
Definition: module.h:1085
static DWORD DWORD DWORD DWORD * steps
Definition: cursoricon.c:1638
static DWORD DWORD istep
Definition: cursoricon.c:1638
UINT cicur
Definition: cursoricon.h:38
DWORD * aicur
Definition: cursoricon.h:40
PCURICON_OBJECT * aspcur
Definition: cursoricon.h:39
INT * ajifRate
Definition: cursoricon.h:41
HICON HCURSOR
Definition: windef.h:299

Referenced by GetCursorFrameInfo().

◆ NtUserGetCursorInfo()

BOOL NTAPI NtUserGetCursorInfo ( PCURSORINFO  pci)

Definition at line 649 of file cursoricon.c.

651{
652 CURSORINFO SafeCi;
653 PSYSTEM_CURSORINFO CurInfo;
655 PCURICON_OBJECT CurIcon;
656 BOOL Ret = FALSE;
657
658 TRACE("Enter NtUserGetCursorInfo\n");
660
661 CurInfo = IntGetSysCursorInfo();
662 CurIcon = (PCURICON_OBJECT)CurInfo->CurrentCursorObject;
663
664 SafeCi.cbSize = sizeof(CURSORINFO);
665 SafeCi.flags = ((CurIcon && CurInfo->ShowingCursor >= 0) ? CURSOR_SHOWING : 0);
666 SafeCi.hCursor = (CurIcon ? UserHMGetHandle(CurIcon) : NULL);
667
668 SafeCi.ptScreenPos = gpsi->ptCursor;
669
671 {
672 if (pci->cbSize == sizeof(CURSORINFO))
673 {
674 ProbeForWrite(pci, sizeof(CURSORINFO), 1);
675 RtlCopyMemory(pci, &SafeCi, sizeof(CURSORINFO));
676 Ret = TRUE;
677 }
678 else
679 {
681 }
682 }
684 {
686 }
687 _SEH2_END;
688 if (!NT_SUCCESS(Status))
689 {
691 }
692
693 TRACE("Leave NtUserGetCursorInfo, ret=%i\n", Ret);
694 UserLeave();
695 return Ret;
696}
struct _CURICON_OBJECT * PCURICON_OBJECT
PCURICON_OBJECT CurrentCursorObject
Definition: cursoricon.h:74
DWORD flags
Definition: winuser.h:3723
DWORD cbSize
Definition: winuser.h:3722
HCURSOR hCursor
Definition: winuser.h:3724
POINT ptScreenPos
Definition: winuser.h:3725
PSYSTEM_CURSORINFO IntGetSysCursorInfo(VOID)
Definition: cursoricon.c:187
#define CURSOR_SHOWING
Definition: winuser.h:2661

Referenced by GetCursorInfo().

◆ NtUserGetDC()

HDC NTAPI NtUserGetDC ( HWND  hWnd)

Definition at line 1014 of file windc.c.

1015{
1016 TRACE("NtUGetDC -> %p:%x\n", hWnd, !hWnd ? DCX_CACHE | DCX_WINDOW : DCX_USESTYLE);
1017
1019}
#define DCX_USESTYLE
Definition: GetDCEx.c:10
HDC APIENTRY NtUserGetDCEx(HWND hWnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
Definition: windc.c:974
#define DCX_WINDOW
Definition: winuser.h:2116

Referenced by GetDC().

◆ NtUserGetDCEx()

HDC NTAPI NtUserGetDCEx ( HWND  hWnd,
HANDLE  hRegion,
ULONG  Flags 
)

Definition at line 974 of file windc.c.

975{
976 PWND Wnd=NULL;
977 HDC Ret = NULL;
978
979 TRACE("Enter NtUserGetDCEx: hWnd %p, ClipRegion %p, Flags %x.\n",
980 hWnd, ClipRegion, Flags);
982
983 if (hWnd && !(Wnd = UserGetWindowObject(hWnd)))
984 {
985 goto Exit; // Return NULL
986 }
987 Ret = UserGetDCEx(Wnd, ClipRegion, Flags);
988
989Exit:
990 TRACE("Leave NtUserGetDCEx, ret=%p\n", Ret);
991 UserLeave();
992 return Ret;
993}
HDC FASTCALL UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
Definition: windc.c:345

Referenced by GetDCEx(), NtUserGetDC(), and NtUserGetWindowDC().

◆ NtUserGetDoubleClickTime()

UINT NTAPI NtUserGetDoubleClickTime ( VOID  )

Definition at line 388 of file misc.c.

389{
390 UINT Result;
391
392 TRACE("Enter NtUserGetDoubleClickTime\n");
394
395 // FIXME: Check if this works on non-interactive winsta
397
398 TRACE("Leave NtUserGetDoubleClickTime, ret=%u\n", Result);
399 UserLeave();
400 return Result;
401}
INT iDblClickTime
Definition: sysparams.h:90

Referenced by GetDoubleClickTime().

◆ NtUserGetForegroundWindow()

HWND NTAPI NtUserGetForegroundWindow ( VOID  )

Definition at line 1650 of file focus.c.

1651{
1652 HWND Ret;
1653
1654 TRACE("Enter NtUserGetForegroundWindow\n");
1656
1658
1659 TRACE("Leave NtUserGetForegroundWindow, ret=%p\n", Ret);
1660 UserLeave();
1661 return Ret;
1662}
HWND FASTCALL UserGetForegroundWindow(VOID)
Definition: focus.c:1424

Referenced by GetForegroundWindow().

◆ NtUserGetGuiResources()

DWORD NTAPI NtUserGetGuiResources ( HANDLE  hProcess,
DWORD  uiFlags 
)

Definition at line 536 of file misc.c.

539{
541 PPROCESSINFO W32Process;
543 DWORD Ret = 0;
544
545 TRACE("Enter NtUserGetGuiResources\n");
547
552 (PVOID*)&Process,
553 NULL);
554
555 if(!NT_SUCCESS(Status))
556 {
558 goto Exit; // Return 0
559 }
560
561 W32Process = (PPROCESSINFO)Process->Win32Process;
562 if(!W32Process)
563 {
566 goto Exit; // Return 0
567 }
568
569 switch(uiFlags)
570 {
571 case GR_GDIOBJECTS:
572 {
573 Ret = (DWORD)W32Process->GDIHandleCount;
574 break;
575 }
576 case GR_USEROBJECTS:
577 {
578 Ret = (DWORD)W32Process->UserHandleCount;
579 break;
580 }
581 default:
582 {
584 break;
585 }
586 }
587
589
590Exit:
591 TRACE("Leave NtUserGetGuiResources, ret=%lu\n", Ret);
592 UserLeave();
593 return Ret;
594}
#define ExGetPreviousMode
Definition: ex.h:143
#define PROCESS_QUERY_INFORMATION
Definition: pstypes.h:167
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:71
POBJECT_TYPE PsProcessType
Definition: process.c:20
struct _PROCESSINFO * PPROCESSINFO
Definition: ntwin32.h:5

Referenced by GetGuiResources().

◆ NtUserGetGUIThreadInfo()

BOOL NTAPI NtUserGetGUIThreadInfo ( DWORD  idThread,
LPGUITHREADINFO  lpgui 
)

Definition at line 405 of file misc.c.

408{
410 PTHRDCARETINFO CaretInfo;
411 GUITHREADINFO SafeGui;
413 PUSER_MESSAGE_QUEUE MsgQueue;
414 PTHREADINFO W32Thread, pti;
415 BOOL Ret = FALSE;
416
417 TRACE("Enter NtUserGetGUIThreadInfo\n");
419
420 Status = MmCopyFromCaller(&SafeGui, lpgui, sizeof(DWORD));
421 if(!NT_SUCCESS(Status))
422 {
424 goto Exit; // Return FALSE
425 }
426
427 if(SafeGui.cbSize != sizeof(GUITHREADINFO))
428 {
430 goto Exit; // Return FALSE
431 }
432
433 if (idThread)
434 {
436
437 // Validate Tread ID
438 W32Thread = IntTID2PTI(UlongToHandle(idThread));
439
440 if ( !W32Thread )
441 {
443 goto Exit; // Return FALSE
444 }
445
446 Desktop = W32Thread->rpdesk;
447
448 // Check Desktop and it must be the same as current.
449 if ( !Desktop || Desktop != pti->rpdesk )
450 {
452 goto Exit; // Return FALSE
453 }
454
455 if ( W32Thread->MessageQueue )
456 MsgQueue = W32Thread->MessageQueue;
457 else
458 {
459 MsgQueue = Desktop->ActiveMessageQueue;
460 }
461 }
462 else
463 { /* Get the foreground thread */
464 /* FIXME: Handle NULL queue properly? */
465 MsgQueue = IntGetFocusMessageQueue();
466 if(!MsgQueue)
467 {
469 goto Exit; // Return FALSE
470 }
471 }
472
473 CaretInfo = &MsgQueue->CaretInfo;
474
475 SafeGui.flags = (CaretInfo->Visible ? GUI_CARETBLINKING : 0);
476/*
477 if (W32Thread->pMenuState->pGlobalPopupMenu)
478 {
479 SafeGui.flags |= GUI_INMENUMODE;
480
481 if (W32Thread->pMenuState->pGlobalPopupMenu->spwndNotify)
482 SafeGui.hwndMenuOwner = UserHMGetHandle(W32Thread->pMenuState->pGlobalPopupMenu->spwndNotify);
483
484 if (W32Thread->pMenuState->pGlobalPopupMenu->fHasMenuBar)
485 {
486 if (W32Thread->pMenuState->pGlobalPopupMenu->fIsSysMenu)
487 {
488 SafeGui.flags |= GUI_SYSTEMMENUMODE;
489 }
490 }
491 else
492 {
493 SafeGui.flags |= GUI_POPUPMENUMODE;
494 }
495 }
496 */
497 SafeGui.hwndMenuOwner = MsgQueue->MenuOwner;
498
499 if (MsgQueue->MenuOwner)
500 SafeGui.flags |= GUI_INMENUMODE | MsgQueue->MenuState;
501
502 if (MsgQueue->MoveSize)
503 SafeGui.flags |= GUI_INMOVESIZE;
504
505 /* FIXME: Add flag GUI_16BITTASK */
506
507 SafeGui.hwndActive = MsgQueue->spwndActive ? UserHMGetHandle(MsgQueue->spwndActive) : 0;
508 SafeGui.hwndFocus = MsgQueue->spwndFocus ? UserHMGetHandle(MsgQueue->spwndFocus) : 0;
509 SafeGui.hwndCapture = MsgQueue->spwndCapture ? UserHMGetHandle(MsgQueue->spwndCapture) : 0;
510 SafeGui.hwndMoveSize = MsgQueue->MoveSize;
511 SafeGui.hwndCaret = CaretInfo->hWnd;
512
513 SafeGui.rcCaret.left = CaretInfo->Pos.x;
514 SafeGui.rcCaret.top = CaretInfo->Pos.y;
515 SafeGui.rcCaret.right = SafeGui.rcCaret.left + CaretInfo->Size.cx;
516 SafeGui.rcCaret.bottom = SafeGui.rcCaret.top + CaretInfo->Size.cy;
517
518 Status = MmCopyToCaller(lpgui, &SafeGui, sizeof(GUITHREADINFO));
519 if(!NT_SUCCESS(Status))
520 {
522 goto Exit; // Return FALSE
523 }
524
525 Ret = TRUE;
526
527Exit:
528 TRACE("Leave NtUserGetGUIThreadInfo, ret=%i\n", Ret);
529 UserLeave();
530 return Ret;
531}
#define MmCopyFromCaller
Definition: polytest.cpp:29
HWND hwndCaret
Definition: winable.h:77
HWND hwndFocus
Definition: winable.h:73
HWND hwndMenuOwner
Definition: winable.h:75
HWND hwndMoveSize
Definition: winable.h:76
DWORD cbSize
Definition: winable.h:70
HWND hwndCapture
Definition: winable.h:74
HWND hwndActive
Definition: winable.h:72
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
PUSER_MESSAGE_QUEUE FASTCALL IntGetFocusMessageQueue(VOID)
Definition: desktop.c:1324
#define GUI_INMENUMODE
Definition: winable.h:29
#define GUI_CARETBLINKING
Definition: winable.h:27
#define GUI_INMOVESIZE
Definition: winable.h:28

Referenced by GetActiveWindow(), GetCapture(), GetFocus(), and GetGUIThreadInfo().

◆ NtUserGetIconSize()

BOOL NTAPI NtUserGetIconSize ( HANDLE  Handle,
UINT  istepIfAniCur,
LONG plcx,
LONG plcy 
)

◆ NtUserGetImeHotKey()

BOOL NTAPI NtUserGetImeHotKey ( DWORD  dwHotKeyId,
LPUINT  lpuModifiers,
LPUINT  lpuVirtualKey,
LPHKL  lphKL 
)

Definition at line 406 of file ime.c.

407{
408 PIMEHOTKEY pNode = NULL;
409
411
413 {
414 ProbeForWrite(lpuModifiers, sizeof(UINT), 1);
415 ProbeForWrite(lpuVirtualKey, sizeof(UINT), 1);
416 if (lphKL)
417 ProbeForWrite(lphKL, sizeof(HKL), 1);
418 }
420 {
421 ERR("%p, %p, %p\n", lpuModifiers, lpuVirtualKey, lphKL);
422 _SEH2_YIELD(goto Quit);
423 }
424 _SEH2_END;
425
426 pNode = IntGetImeHotKeyById(gpImeHotKeyList, dwHotKeyId);
427 if (!pNode)
428 goto Quit;
429
431 {
432 *lpuModifiers = pNode->uModifiers;
433 *lpuVirtualKey = pNode->uVirtualKey;
434 if (lphKL)
435 *lphKL = pNode->hKL;
436 }
438 {
439 ERR("%p, %p, %p, %p\n", pNode, lpuModifiers, lpuVirtualKey, lphKL);
440 pNode = NULL;
441 }
442 _SEH2_END;
443
444Quit:
445 UserLeave();
446 return !!pNode;
447}
UINT uModifiers
Definition: ime.c:36
HKL hKL
Definition: ime.c:37
UINT uVirtualKey
Definition: ime.c:35
static PIMEHOTKEY FASTCALL IntGetImeHotKeyById(PIMEHOTKEY pList, DWORD dwHotKeyId)
Definition: ime.c:146
PIMEHOTKEY gpImeHotKeyList
Definition: ime.c:40

Referenced by CliSetDefaultImeHotKeys(), and ImmGetHotKey().

◆ NtUserGetImeInfoEx()

BOOL NTAPI NtUserGetImeInfoEx ( PIMEINFOEX  pImeInfoEx,
IMEINFOEXCLASS  SearchType 
)

Definition at line 1008 of file ime.c.

1011{
1012 IMEINFOEX ImeInfoEx;
1013 BOOL ret = FALSE;
1014 PWINSTATION_OBJECT pWinSta;
1015
1017
1018 if (!IS_IMM_MODE())
1019 {
1020 ERR("!IS_IMM_MODE()\n");
1021 goto Quit;
1022 }
1023
1024 _SEH2_TRY
1025 {
1026 ProbeForRead(pImeInfoEx, sizeof(*pImeInfoEx), 1);
1027 ImeInfoEx = *pImeInfoEx;
1028 }
1030 {
1031 ERR("%p\n", pImeInfoEx);
1032 _SEH2_YIELD(goto Quit);
1033 }
1034 _SEH2_END;
1035
1037 ret = UserGetImeInfoEx(pWinSta, &ImeInfoEx, SearchType);
1038 if (!ret)
1039 goto Quit;
1040
1041 _SEH2_TRY
1042 {
1043 ProbeForWrite(pImeInfoEx, sizeof(*pImeInfoEx), 1);
1044 *pImeInfoEx = ImeInfoEx;
1045 }
1047 {
1048 ERR("%p\n", pImeInfoEx);
1049 ret = FALSE;
1050 }
1051 _SEH2_END;
1052
1053Quit:
1054 UserLeave();
1055 return ret;
1056}
BOOL FASTCALL UserGetImeInfoEx(_Inout_ PWINSTATION_OBJECT pWinSta, _Inout_ PIMEINFOEX pInfoEx, _In_ IMEINFOEXCLASS SearchType)
Definition: ime.c:951

Referenced by ImmGetImeInfoEx().

◆ NtUserGetInternalWindowPos()

DWORD NTAPI NtUserGetInternalWindowPos ( HWND  hwnd,
LPRECT  rectWnd,
LPPOINT  ptIcon 
)

Definition at line 3343 of file winpos.c.

3346{
3347 PWND Window;
3348 DWORD Ret = 0;
3349 BOOL Hit = FALSE;
3350 WINDOWPLACEMENT wndpl;
3351
3353
3355 {
3356 Hit = FALSE;
3357 goto Exit;
3358 }
3359
3360 _SEH2_TRY
3361 {
3362 if(rectWnd)
3363 {
3364 ProbeForWrite(rectWnd,
3365 sizeof(RECT),
3366 1);
3367 }
3368 if(ptIcon)
3369 {
3370 ProbeForWrite(ptIcon,
3371 sizeof(POINT),
3372 1);
3373 }
3374
3375 }
3377 {
3379 Hit = TRUE;
3380 }
3381 _SEH2_END;
3382
3383 wndpl.length = sizeof(WINDOWPLACEMENT);
3384
3385 if (IntGetWindowPlacement(Window, &wndpl) && !Hit)
3386 {
3387 _SEH2_TRY
3388 {
3389 if (rectWnd)
3390 {
3391 RtlCopyMemory(rectWnd, &wndpl.rcNormalPosition , sizeof(RECT));
3392 }
3393 if (ptIcon)
3394 {
3395 RtlCopyMemory(ptIcon, &wndpl.ptMinPosition, sizeof(POINT));
3396 }
3397
3398 }
3400 {
3402 Hit = TRUE;
3403 }
3404 _SEH2_END;
3405
3406 if (!Hit) Ret = wndpl.showCmd;
3407 }
3408Exit:
3409 UserLeave();
3410 return Ret;
3411}
BOOL FASTCALL IntGetWindowPlacement(PWND Wnd, WINDOWPLACEMENT *lpwndpl)
Definition: winpos.c:564
RECT rcNormalPosition
Definition: winuser.h:3298
POINT ptMinPosition
Definition: winuser.h:3296
struct _WINDOWPLACEMENT WINDOWPLACEMENT

◆ NtUserGetKeyboardLayout()

HKL NTAPI NtUserGetKeyboardLayout ( DWORD  dwThreadid)

◆ NtUserGetKeyboardLayoutList()

UINT NTAPI NtUserGetKeyboardLayoutList ( ULONG  nItems,
HKL pHklBuff 
)

Definition at line 1038 of file kbdlayout.c.

1041{
1042 UINT ret = 0;
1043 PWINSTATION_OBJECT pWinSta;
1044
1045 if (!pHklBuff)
1046 nBuff = 0;
1047
1049
1050 if (nBuff > MAXULONG / sizeof(HKL))
1051 {
1053 goto Quit;
1054 }
1055
1056 _SEH2_TRY
1057 {
1058 ProbeForWrite(pHklBuff, nBuff * sizeof(HKL), 1);
1059 }
1061 {
1063 goto Quit;
1064 }
1065 _SEH2_END;
1066
1068
1069 _SEH2_TRY
1070 {
1071 ret = IntGetKeyboardLayoutList(pWinSta, nBuff, pHklBuff);
1072 }
1074 {
1076 goto Quit;
1077 }
1078 _SEH2_END;
1079
1080Quit:
1081 UserLeave();
1082 return ret;
1083}
#define MAXULONG
Definition: typedefs.h:251
static UINT APIENTRY IntGetKeyboardLayoutList(_Inout_ PWINSTATION_OBJECT pWinSta, _In_ ULONG nBuff, _Out_ HKL *pHklBuff)
Definition: kbdlayout.c:96

Referenced by CliImmInitializeHotKeys().

◆ NtUserGetKeyboardLayoutName()

BOOL NTAPI NtUserGetKeyboardLayoutName ( _Inout_ PUNICODE_STRING  pustrName)

Definition at line 1092 of file kbdlayout.c.

1094{
1095 BOOL bRet = FALSE;
1096 PKL pKl;
1097 PTHREADINFO pti;
1098 UNICODE_STRING ustrNameSafe;
1100
1102
1104 pKl = pti->KeyboardLayout;
1105
1106 if (!pKl)
1107 goto cleanup;
1108
1109 _SEH2_TRY
1110 {
1111 ProbeForWriteUnicodeString(pustrName);
1112 ustrNameSafe = *pustrName;
1113
1114 ProbeForWrite(ustrNameSafe.Buffer, ustrNameSafe.MaximumLength, 1);
1115
1116 if (IS_IME_HKL(pKl->hkl))
1117 {
1118 Status = RtlIntegerToUnicodeString(HandleToUlong(pKl->hkl), 16, &ustrNameSafe);
1119 }
1120 else
1121 {
1122 if (ustrNameSafe.MaximumLength < KL_NAMELENGTH * sizeof(WCHAR))
1123 {
1125 goto cleanup;
1126 }
1127
1128 /* FIXME: Do not use awchKF */
1129 ustrNameSafe.Length = 0;
1130 Status = RtlAppendUnicodeToString(&ustrNameSafe, pKl->spkf->awchKF);
1131 }
1132
1133 if (NT_SUCCESS(Status))
1134 {
1135 *pustrName = ustrNameSafe;
1136 bRet = TRUE;
1137 }
1138 }
1140 {
1142 }
1143 _SEH2_END;
1144
1145cleanup:
1146 UserLeave();
1147 return bRet;
1148}
NTSTATUS RtlAppendUnicodeToString(IN PUNICODE_STRING Str1, IN PWSTR Str2)
Definition: string_lib.cpp:62
#define IS_IME_HKL(hKL)
Definition: imm32_undoc.h:20
NTSYSAPI NTSTATUS NTAPI RtlIntegerToUnicodeString(ULONG Value, ULONG Base, PUNICODE_STRING String)
#define ProbeForWriteUnicodeString(Ptr)
Definition: probe.h:48
struct tagKL * KeyboardLayout
Definition: win32.h:90
WCHAR awchKF[20]
Definition: input.h:19
Definition: input.h:27
PKBDFILE spkf
Definition: input.h:33
HKL hkl
Definition: input.h:32
#define KL_NAMELENGTH
Definition: winuser.h:122

Referenced by GetKeyboardLayoutNameA(), GetKeyboardLayoutNameW(), and START_TEST().

◆ NtUserGetKeyboardState()

DWORD NTAPI NtUserGetKeyboardState ( LPBYTE  Unknown0)

Definition at line 2578 of file msgqueue.c.

2579{
2580 DWORD i, ret = TRUE;
2581 PTHREADINFO pti;
2582 PUSER_MESSAGE_QUEUE MessageQueue;
2583
2585
2587 MessageQueue = pti->MessageQueue;
2588
2589 _SEH2_TRY
2590 {
2591 /* Probe and copy key state to an array */
2592 ProbeForWrite(lpKeyState, 256 * sizeof(BYTE), 1);
2593 for (i = 0; i < 256; ++i)
2594 {
2595 lpKeyState[i] = 0;
2596 if (IS_KEY_DOWN(MessageQueue->afKeyState, i))
2597 lpKeyState[i] |= KS_DOWN_BIT;
2598 if (IS_KEY_LOCKED(MessageQueue->afKeyState, i))
2599 lpKeyState[i] |= KS_LOCK_BIT;
2600 }
2601 }
2603 {
2605 ret = FALSE;
2606 }
2607 _SEH2_END;
2608
2609 UserLeave();
2610
2611 return ret;
2612}
BYTE afKeyState[256 *2/8]
Definition: msgqueue.h:84
#define KS_DOWN_BIT
Definition: input.h:51
#define KS_LOCK_BIT
Definition: input.h:52
#define IS_KEY_LOCKED(ks, vk)
Definition: input.h:99
unsigned char BYTE
Definition: xxhash.c:193

Referenced by GetKeyboardState().

◆ NtUserGetKeyboardType()

DWORD NTAPI NtUserGetKeyboardType ( DWORD  TypeFlag)

◆ NtUserGetKeyNameText()

DWORD NTAPI NtUserGetKeyNameText ( LONG  lParam,
LPWSTR  lpString,
int  nSize 
)

Definition at line 1584 of file keyboard.c.

1585{
1586 PTHREADINFO pti;
1587 DWORD i, dwRet = 0;
1588 SIZE_T cchKeyName;
1589 WORD wScanCode = (lParam >> 16) & 0xFF;
1590 BOOL bExtKey = (HIWORD(lParam) & KF_EXTENDED) ? TRUE : FALSE;
1591 PKBDTABLES pKbdTbl;
1592 VSC_LPWSTR *pKeyNames = NULL;
1593 CONST WCHAR *pKeyName = NULL;
1594 WCHAR KeyNameBuf[2];
1595
1596 TRACE("Enter NtUserGetKeyNameText\n");
1597
1599
1600 /* Get current keyboard layout */
1602 pKbdTbl = pti ? pti->KeyboardLayout->spkf->pKbdTbl : 0;
1603
1604 if (!pKbdTbl || cchSize < 1)
1605 {
1606 ERR("Invalid parameter\n");
1607 goto cleanup;
1608 }
1609
1610 /* "Do not care" flag */
1612 {
1613 /* Note: We could do vsc -> vk -> vsc conversion, instead of using
1614 hardcoded scan codes, but it's not what Windows does */
1615 if (wScanCode == SCANCODE_RSHIFT && !bExtKey)
1616 wScanCode = SCANCODE_LSHIFT;
1617 else if (wScanCode == SCANCODE_CTRL || wScanCode == SCANCODE_ALT)
1618 bExtKey = FALSE;
1619 }
1620
1621 if (bExtKey)
1622 pKeyNames = pKbdTbl->pKeyNamesExt;
1623 else
1624 pKeyNames = pKbdTbl->pKeyNames;
1625
1626 for (i = 0; pKeyNames[i].pwsz; i++)
1627 {
1628 if (pKeyNames[i].vsc == wScanCode)
1629 {
1630 pKeyName = pKeyNames[i].pwsz;
1631 break;
1632 }
1633 }
1634
1635 if (!pKeyName)
1636 {
1637 WORD wVk = IntVscToVk(wScanCode, pKbdTbl);
1638
1639 if (wVk)
1640 {
1641 KeyNameBuf[0] = IntVkToChar(wVk, pKbdTbl);
1642 KeyNameBuf[1] = 0;
1643 if (KeyNameBuf[0])
1644 pKeyName = KeyNameBuf;
1645 }
1646 }
1647
1648 if (pKeyName)
1649 {
1650 cchKeyName = wcslen(pKeyName);
1651 if (cchKeyName > (cchSize - 1UL))
1652 cchKeyName = cchSize - 1UL; // Don't count '\0'
1653
1654 _SEH2_TRY
1655 {
1656 ProbeForWrite(lpString, (cchKeyName + 1) * sizeof(WCHAR), 1);
1657 RtlCopyMemory(lpString, pKeyName, cchKeyName * sizeof(WCHAR));
1658 lpString[cchKeyName] = UNICODE_NULL;
1659 dwRet = cchKeyName;
1660 }
1662 {
1664 }
1665 _SEH2_END;
1666 }
1667 else
1668 {
1670 }
1671
1672cleanup:
1673 UserLeave();
1674 TRACE("Leave NtUserGetKeyNameText, ret=%lu\n", dwRet);
1675 return dwRet;
1676}
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define SCANCODE_LSHIFT
Definition: kbd.h:128
#define SCANCODE_ALT
Definition: kbd.h:131
#define SCANCODE_RSHIFT
Definition: kbd.h:129
#define SCANCODE_CTRL
Definition: kbd.h:130
#define CONST
Definition: pedump.c:81
Definition: kbd.h:95
VSC_LPWSTR * pKeyNamesExt
Definition: kbd.h:100
VSC_LPWSTR * pKeyNames
Definition: kbd.h:99
LPWSTR pwsz
Definition: kbd.h:68
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define LP_DO_NOT_CARE_BIT
Definition: input.h:56
static WCHAR FASTCALL IntVkToChar(WORD wVk, PKBDTABLES pKbdTbl)
Definition: keyboard.c:607
static WORD FASTCALL IntVscToVk(WORD wScanCode, PKBDTABLES pKbdTbl)
Definition: keyboard.c:564
#define KF_EXTENDED
Definition: winuser.h:2449

Referenced by GetKeyNameTextA(), and GetKeyNameTextW().

◆ NtUserGetKeyState()

SHORT NTAPI NtUserGetKeyState ( INT  VirtKey)

Definition at line 2562 of file msgqueue.c.

2563{
2564 DWORD Ret;
2565
2567
2568 Ret = UserGetKeyState(key);
2569
2570 UserLeave();
2571
2572 return (SHORT)Ret;
2573}
DWORD FASTCALL UserGetKeyState(DWORD dwKey)
Definition: msgqueue.c:221
short SHORT
Definition: pedump.c:59
Definition: copy.c:22

Referenced by GetKeyState().

◆ NtUserGetLayeredWindowAttributes()

BOOL NTAPI NtUserGetLayeredWindowAttributes ( HWND  hwnd,
COLORREF pcrKey,
BYTE pbAlpha,
DWORD pdwFlags 
)

Definition at line 241 of file layered.c.

246{
247 PLRD_PROP pLrdProp;
248 PWND pWnd;
249 BOOL Ret = FALSE;
250
251 TRACE("Enter NtUserGetLayeredWindowAttributes\n");
253
254 if (!(pWnd = UserGetWindowObject(hwnd)) ||
255 !(pWnd->ExStyle & WS_EX_LAYERED) )
256 {
257 ERR("Not a Layered Window!\n");
258 goto Exit;
259 }
260
261 pLrdProp = UserGetProp(pWnd, AtomLayer, TRUE);
262
263 if (!pLrdProp)
264 {
265 TRACE("No Prop!\n");
266 goto Exit;
267 }
268
269 if (pLrdProp->is_Layered == 0)
270 {
271 goto Exit;
272 }
273
275 {
276 if (pcrKey)
277 {
278 ProbeForWrite(pcrKey, sizeof(*pcrKey), 1);
279 *pcrKey = pLrdProp->Key;
280 }
281 if (pbAlpha)
282 {
283 ProbeForWrite(pbAlpha, sizeof(*pbAlpha), 1);
284 *pbAlpha = pLrdProp->Alpha;
285 }
286 if (pdwFlags)
287 {
288 ProbeForWrite(pdwFlags, sizeof(*pdwFlags), 1);
289 *pdwFlags = pLrdProp->Flags;
290 }
291 }
293 {
295 _SEH2_YIELD(goto Exit);
296 }
297 _SEH2_END;
298
299 Ret = TRUE;
300
301Exit:
302 TRACE("Leave NtUserGetLayeredWindowAttributes, ret=%i\n", Ret);
303 UserLeave();
304 return Ret;
305}
ATOM AtomLayer
Definition: ntuser.c:21
BYTE is_Layered
Definition: layered.c:17
DWORD Flags
Definition: layered.c:19
BYTE Alpha
Definition: layered.c:16
COLORREF Key
Definition: layered.c:15
#define WS_EX_LAYERED
Definition: winuser.h:389

◆ NtUserGetListBoxInfo()

DWORD NTAPI NtUserGetListBoxInfo ( HWND  hWnd)

Definition at line 3582 of file window.c.

3584{
3585 PWND Wnd;
3586 PPROCESSINFO ppi;
3587 BOOL NotSameppi = FALSE;
3588 DWORD Ret = 0;
3589
3590 TRACE("Enter NtUserGetListBoxInfo\n");
3592
3593 if (!(Wnd = UserGetWindowObject(hWnd)))
3594 {
3595 goto Exit; // Return 0
3596 }
3597
3598 if ((Wnd->pcls->atomClassName != gpsi->atomSysClass[ICLS_LISTBOX]) && Wnd->fnid != FNID_LISTBOX)
3599 {
3601 goto Exit;
3602 }
3603
3604 // wine lisbox:test_GetListBoxInfo lb_getlistboxinfo = 0, should not send a message!
3606 NotSameppi = ppi != Wnd->head.pti->ppi;
3607 if (NotSameppi)
3608 {
3609 KeAttachProcess(&Wnd->head.pti->ppi->peProcess->Pcb);
3610 }
3611
3612 _SEH2_TRY
3613 {
3614 LB_DESCR *descr = ((PWND2LB)Wnd)->pLBiv;
3615 // See Controls ListBox.c:LB_GETLISTBOXINFO must match...
3616 Ret = descr->page_size;
3617 }
3619 {
3620 Ret = 0;
3622 }
3623 _SEH2_END;
3624
3625Exit:
3626 if (NotSameppi) KeDetachProcess();
3627 TRACE("Leave NtUserGetListBoxInfo, ret=%lu\n", Ret);
3628 UserLeave();
3629 return Ret;
3630}
#define ICLS_LISTBOX
Definition: ntuser.h:915
#define FNID_LISTBOX
Definition: ntuser.h:871
const char * descr
Definition: boot.c:45
struct _WND2LB * PWND2LB
#define LB_GETLISTBOXINFO
Definition: winuser.h:2047

Referenced by GetListBoxInfo().

◆ NtUserGetMenuBarInfo()

BOOL NTAPI NtUserGetMenuBarInfo ( HWND  hwnd,
LONG  idObject,
LONG  idItem,
PMENUBARINFO  pmbi 
)

Definition at line 5920 of file menu.c.

5925{
5926 PWND pWnd;
5927 HMENU hMenu;
5928 MENUBARINFO kmbi;
5929 BOOL Ret = FALSE;
5930 PPOPUPMENU pPopupMenu;
5933 PMENU Menu = NULL;
5934
5935 TRACE("Enter NtUserGetMenuBarInfo\n");
5937
5938 if (!(pWnd = UserGetWindowObject(hwnd)))
5939 {
5941 goto Cleanup; // Return FALSE
5942 }
5943
5944 UserRefObjectCo(pWnd, &Ref);
5945
5947 kmbi.hMenu = NULL;
5948 kmbi.hwndMenu = NULL;
5949 kmbi.fBarFocused = FALSE;
5950 kmbi.fFocused = FALSE;
5951
5952 switch (idObject)
5953 {
5954 case OBJID_CLIENT:
5955 if (!pWnd->pcls->fnid)
5956 goto Cleanup; // Return FALSE
5957 if (pWnd->pcls->fnid != FNID_MENU)
5958 {
5959 WARN("called on invalid window: %u\n", pWnd->pcls->fnid);
5961 goto Cleanup; // Return FALSE
5962 }
5963 // Windows does this! Wine checks for Atom and uses GetWindowLongPtrW.
5964 hMenu = (HMENU)co_IntSendMessage(hwnd, MN_GETHMENU, 0, 0);
5965 pPopupMenu = ((PMENUWND)pWnd)->ppopupmenu;
5966 if (pPopupMenu && pPopupMenu->spmenu)
5967 {
5968 if (UserHMGetHandle(pPopupMenu->spmenu) != hMenu)
5969 {
5970 ERR("Window Pop Up hMenu %p not the same as Get hMenu %p!\n", UserHMGetHandle(pPopupMenu->spmenu), hMenu);
5971 }
5972 }
5973 break;
5974 case OBJID_MENU:
5975 if (pWnd->style & WS_CHILD)
5976 goto Cleanup; // Return FALSE
5977 hMenu = UlongToHandle(pWnd->IDMenu);
5978 TRACE("GMBI: OBJID_MENU hMenu %p\n",hMenu);
5979 break;
5980 case OBJID_SYSMENU:
5981 if (!(pWnd->style & WS_SYSMENU))
5982 goto Cleanup; // Return FALSE
5983 Menu = IntGetSystemMenu(pWnd, FALSE);
5984 hMenu = UserHMGetHandle(Menu);
5985 break;
5986 default:
5987 goto Cleanup; // Return FALSE
5988 }
5989
5990 if (!hMenu)
5991 goto Cleanup; // Return FALSE
5992
5993 _SEH2_TRY
5994 {
5995 ProbeForRead(pmbi, sizeof(MENUBARINFO), 1);
5996 kmbi.cbSize = pmbi->cbSize;
5997 }
5999 {
6000 kmbi.cbSize = 0;
6001 }
6002 _SEH2_END
6003
6004 if (kmbi.cbSize != sizeof(MENUBARINFO))
6005 {
6007 goto Cleanup; // Return FALSE
6008 }
6009
6010 if (!Menu)
6011 {
6012 Menu = UserGetMenuObject(hMenu);
6013 if (!Menu)
6014 goto Cleanup; // Return FALSE
6015 }
6016
6017 if ((idItem < 0) || ((ULONG)idItem > Menu->cItems))
6018 goto Cleanup; // Return FALSE
6019
6020 if (idItem == 0)
6021 {
6022 Ret = IntGetMenuItemRect(pWnd, Menu, 0, &kmbi.rcBar);
6023 kmbi.rcBar.right = kmbi.rcBar.left + Menu->cxMenu;
6024 kmbi.rcBar.bottom = kmbi.rcBar.top + Menu->cyMenu;
6025 TRACE("idItem a 0 %d\n",Ret);
6026 }
6027 else
6028 {
6029 Ret = IntGetMenuItemRect(pWnd, Menu, idItem-1, &kmbi.rcBar);
6030 TRACE("idItem b %d %d\n", idItem-1, Ret);
6031 }
6032
6033 kmbi.hMenu = hMenu;
6034 kmbi.fBarFocused = top_popup_hmenu == hMenu;
6035 TRACE("GMBI: top p hm %p hMenu %p\n",top_popup_hmenu, hMenu);
6036 if (idItem)
6037 {
6038 kmbi.fFocused = Menu->iItem == idItem-1;
6039 if (kmbi.fFocused && (Menu->rgItems[idItem - 1].spSubMenu))
6040 {
6041 kmbi.hwndMenu = Menu->rgItems[idItem - 1].spSubMenu->hWnd;
6042 }
6043 }
6044 else
6045 {
6046 kmbi.fFocused = kmbi.fBarFocused;
6047 }
6048
6049 _SEH2_TRY
6050 {
6051 ProbeForWrite(pmbi, sizeof(MENUBARINFO), 1);
6052 RtlCopyMemory(pmbi, &kmbi, sizeof(MENUBARINFO));
6053 }
6055 {
6057 }
6058 _SEH2_END
6059
6060 if (!NT_SUCCESS(Status))
6061 {
6063 Ret = FALSE;
6064 goto Cleanup;
6065 }
6066
6067 Ret = TRUE;
6068
6069Cleanup:
6070 if (pWnd) UserDerefObjectCo(pWnd);
6071 TRACE("Leave NtUserGetMenuBarInfo, ret=%i\n", Ret);
6072 UserLeave();
6073 return Ret;
6074}
struct _MENUWND * PMENUWND
#define FNID_MENU
Definition: ntuser.h:861
#define WS_SYSMENU
Definition: pedump.c:629
DWORD fnid
Definition: ntuser.h:570
DWORD style
Definition: ntuser.h:706
UINT_PTR IDMenu
Definition: ntuser.h:731
struct tagMENU * spSubMenu
Definition: ntuser.h:375
BOOL fBarFocused
Definition: winuser.h:3733
DWORD cbSize
Definition: winuser.h:3729
INT iItem
Definition: ntuser.h:419
UINT cItems
Definition: ntuser.h:421
ULONG cxMenu
Definition: ntuser.h:422
PITEM rgItems
Definition: ntuser.h:426
PMENU spmenu
Definition: ntuser.h:473
FORCEINLINE VOID RECTL_vSetEmptyRect(_Out_ RECTL *prcl)
Definition: rect.h:20
PMENU FASTCALL IntGetSystemMenu(PWND Window, BOOL bRevert)
Definition: menu.c:5399
static HMENU top_popup_hmenu
Definition: menu.c:23
BOOL FASTCALL IntGetMenuItemRect(PWND pWnd, PMENU Menu, UINT uItem, PRECTL Rect)
Definition: menu.c:5246
#define OBJID_MENU
Definition: winable.h:18
#define OBJID_SYSMENU
Definition: winable.h:16
#define OBJID_CLIENT
Definition: winable.h:19
#define MN_GETHMENU
Definition: winuser.h:1776

◆ NtUserGetMenuIndex()

UINT NTAPI NtUserGetMenuIndex ( HMENU  hMenu,
HMENU  hSubMenu 
)

Definition at line 6080 of file menu.c.

6083{
6084 PMENU Menu, SubMenu;
6085 PITEM MenuItem;
6086 UINT i;
6087 UINT Ret = 0xFFFFFFFF;
6088
6089 TRACE("Enter NtUserGetMenuIndex\n");
6091
6092 if ( !(Menu = UserGetMenuObject(hMenu)) ||
6093 !(SubMenu = UserGetMenuObject(hSubMenu)) )
6094 goto Exit; // Return 0xFFFFFFFF
6095
6096 MenuItem = Menu->rgItems;
6097 for (i = 0; i < Menu->cItems; i++, MenuItem++)
6098 {
6099 if (MenuItem->spSubMenu == SubMenu)
6100 {
6101 Ret = MenuItem->wID;
6102 break;
6103 }
6104 }
6105
6106Exit:
6107 TRACE("Leave NtUserGetMenuIndex, ret=%u\n", Ret);
6108 UserLeave();
6109 return Ret;
6110}
UINT wID
Definition: ntuser.h:374

Referenced by GetMenuIndex().

◆ NtUserGetMenuItemRect()

BOOL NTAPI NtUserGetMenuItemRect ( HWND  hWnd,
HMENU  hMenu,
UINT  uItem,
LPRECT  lprcItem 
)

Referenced by GetMenuItemRect().

◆ NtUserGetMessage()

BOOL APIENTRY NtUserGetMessage ( PMSG  pMsg,
HWND  hWnd,
UINT  MsgFilterMin,
UINT  MsgFilterMax 
)

Definition at line 2347 of file message.c.

2351{
2352 MSG Msg;
2353 BOOL Ret;
2354
2355 if ( (MsgFilterMin|MsgFilterMax) & ~WM_MAXIMUM )
2356 {
2358 return FALSE;
2359 }
2360
2362
2363 RtlZeroMemory(&Msg, sizeof(MSG));
2364
2365 Ret = co_IntGetPeekMessage(&Msg, hWnd, MsgFilterMin, MsgFilterMax, PM_REMOVE, TRUE);
2366
2367 UserLeave();
2368
2369 if (Ret)
2370 {
2371 _SEH2_TRY
2372 {
2373 ProbeForWrite(pMsg, sizeof(MSG), 1);
2374 RtlCopyMemory(pMsg, &Msg, sizeof(MSG));
2375 }
2377 {
2379 Ret = FALSE;
2380 }
2381 _SEH2_END;
2382 }
2383
2384 if ((INT)Ret != -1)
2385 Ret = Ret ? (WM_QUIT != pMsg->message) : FALSE;
2386
2387 return Ret;
2388}
UINT message
Definition: winuser.h:3118
#define WM_MAXIMUM
Definition: undocuser.h:64
#define WM_QUIT
Definition: winuser.h:1626

Referenced by GetMessageA(), and GetMessageW().

◆ NtUserGetMonitorInfo()

BOOL NTAPI NtUserGetMonitorInfo ( IN HMONITOR  hMonitor,
OUT LPMONITORINFO  pMonitorInfo 
)

Definition at line 728 of file monitor.c.

731{
732 PMONITOR pMonitor;
733 MONITORINFOEXW MonitorInfo;
735 BOOL bRet = FALSE;
736 PWCHAR pwstrDeviceName;
737
738 TRACE("Enter NtUserGetMonitorInfo\n");
740
741 /* Get monitor object */
742 pMonitor = UserGetMonitorObject(hMonitor);
743 if (!pMonitor)
744 {
745 TRACE("Couldnt find monitor %p\n", hMonitor);
746 goto cleanup;
747 }
748
749 /* Check if pMonitorInfoUnsafe is valid */
750 if(pMonitorInfoUnsafe == NULL)
751 {
753 goto cleanup;
754 }
755
756 pwstrDeviceName = ((PPDEVOBJ)(pMonitor->hDev))->pGraphicsDevice->szWinDeviceName;
757
758 /* Get size of pMonitorInfoUnsafe */
759 Status = MmCopyFromCaller(&MonitorInfo.cbSize, &pMonitorInfoUnsafe->cbSize, sizeof(MonitorInfo.cbSize));
760 if (!NT_SUCCESS(Status))
761 {
763 goto cleanup;
764 }
765
766 /* Check if size of struct is valid */
767 if (MonitorInfo.cbSize != sizeof(MONITORINFO) &&
768 MonitorInfo.cbSize != sizeof(MONITORINFOEXW))
769 {
771 goto cleanup;
772 }
773
774 /* Fill monitor info */
775 MonitorInfo.rcMonitor = pMonitor->rcMonitor;
776 MonitorInfo.rcWork = pMonitor->rcWork;
777 MonitorInfo.dwFlags = 0;
778 if (pMonitor->IsPrimary)
779 MonitorInfo.dwFlags |= MONITORINFOF_PRIMARY;
780
781 /* Fill device name */
782 if (MonitorInfo.cbSize == sizeof(MONITORINFOEXW))
783 {
784 RtlStringCbCopyNExW(MonitorInfo.szDevice,
785 sizeof(MonitorInfo.szDevice),
786 pwstrDeviceName,
787 (wcslen(pwstrDeviceName)+1) * sizeof(WCHAR),
789 }
790
791 /* Output data */
792 Status = MmCopyToCaller(pMonitorInfoUnsafe, &MonitorInfo, MonitorInfo.cbSize);
793 if (!NT_SUCCESS(Status))
794 {
795 TRACE("GetMonitorInfo: MmCopyToCaller failed\n");
797 goto cleanup;
798 }
799
800 TRACE("GetMonitorInfo: success\n");
801 bRet = TRUE;
802
803cleanup:
804 TRACE("Leave NtUserGetMonitorInfo, ret=%i\n", bRet);
805 UserLeave();
806 return bRet;
807}
struct _PDEVOBJ * PPDEVOBJ
Definition: mdevobj.h:6
NTSTRSAFEAPI RtlStringCbCopyNExW(_Out_writes_bytes_(cbDest) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, _In_reads_bytes_(cbToCopy) STRSAFE_LPCWSTR pszSrc, _In_ size_t cbToCopy, _Outptr_opt_result_bytebuffer_(*pcbRemaining) NTSTRSAFE_PWSTR *ppszDestEnd, _Out_opt_ size_t *pcbRemaining, _In_ STRSAFE_DWORD dwFlags)
Definition: ntstrsafe.h:547
#define STRSAFE_FILL_BEHIND_NULL
Definition: ntstrsafe.h:32
RECT rcWork
Definition: monitor.h:19
HDEV hDev
Definition: monitor.h:23
RECT rcMonitor
Definition: monitor.h:18
DWORD IsPrimary
Definition: monitor.h:15
WCHAR szDevice[CCHDEVICENAME]
Definition: winuser.h:3807
PMONITOR NTAPI UserGetMonitorObject(IN HMONITOR hMonitor)
Definition: monitor.c:74

Referenced by GetMonitorInfoA(), and GetMonitorInfoW().

◆ NtUserGetMouseMovePointsEx()

DWORD NTAPI NtUserGetMouseMovePointsEx ( UINT  cbSize,
LPMOUSEMOVEPOINT  lppt,
LPMOUSEMOVEPOINT  lpptBuf,
int  nBufPoints,
DWORD  resolution 
)

Definition at line 543 of file mouse.c.

549{
550 MOUSEMOVEPOINT Safeppt;
551 //BOOL Hit;
552 INT iRet = -1;
553
554 TRACE("Enter NtUserGetMouseMovePointsEx\n");
555
556 if ((cbSize != sizeof(MOUSEMOVEPOINT)) || (nBufPoints < 0) || (nBufPoints > 64))
557 {
559 return (DWORD)-1;
560 }
561
562 if (!lpptIn || (!lpptOut && nBufPoints))
563 {
565 return (DWORD)-1;
566 }
567
569 {
570 ProbeForRead(lpptIn, cbSize, 1);
571 RtlCopyMemory(&Safeppt, lpptIn, cbSize);
572 }
574 {
576 _SEH2_YIELD(return (DWORD)-1);
577 }
578 _SEH2_END;
579
581
582 // https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmousemovepointsex
583 // This explains the math issues in transforming points.
584 iRet = gcMouseHistoryOfMoves; // FIFO is forward so retrieve backward.
585 //Hit = FALSE;
586 do
587 {
588 if (Safeppt.x == 0 && Safeppt.y == 0)
589 break; // No test.
590 // Finds the point, it returns the last nBufPoints prior to and including the supplied point.
591 if (gMouseHistoryOfMoves[iRet].x == Safeppt.x && gMouseHistoryOfMoves[iRet].y == Safeppt.y)
592 {
593 if (Safeppt.time) // Now test time and it seems to be absolute.
594 {
595 if (Safeppt.time == gMouseHistoryOfMoves[iRet].time)
596 {
597 //Hit = TRUE;
598 break;
599 }
600 else
601 {
602 if (--iRet < 0) iRet = 63;
603 continue;
604 }
605 }
606 //Hit = TRUE;
607 break;
608 }
609 if (--iRet < 0) iRet = 63;
610 }
611 while (iRet != gcMouseHistoryOfMoves);
612
613 switch(resolution)
614 {
615 case GMMP_USE_DISPLAY_POINTS:
616 if (nBufPoints)
617 {
619 {
620 ProbeForWrite(lpptOut, cbSize, 1);
621 }
623 {
625 iRet = -1;
626 _SEH2_YIELD(goto cleanup);
627 }
628 _SEH2_END;
629 }
630 iRet = nBufPoints;
631 break;
632 case GMMP_USE_HIGH_RESOLUTION_POINTS:
633 break;
634 default:
636 iRet = -1;
637 }
638
639cleanup:
640 TRACE("Leave NtUserGetMouseMovePointsEx, ret=%i\n", iRet);
641 UserLeave();
642 return (DWORD)iRet;
643}
MOUSEMOVEPOINT gMouseHistoryOfMoves[64]
Definition: mouse.c:13
INT gcMouseHistoryOfMoves
Definition: mouse.c:14
#define ERROR_POINT_NOT_FOUND
Definition: winerror.h:693
#define ERROR_NOACCESS
Definition: winerror.h:578

◆ NtUserGetObjectInformation()

BOOL NTAPI NtUserGetObjectInformation ( HANDLE  hObject,
DWORD  nIndex,
PVOID  pvInformation,
DWORD  nLength,
PDWORD  nLengthNeeded 
)

Definition at line 1099 of file winsta.c.

1105{
1107 PWINSTATION_OBJECT WinStaObject = NULL;
1108 PDESKTOP DesktopObject = NULL;
1109 POBJECT_HEADER ObjectHeader;
1110 POBJECT_HEADER_NAME_INFO NameInfo;
1111 OBJECT_HANDLE_INFORMATION HandleInfo;
1112 USEROBJECTFLAGS ObjectFlags;
1113 PUNICODE_STRING pStrNameU = NULL;
1114 PVOID pvData = NULL;
1115 SIZE_T nDataSize = 0;
1116
1117 _SEH2_TRY
1118 {
1119 if (nLengthNeeded)
1120 ProbeForWrite(nLengthNeeded, sizeof(*nLengthNeeded), 1);
1121 ProbeForWrite(pvInformation, nLength, 1);
1122 }
1124 {
1126 return FALSE;
1127 }
1128 _SEH2_END;
1129
1130 /* Try window station */
1131 TRACE("Trying to open window station 0x%p\n", hObject);
1133 0,
1135 UserMode,
1136 (PVOID*)&WinStaObject,
1137 &HandleInfo);
1138
1140 {
1141 /* Try desktop */
1142 TRACE("Trying to open desktop %p\n", hObject);
1143 WinStaObject = NULL;
1145 UserMode,
1146 0,
1147 &DesktopObject);
1148 }
1149
1150 if (!NT_SUCCESS(Status))
1151 {
1152 ERR("Failed: 0x%x\n", Status);
1153 goto Exit;
1154 }
1155
1156 TRACE("WinSta or Desktop opened!\n");
1157
1158 /* Get data */
1159 switch (nIndex)
1160 {
1161 case UOI_FLAGS:
1162 {
1163 ObjectFlags.fReserved = FALSE;
1164 ObjectFlags.fInherit = !!(HandleInfo.HandleAttributes & OBJ_INHERIT);
1165
1166 ObjectFlags.dwFlags = 0;
1167 if (WinStaObject != NULL)
1168 {
1169 if (!(WinStaObject->Flags & WSS_NOIO))
1170 ObjectFlags.dwFlags |= WSF_VISIBLE;
1171 }
1172 else if (DesktopObject != NULL)
1173 {
1174 FIXME("Setting DF_ALLOWOTHERACCOUNTHOOK is unimplemented.\n");
1175 }
1176 else
1177 {
1178 ERR("No associated WinStaObject nor DesktopObject!\n");
1179 }
1180
1181 pvData = &ObjectFlags;
1182 nDataSize = sizeof(ObjectFlags);
1184 break;
1185 }
1186
1187 case UOI_NAME:
1188 {
1189 if (WinStaObject != NULL)
1190 {
1191 ObjectHeader = OBJECT_TO_OBJECT_HEADER(WinStaObject);
1192 NameInfo = OBJECT_HEADER_TO_NAME_INFO(ObjectHeader);
1193
1194 if (NameInfo && (NameInfo->Name.Length > 0))
1195 {
1196 /* Named window station */
1197 pStrNameU = &NameInfo->Name;
1198 nDataSize = pStrNameU->Length + sizeof(UNICODE_NULL);
1199 }
1200 else
1201 {
1202 /* Unnamed window station (should never happen!) */
1203 ASSERT(FALSE);
1204 pStrNameU = NULL;
1205 nDataSize = sizeof(UNICODE_NULL);
1206 }
1208 }
1209 else if (DesktopObject != NULL)
1210 {
1211 pvData = DesktopObject->pDeskInfo->szDesktopName;
1212 nDataSize = (wcslen(DesktopObject->pDeskInfo->szDesktopName) + 1) * sizeof(WCHAR);
1214 }
1215 else
1216 {
1218 }
1219 break;
1220 }
1221
1222 case UOI_TYPE:
1223 {
1224 if (WinStaObject != NULL)
1225 {
1226 ObjectHeader = OBJECT_TO_OBJECT_HEADER(WinStaObject);
1227 pStrNameU = &ObjectHeader->Type->Name;
1228 nDataSize = pStrNameU->Length + sizeof(UNICODE_NULL);
1230 }
1231 else if (DesktopObject != NULL)
1232 {
1233 ObjectHeader = OBJECT_TO_OBJECT_HEADER(DesktopObject);
1234 pStrNameU = &ObjectHeader->Type->Name;
1235 nDataSize = pStrNameU->Length + sizeof(UNICODE_NULL);
1237 }
1238 else
1239 {
1241 }
1242 break;
1243 }
1244
1245 case UOI_USER_SID:
1247 ERR("UOI_USER_SID unimplemented!\n");
1248 break;
1249
1250 default:
1252 break;
1253 }
1254
1255Exit:
1256 if ((Status == STATUS_SUCCESS) && (nLength < nDataSize))
1258
1259 _SEH2_TRY
1260 {
1261 if (nLengthNeeded)
1262 *nLengthNeeded = nDataSize;
1263
1264 /* Try to copy data to caller */
1265 if (Status == STATUS_SUCCESS && (nDataSize > 0))
1266 {
1267 TRACE("Trying to copy data to caller (len = %lu, len needed = %lu)\n", nLength, nDataSize);
1268 if (pvData)
1269 {
1270 /* Copy the data */
1271 RtlCopyMemory(pvInformation, pvData, nDataSize);
1272 }
1273 else if (pStrNameU)
1274 {
1275 /* Copy and NULL-terminate the string */
1276 RtlCopyMemory(pvInformation, pStrNameU->Buffer, pStrNameU->Length);
1277 ((PWCHAR)pvInformation)[pStrNameU->Length / sizeof(WCHAR)] = UNICODE_NULL;
1278 }
1279 else
1280 {
1281 /* Zero the memory */
1282 RtlZeroMemory(pvInformation, nDataSize);
1283 }
1284 }
1285 }
1287 {
1289 }
1290 _SEH2_END;
1291
1292 /* Release objects */
1293 if (DesktopObject != NULL)
1294 ObDereferenceObject(DesktopObject);
1295 if (WinStaObject != NULL)
1296 ObDereferenceObject(WinStaObject);
1297
1298 if (!NT_SUCCESS(Status))
1299 {
1301 return FALSE;
1302 }
1303
1304 return TRUE;
1305}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define STATUS_OBJECT_TYPE_MISMATCH
Definition: d3dkmdt.h:46
#define OBJ_INHERIT
Definition: winternl.h:225
#define OBJECT_HEADER_TO_NAME_INFO(h)
Definition: obtypes.h:114
#define OBJECT_TO_OBJECT_HEADER(o)
Definition: obtypes.h:111
WCHAR szDesktopName[1]
Definition: ntuser.h:158
PDESKTOPINFO pDeskInfo
Definition: desktop.h:8
UNICODE_STRING Name
Definition: obtypes.h:433
POBJECT_TYPE Type
Definition: obtypes.h:493
UNICODE_STRING Name
Definition: obtypes.h:383
POBJECT_TYPE ExWindowStationObjectType
Definition: win32k.c:21
#define WSS_NOIO
Definition: winsta.h:9
_In_ DWORD nLength
Definition: wincon.h:473
_In_ ULONG _In_opt_ PVOID pvData
Definition: winddi.h:3749
#define UOI_NAME
Definition: winuser.h:1087
#define UOI_TYPE
Definition: winuser.h:1088
#define UOI_USER_SID
Definition: winuser.h:1089
#define WSF_VISIBLE
Definition: winuser.h:2455
#define UOI_FLAGS
Definition: winuser.h:1086

Referenced by GetUserObjectInformationW().

◆ NtUserGetOpenClipboardWindow()

HWND NTAPI NtUserGetOpenClipboardWindow ( VOID  )

Definition at line 601 of file clipboard.c.

602{
603 HWND hWnd = NULL;
604 PWINSTATION_OBJECT pWinStaObj;
605
607
608 pWinStaObj = IntGetWinStaForCbAccess();
609 if (!pWinStaObj)
610 goto cleanup;
611
612 if (pWinStaObj->spwndClipOpen)
613 hWnd = UserHMGetHandle(pWinStaObj->spwndClipOpen);
614
615 ObDereferenceObject(pWinStaObj);
616
617cleanup:
618 UserLeave();
619
620 return hWnd;
621}
PWND spwndClipOpen
Definition: winsta.h:26

Referenced by GetOpenClipboardWindow().

◆ NtUserGetPriorityClipboardFormat()

INT NTAPI NtUserGetPriorityClipboardFormat ( UINT paFormatPriorityList,
INT  cFormats 
)

Definition at line 823 of file clipboard.c.

824{
825 INT i, iRet = 0;
826 PWINSTATION_OBJECT pWinStaObj;
827
829
830 pWinStaObj = IntGetWinStaForCbAccess();
831 if (!pWinStaObj)
832 goto cleanup;
833
834 if (pWinStaObj->pClipBase == NULL)
835 {
836 iRet = 0;
837 }
838 else
839 {
841 {
842 ProbeForRead(paFormatPriorityList, cFormats * sizeof(UINT), sizeof(UINT));
843
844 iRet = -1;
845
846 for (i = 0; i < cFormats; ++i)
847 {
848 if (IntIsFormatAvailable(pWinStaObj, paFormatPriorityList[i]))
849 {
850 iRet = paFormatPriorityList[i];
851 break;
852 }
853 }
854 }
856 {
858 }
859 _SEH2_END;
860 }
861
862 ObDereferenceObject(pWinStaObj);
863
864cleanup:
865 UserLeave();
866
867 return iRet;
868
869}
PCLIP pClipBase
Definition: winsta.h:29
static BOOL FASTCALL IntIsFormatAvailable(PWINSTATION_OBJECT pWinStaObj, UINT fmt)
Definition: clipboard.c:55

Referenced by GetPriorityClipboardFormat().

◆ NtUserGetProcessWindowStation()

HWINSTA NTAPI NtUserGetProcessWindowStation ( VOID  )

Definition at line 1376 of file winsta.c.

1377{
1379}

Referenced by CreateDesktopW(), and GetProcessWindowStation().

◆ NtUserGetRawInputBuffer()

DWORD NTAPI NtUserGetRawInputBuffer ( PRAWINPUT  pData,
PUINT  pcbSize,
UINT  cbSizeHeader 
)

Definition at line 393 of file ntstubs.c.

397{
398 STUB;
399 return 0;
400}

◆ NtUserGetRawInputData()

DWORD NTAPI NtUserGetRawInputData ( HRAWINPUT  hRawInput,
UINT  uiCommand,
LPVOID  pData,
PUINT  pcbSize,
UINT  cbSizeHeader 
)

Definition at line 404 of file ntstubs.c.

410{
411 STUB;
412 return 0;
413}

◆ NtUserGetRawInputDeviceInfo()

DWORD NTAPI NtUserGetRawInputDeviceInfo ( HANDLE  hDevice,
UINT  uiCommand,
LPVOID  pData,
PUINT  pcbSize 
)

Definition at line 417 of file ntstubs.c.

423{
424 STUB;
425 return 0;
426}

Referenced by GetRawInputDeviceInfoA().

◆ NtUserGetRawInputDeviceList()

DWORD NTAPI NtUserGetRawInputDeviceList ( PRAWINPUTDEVICELIST  pRawInputDeviceList,
PUINT  puiNumDevices,
UINT  cbSize 
)

Definition at line 430 of file ntstubs.c.

434{
435 STUB;
436 return 0;
437}

◆ NtUserGetRegisteredRawInputDevices()

DWORD NTAPI NtUserGetRegisteredRawInputDevices ( PRAWINPUTDEVICE  pRawInputDevices,
PUINT  puiNumDevices,
UINT  cbSize 
)

Definition at line 441 of file ntstubs.c.

445{
446 STUB;
447 return 0;
448}

◆ NtUserGetScrollBarInfo()

BOOL NTAPI NtUserGetScrollBarInfo ( HWND  hWnd,
LONG  idObject,
PSCROLLBARINFO  psbi 
)

Definition at line 1142 of file scrollbar.c.

1143{
1145 SCROLLBARINFO sbi;
1146 PWND Window;
1147 BOOL Ret = FALSE;
1149
1150 TRACE("Enter NtUserGetScrollBarInfo\n");
1152
1153 Status = MmCopyFromCaller(&sbi, psbi, sizeof(SCROLLBARINFO));
1154 if(!NT_SUCCESS(Status) || (sbi.cbSize != sizeof(SCROLLBARINFO)))
1155 {
1157 goto Exit; // Return FALSE
1158 }
1159
1161 goto Exit; // Return FALSE
1162
1163 UserRefObjectCo(Window, &Ref);
1164 Ret = co_IntGetScrollBarInfo(Window, idObject, &sbi);
1166
1167 Status = MmCopyToCaller(psbi, &sbi, sizeof(SCROLLBARINFO));
1168 if(!NT_SUCCESS(Status))
1169 {
1171 Ret = FALSE;
1172 }
1173
1174Exit:
1175 TRACE("Leave NtUserGetScrollBarInfo, ret=%i\n", Ret);
1176 UserLeave();
1177 return Ret;
1178}
BOOL FASTCALL co_IntGetScrollBarInfo(PWND Window, LONG idObject, PSCROLLBARINFO psbi)
Definition: scrollbar.c:666

Referenced by GetScrollBarInfo(), IntGetScrollBarInfo(), and ScrollBarWndProc_common().

◆ NtUserGetSystemMenu()

HMENU NTAPI NtUserGetSystemMenu ( HWND  hWnd,
BOOL  bRevert 
)

Definition at line 5676 of file menu.c.

5677{
5678 PWND Window;
5679 PMENU Menu;
5680 HMENU Ret = NULL;
5681
5682 TRACE("Enter NtUserGetSystemMenu\n");
5684
5686 {
5687 goto Exit; // Return NULL
5688 }
5689
5690 if (!(Menu = IntGetSystemMenu(Window, bRevert)))
5691 {
5692 goto Exit; // Return NULL
5693 }
5694
5695 Ret = UserHMGetHandle(Menu);
5696
5697Exit:
5698 TRACE("Leave NtUserGetSystemMenu, ret=%p\n", Ret);
5699 UserLeave();
5700 return Ret;
5701}

Referenced by GetSystemMenu().

◆ NtUserGetThreadDesktop()

HDESK NTAPI NtUserGetThreadDesktop ( DWORD  dwThreadId,
HDESK  hConsoleDesktop 
)

Definition at line 3069 of file desktop.c.

3070{
3071 HDESK hDesk;
3073 PTHREADINFO pti;
3075 PDESKTOP DesktopObject;
3077
3079 TRACE("Enter NtUserGetThreadDesktop\n");
3080
3081 if (!dwThreadId)
3082 {
3084 hDesk = NULL;
3085 goto Quit;
3086 }
3087
3088 /* Validate the Win32 thread and retrieve its information */
3090 if (pti)
3091 {
3092 /* Get the desktop handle of the thread */
3093 hDesk = pti->hdesk;
3094 Process = pti->ppi->peProcess;
3095 }
3096 else if (hConsoleDesktop)
3097 {
3098 /*
3099 * The thread may belong to a console, so attempt to use the provided
3100 * console desktop handle as a fallback. Otherwise this means that the
3101 * thread is either not Win32 or invalid.
3102 */
3103 hDesk = hConsoleDesktop;
3105 }
3106 else
3107 {
3109 hDesk = NULL;
3110 goto Quit;
3111 }
3112
3113 if (!hDesk)
3114 {
3115 ERR("Desktop information of thread 0x%x broken!?\n", dwThreadId);
3116 goto Quit;
3117 }
3118
3120 {
3121 /*
3122 * Just return the handle, since we queried the desktop handle
3123 * of a thread running in the same context.
3124 */
3125 goto Quit;
3126 }
3127
3128 /*
3129 * We could just use the cached rpdesk instead of looking up the handle,
3130 * but it may actually be safer to validate the desktop and get a temporary
3131 * reference to it so that it does not disappear under us (e.g. when the
3132 * desktop is being destroyed) during the operation.
3133 */
3134 /*
3135 * Switch into the context of the thread we are trying to get
3136 * the desktop from, so we can use the handle.
3137 */
3138 KeAttachProcess(&Process->Pcb);
3140 0,
3142 UserMode,
3143 (PVOID*)&DesktopObject,
3146
3147 if (NT_SUCCESS(Status))
3148 {
3149 /*
3150 * Lookup our handle table if we can find a handle to the desktop object.
3151 * If not, create one.
3152 * QUESTION: Do we really need to create a handle in case it doesn't exist??
3153 */
3154 hDesk = IntGetDesktopObjectHandle(DesktopObject);
3155
3156 /* All done, we got a valid handle to the desktop */
3157 ObDereferenceObject(DesktopObject);
3158 }
3159 else
3160 {
3161 /* The handle could not be found, there is nothing to get... */
3162 hDesk = NULL;
3163 }
3164
3165 if (!hDesk)
3166 {
3167 ERR("Could not retrieve or access desktop for thread 0x%x\n", dwThreadId);
3169 }
3170
3171Quit:
3172 TRACE("Leave NtUserGetThreadDesktop, hDesk = 0x%p\n", hDesk);
3173 UserLeave();
3174 return hDesk;
3175}
HDESK FASTCALL IntGetDesktopObjectHandle(PDESKTOP DesktopObject)
Definition: desktop.c:1288
_In_ ACCESS_MASK _In_opt_ POBJECT_TYPE _In_ KPROCESSOR_MODE _Out_ PVOID _Out_opt_ POBJECT_HANDLE_INFORMATION HandleInformation
Definition: obfuncs.h:44

Referenced by GetThreadDesktop().

◆ NtUserGetThreadState()

DWORD_PTR NTAPI NtUserGetThreadState ( DWORD  Routine)

Definition at line 240 of file misc.c.

242{
243 DWORD_PTR ret = 0;
244 PTHREADINFO pti;
245
246 TRACE("Enter NtUserGetThreadState\n");
247 if (Routine != THREADSTATE_GETTHREADINFO)
248 {
250 }
251 else
252 {
254 }
255
257
258 switch (Routine)
259 {
261 ret = TRUE;
262 break;
265 break;
267 /* FIXME: Should use UserEnterShared */
269 break;
270 case THREADSTATE_PROGMANWINDOW: /* FIXME: Delete this HACK */
271 ret = (DWORD_PTR)GetW32ThreadInfo()->pDeskInfo->hProgmanWindow;
272 break;
273 case THREADSTATE_TASKMANWINDOW: /* FIXME: Delete this HACK */
274 ret = (DWORD_PTR)GetW32ThreadInfo()->pDeskInfo->hTaskManWindow;
275 break;
278 break;
280 {
283 TRACE("THREADSTATE_INSENDMESSAGE\n");
284
285 ret = ISMEX_NOSEND;
286 if (Message)
287 {
288 if (Message->ptiSender)
289 ret = ISMEX_SEND;
290 else
291 {
292 if (Message->CompletionCallback)
293 ret = ISMEX_CALLBACK;
294 else
295 ret = ISMEX_NOTIFY;
296 }
297 /* If ReplyMessage */
298 if (Message->QS_Flags & QS_SMRESULT) ret |= ISMEX_REPLIED;
299 }
300
301 break;
302 }
305 break;
306
308 pti->pcti->timeLastRead = EngGetTickCount32();
309 break;
310
313 break;
314
317 break;
319 ret = (DWORD_PTR) (GetW32ThreadInfo()->MessageQueue->CursorObject ?
320 UserHMGetHandle(GetW32ThreadInfo()->MessageQueue->CursorObject) : 0);
321 break;
324 break;
326 if (pti->spwndDefaultIme)
328 break;
330 if (pti->spDefaultImc)
332 break;
334 ret = pti->pcti->fsChangeBits;
335 break;
337 ret = pti->ppi->dwImeCompatFlags;
338 break;
340 ret = (ULONG_PTR)pti->hklPrev;
341 break;
344 break;
346 FIXME("stub\n");
347 break;
349 ret = (IntTID2PTI(UlongToHandle(pti->rpdesk->dwConsoleThreadId)) == pti);
350 break;
351 }
352
353 TRACE("Leave NtUserGetThreadState, ret=%lu\n", ret);
354 UserLeave();
355
356 return ret;
357}
static const WCHAR Message[]
Definition: register.c:74
#define ULONG_PTR
Definition: config.h:101
#define EngGetTickCount32()
Definition: eng.h:43
HWND FASTCALL IntGetThreadFocusWindow(VOID)
Definition: focus.c:41
HWND APIENTRY IntGetCapture(VOID)
Definition: focus.c:1443
HWND FASTCALL UserGetActiveWindow(VOID)
Definition: focus.c:1432
LPARAM FASTCALL MsqGetMessageExtraInfo(VOID)
Definition: msgqueue.c:2467
HANDLE NTAPI PsGetCurrentProcessId(VOID)
Definition: process.c:1123
HANDLE gpidLogon
Definition: simplecall.c:15
DWORD dwImeCompatFlags
Definition: win32.h:277
struct _DESKTOPINFO * pDeskInfo
Definition: win32.h:93
struct tagIMC * spDefaultImc
Definition: win32.h:132
HKL hklPrev
Definition: win32.h:133
struct _CLIENTTHREADINFO * pcti
Definition: win32.h:91
#define QS_SMRESULT
Definition: undocuser.h:95
PTHREADINFO GetW32ThreadInfo(VOID)
Definition: misc.c:807
#define QS_KEY
Definition: winuser.h:877
#define QS_SENDMESSAGE
Definition: winuser.h:883
#define QS_TIMER
Definition: winuser.h:881
#define QS_MOUSEBUTTON
Definition: winuser.h:879
#define QS_INPUT
Definition: winuser.h:902
#define QS_PAINT
Definition: winuser.h:882

Referenced by CheckThreadState(), DIALOG_CreateIndirect(), DoTest_BUTTON(), DoTest_EDIT(), GetActiveWindow(), GetCapture(), GetCursor(), GetFocus(), GetInputState(), GetMessageTime(), GetProgmanWindow(), GetTaskmanWindow(), GetW32ThreadInfo(), ImeWnd_OnImeSetContext(), Imm32CurrentPti(), Imm32ImeNonImeToggle(), Imm32InquireIme(), ImmCreateContext(), ImmDllInitialize(), ImmGetDefaultIMEWnd(), ImmGetSaveContext(), ImmLockClientImc(), ImmWINNLSEnableIME(), InSendMessage(), InSendMessageEx(), IsGUIThread(), NtUserxGetMessageExtraInfo(), and PeekMessageWorker().

◆ NtUserGetTitleBarInfo()

BOOLEAN NTAPI NtUserGetTitleBarInfo ( HWND  hwnd,
PTITLEBARINFO  pti 
)

Definition at line 5750 of file menu.c.

5753{
5754 PWND WindowObject;
5755 TITLEBARINFO bartitleinfo;
5756 BOOLEAN retValue = TRUE;
5757
5758 TRACE("Enter NtUserGetTitleBarInfo\n");
5760
5761 /* Vaildate the windows handle */
5762 if (!(WindowObject = UserGetWindowObject(hwnd)))
5763 {
5765 retValue = FALSE;
5766 }
5767
5768 _SEH2_TRY
5769 {
5770 /* Copy our usermode buffer bti to local buffer bartitleinfo */
5771 ProbeForRead(bti, sizeof(TITLEBARINFO), 1);
5772 RtlCopyMemory(&bartitleinfo, bti, sizeof(TITLEBARINFO));
5773 }
5775 {
5776 /* Fail copy the data */
5778 retValue = FALSE;
5779 }
5780 _SEH2_END
5781
5782 /* Get the tile bar info */
5783 if (retValue)
5784 {
5785 retValue = intGetTitleBarInfo(WindowObject, &bartitleinfo);
5786 if (retValue)
5787 {
5788 _SEH2_TRY
5789 {
5790 /* Copy our buffer to user mode buffer bti */
5791 ProbeForWrite(bti, sizeof(TITLEBARINFO), 1);
5792 RtlCopyMemory(bti, &bartitleinfo, sizeof(TITLEBARINFO));
5793 }
5795 {
5796 /* Fail copy the data */
5798 retValue = FALSE;
5799 }
5800 _SEH2_END
5801 }
5802 }
5803
5804 TRACE("Leave NtUserGetTitleBarInfo, ret=%u\n", retValue);
5805 UserLeave();
5806 return retValue;
5807}
BOOLEAN APIENTRY intGetTitleBarInfo(PWND pWindowObject, PTITLEBARINFO bti)
Definition: menu.c:4820

Referenced by GetTitleBarInfo(), and START_TEST().

◆ NtUserGetUpdateRect()

BOOL NTAPI NtUserGetUpdateRect ( HWND  hWnd,
LPRECT  lpRect,
BOOL  fErase 
)

Definition at line 1962 of file painting.c.

1963{
1964 PWND Window;
1965 RECTL Rect;
1967 BOOL Ret = FALSE;
1968
1969 TRACE("Enter NtUserGetUpdateRect\n");
1971
1973 {
1974 goto Exit; // Return FALSE
1975 }
1976
1977 Ret = co_UserGetUpdateRect(Window, &Rect, bErase);
1978
1979 if (UnsafeRect != NULL)
1980 {
1981 Status = MmCopyToCaller(UnsafeRect, &Rect, sizeof(RECTL));
1982 if (!NT_SUCCESS(Status))
1983 {
1985 Ret = FALSE;
1986 }
1987 }
1988
1989Exit:
1990 TRACE("Leave NtUserGetUpdateRect, ret=%i\n", Ret);
1991 UserLeave();
1992 return Ret;
1993}
BOOL FASTCALL co_UserGetUpdateRect(PWND Window, PRECT pRect, BOOL bErase)
Definition: painting.c:1863

Referenced by GetUpdateRect().

◆ NtUserGetUpdateRgn()

INT NTAPI NtUserGetUpdateRgn ( HWND  hWnd,
HRGN  hRgn,
BOOL  bErase 
)

Definition at line 1935 of file painting.c.

1936{
1937 PWND Window;
1938 INT ret = ERROR;
1939
1940 TRACE("Enter NtUserGetUpdateRgn\n");
1942
1944 if (Window)
1945 {
1946 ret = co_UserGetUpdateRgn(Window, hRgn, bErase);
1947 }
1948
1949 TRACE("Leave NtUserGetUpdateRgn, ret=%i\n", ret);
1950 UserLeave();
1951 return ret;
1952}
static HRGN hRgn
Definition: mapping.c:33
INT FASTCALL co_UserGetUpdateRgn(PWND Window, HRGN hRgn, BOOL bErase)
Definition: painting.c:1791

Referenced by GetUpdateRgn().

◆ NtUserGetWindowDC()

HDC NTAPI NtUserGetWindowDC ( HWND  hWnd)

Definition at line 1008 of file windc.c.

1009{
1011}

Referenced by GetWindowDC().

◆ NtUserGetWindowPlacement()

BOOL NTAPI NtUserGetWindowPlacement ( HWND  hWnd,
WINDOWPLACEMENT lpwndpl 
)

Definition at line 3417 of file winpos.c.

3419{
3420 PWND Wnd;
3421 WINDOWPLACEMENT Safepl;
3423 BOOL Ret = FALSE;
3424
3425 TRACE("Enter NtUserGetWindowPlacement\n");
3427
3428 if (!(Wnd = UserGetWindowObject(hWnd)))
3429 goto Exit; // Return FALSE
3430
3431 Status = MmCopyFromCaller(&Safepl, lpwndpl, sizeof(WINDOWPLACEMENT));
3432 if (!NT_SUCCESS(Status))
3433 {
3435 goto Exit; // Return FALSE
3436 }
3437
3438 // This function doesn't check the length. Just overwrite it
3439 Safepl.length = sizeof(WINDOWPLACEMENT);
3440
3441 IntGetWindowPlacement(Wnd, &Safepl);
3442
3443 Status = MmCopyToCaller(lpwndpl, &Safepl, sizeof(WINDOWPLACEMENT));
3444 if (!NT_SUCCESS(Status))
3445 {
3447 goto Exit; // Return FALSE
3448 }
3449
3450 Ret = TRUE;
3451
3452Exit:
3453 TRACE("Leave NtUserGetWindowPlacement, ret=%i\n", Ret);
3454 UserLeave();
3455 return Ret;
3456}

Referenced by GetWindowPlacement().

◆ NtUserGetWOWClass()

PCLS NTAPI NtUserGetWOWClass ( HINSTANCE  hInstance,
PUNICODE_STRING  ClassName 
)

Definition at line 2941 of file class.c.

2944{
2945 UNICODE_STRING SafeClassName;
2947 PCLS Class = NULL;
2948 RTL_ATOM ClassAtom = 0;
2950
2951 Status = ProbeAndCaptureUnicodeStringOrAtom(&SafeClassName, ClassName);
2952 if (!NT_SUCCESS(Status))
2953 {
2954 ERR("Error capturing the class name\n");
2956 return FALSE;
2957 }
2958
2960
2962
2963 ClassAtom = IntGetClassAtom(&SafeClassName,
2964 hInstance,
2965 pi,
2966 &Class,
2967 NULL);
2968 if (!ClassAtom)
2969 {
2971 }
2972
2973
2974 if (SafeClassName.Buffer && !IS_ATOM(SafeClassName.Buffer))
2975 ExFreePoolWithTag(SafeClassName.Buffer, TAG_STRING);
2976
2977 UserLeave();
2978//
2979// Don't forget to use DesktopPtrToUser( ? ) with return pointer in user space.
2980//
2981 return Class;
2982}
static refpint_t pi[]
Definition: server.c:96

Referenced by START_TEST().

◆ NtUserHardErrorControl()

DWORD NTAPI NtUserHardErrorControl ( DWORD  dwUnknown1,
DWORD  dwUnknown2,
DWORD  dwUnknown3 
)

Definition at line 452 of file ntstubs.c.

456{
457 STUB;
458 return 0;
459}

◆ NtUserHideCaret()

BOOL NTAPI NtUserHideCaret ( HWND  hWnd)

Definition at line 452 of file caret.c.

453{
454 PWND Window = NULL;
456 BOOL ret = FALSE;
457
458 TRACE("Enter NtUserHideCaret\n");
460
462 {
463 goto Exit; // Return FALSE
464 }
465
466 if (Window) UserRefObjectCo(Window, &Ref);
467
469
471
472Exit:
473 TRACE("Leave NtUserHideCaret, ret=%i\n", ret);
474 UserLeave();
475 return ret;
476}
BOOL FASTCALL co_UserHideCaret(PWND Window OPTIONAL)
Definition: caret.c:226

Referenced by HideCaret().

◆ NtUserHiliteMenuItem()

BOOL NTAPI NtUserHiliteMenuItem ( HWND  hWnd,
HMENU  hMenu,
UINT  uItemHilite,
UINT  uHilite 
)

Definition at line 6202 of file menu.c.

6207{
6208 PMENU Menu;
6209 PWND Window;
6210 BOOL Ret = FALSE;
6211
6212 TRACE("Enter NtUserHiliteMenuItem\n");
6214
6216 {
6218 goto Exit; // Return FALSE
6219 }
6220
6221 if(!(Menu = UserGetMenuObject(hMenu)))
6222 {
6224 goto Exit; // Return FALSE
6225 }
6226
6227 Ret = IntHiliteMenuItem(Window, Menu, uItemHilite, uHilite);
6228
6229Exit:
6230 TRACE("Leave NtUserHiliteMenuItem, ret=%i\n", Ret);
6231 UserLeave();
6232 return Ret;
6233}
BOOL FASTCALL IntHiliteMenuItem(PWND WindowObject, PMENU MenuObject, UINT uItemHilite, UINT uHilite)
Definition: menu.c:4794

◆ NtUserImpersonateDdeClientWindow()

BOOL NTAPI NtUserImpersonateDdeClientWindow ( HWND  hWndClient,
HWND  hWndServer 
)

Definition at line 454 of file dde.c.

457{
458 STUB
459
460 return 0;
461}

◆ NtUserInitialize()

NTSTATUS NTAPI NtUserInitialize ( DWORD  dwWinVersion,
HANDLE  hPowerRequestEvent,
HANDLE  hMediaRequestEvent 
)

Definition at line 171 of file ntuser.c.

175{
177
178 TRACE("Enter NtUserInitialize(%lx, %p, %p)\n",
179 dwWinVersion, hPowerRequestEvent, hMediaRequestEvent);
180
181 /* Check if we are already initialized */
182 if (gpepCSRSS)
183 return STATUS_UNSUCCESSFUL;
184
185 /* Check Windows USER subsystem version */
186 if (dwWinVersion != USER_VERSION)
187 {
188 /* No match, bugcheck */
189 KeBugCheckEx(WIN32K_INIT_OR_RIT_FAILURE, 0, 0, dwWinVersion, USER_VERSION);
190 }
191
192 /* Acquire exclusive lock */
194
195 /* Save the EPROCESS of CSRSS */
196 InitCsrProcess(/*PsGetCurrentProcess()*/);
197
198 /* Initialize Power Request List */
199 Status = IntInitWin32PowerManagement(hPowerRequestEvent);
200 if (!NT_SUCCESS(Status))
201 {
202 UserLeave();
203 return Status;
204 }
205
206// Initialize Media Change (use hMediaRequestEvent).
207
208 /* Initialize various GDI stuff (DirectX, fonts, language ID etc.) */
209 if (!InitializeGreCSRSS())
210 return STATUS_UNSUCCESSFUL;
211
212 /* Initialize USER */
214
215 /* Return */
216 UserLeave();
217 return Status;
218}
VOID InitCsrProcess(VOID)
Definition: csr.c:20
#define USER_VERSION
Definition: ntuser.h:1149
NTSTATUS NTAPI UserInitialize(VOID)
Definition: ntuser.c:116
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
Definition: rtlcompat.c:108
BOOL InitializeGreCSRSS(VOID)
Definition: init.c:79
NTSTATUS NTAPI IntInitWin32PowerManagement(_In_ HANDLE hPowerRequestEvent)
Initializes the power management side of Win32 kernel-mode subsystem component. This enables communic...
Definition: power.c:271

Referenced by CSR_SERVER_DLL_INIT().

◆ NtUserInitializeClientPfnArrays()

NTSTATUS NTAPI NtUserInitializeClientPfnArrays ( PPFNCLIENT  pfnClientA,
PPFNCLIENT  pfnClientW,
PPFNCLIENTWORKER  pfnClientWorker,
HINSTANCE  hmodUser 
)

Definition at line 101 of file ntstubs.c.

106{
108 TRACE("Enter NtUserInitializeClientPfnArrays User32 0x%p\n", hmodUser);
109
110 if (ClientPfnInit) return Status;
111
113
115 {
116 ProbeForRead( pfnClientA, sizeof(PFNCLIENT), 1);
117 ProbeForRead( pfnClientW, sizeof(PFNCLIENT), 1);
122
126
127 hModClient = hmodUser;
129 }
131 {
133 }
135
136 if (!NT_SUCCESS(Status))
137 {
138 ERR("Failed reading Client Pfns from user space.\n");
140 }
141
142 UserLeave();
143 return Status;
144}
BOOL ClientPfnInit
Definition: ntuser.c:26
static PFNCLIENT pfnClientA
Definition: regcontrol.c:15
static PFNCLIENT pfnClientW
Definition: regcontrol.c:16
static PFNCLIENTWORKER pfnClientWorker
Definition: regcontrol.c:17
PFNCLIENT apfnClientA
Definition: ntuser.h:1056
PFNCLIENT apfnClientW
Definition: ntuser.h:1057
WNDPROC aStoCidPfn[FNID_NUMSERVERPROC]
Definition: ntuser.h:1054
PFNCLIENTWORKER apfnClientWorker
Definition: ntuser.h:1058

Referenced by RegisterClientPFN().

◆ NtUserInitTask()

DWORD NTAPI NtUserInitTask ( DWORD  Unknown0,
DWORD  Unknown1,
DWORD  Unknown2,
DWORD  Unknown3,
DWORD  Unknown4,
DWORD  Unknown5,
DWORD  Unknown6,
DWORD  Unknown7,
DWORD  Unknown8,
DWORD  Unknown9,
DWORD  Unknown10,
DWORD  Unknown11 
)

Definition at line 148 of file ntstubs.c.

161{
162 STUB
163
164 return 0;
165}

◆ NtUserInternalGetWindowText()

INT NTAPI NtUserInternalGetWindowText ( HWND  hWnd,
LPWSTR  lpString,
INT  nMaxCount 
)

Definition at line 4592 of file window.c.

4593{
4594 PWND Wnd;
4596 INT Result = 0;
4597
4598 TRACE("Enter NtUserInternalGetWindowText\n");
4600
4601 if(lpString && (nMaxCount <= 1))
4602 {
4604 goto Exit; // Return 0
4605 }
4606
4607 if(!(Wnd = UserGetWindowObject(hWnd)))
4608 {
4609 goto Exit; // Return 0
4610 }
4611
4612 Result = Wnd->strName.Length / sizeof(WCHAR);
4613 if(lpString)
4614 {
4615 const WCHAR Terminator = L'\0';
4616 INT Copy;
4617 WCHAR *Buffer = (WCHAR*)lpString;
4618
4619 Copy = min(nMaxCount - 1, Result);
4620 if(Copy > 0)
4621 {
4622 Status = MmCopyToCaller(Buffer, Wnd->strName.Buffer, Copy * sizeof(WCHAR));
4623 if(!NT_SUCCESS(Status))
4624 {
4626 Result = 0;
4627 goto Exit;
4628 }
4629 Buffer += Copy;
4630 }
4631
4632 Status = MmCopyToCaller(Buffer, &Terminator, sizeof(WCHAR));
4633 if(!NT_SUCCESS(Status))
4634 {
4636 Result = 0;
4637 goto Exit;
4638 }
4639
4640 Result = Copy;
4641 }
4642
4643Exit:
4644 TRACE("Leave NtUserInternalGetWindowText, ret=%i\n", Result);
4645 UserLeave();
4646 return Result;
4647}
Definition: bufpool.h:45
VOID Copy(PVOID Src, PVOID Dst, ULONG NumBytes)
Definition: mmixer.c:126
_In_ int nMaxCount
Definition: winuser.h:4880

Referenced by GetWindowTextA(), GetWindowTextW(), and InternalGetWindowText().

◆ NtUserInvalidateRect()

BOOL NTAPI NtUserInvalidateRect ( HWND  hWnd,
CONST RECT lpRect,
BOOL  bErase 
)

Definition at line 2542 of file painting.c.

2546{
2547 UINT flags = RDW_INVALIDATE | (bErase ? RDW_ERASE : 0);
2548 if (!hWnd)
2549 {
2551 lpUnsafeRect = NULL;
2552 }
2553 return NtUserRedrawWindow(hWnd, lpUnsafeRect, NULL, flags);
2554}
GLbitfield flags
Definition: glext.h:7161
BOOL APIENTRY NtUserRedrawWindow(HWND hWnd, CONST RECT *lprcUpdate, HRGN hrgnUpdate, UINT flags)
Definition: painting.c:2003
#define RDW_ERASE
Definition: winuser.h:1214
#define RDW_ERASENOW
Definition: winuser.h:1222
#define RDW_FRAME
Definition: winuser.h:1215
#define RDW_INVALIDATE
Definition: winuser.h:1217

Referenced by ComboWndProc_common(), and InvalidateRect().

◆ NtUserInvalidateRgn()

BOOL NTAPI NtUserInvalidateRgn ( HWND  hWnd,
HRGN  hRgn,
BOOL  bErase 
)

Definition at line 2558 of file painting.c.

2562{
2563 if (!hWnd)
2564 {
2566 return FALSE;
2567 }
2568 return NtUserRedrawWindow(hWnd, NULL, hRgn, RDW_INVALIDATE | (bErase? RDW_ERASE : 0));
2569}

Referenced by InvalidateRgn().

◆ NtUserIsClipboardFormatAvailable()

BOOL NTAPI NtUserIsClipboardFormatAvailable ( UINT  format)

Definition at line 872 of file clipboard.c.

873{
874 BOOL bRet = FALSE;
875 PWINSTATION_OBJECT pWinStaObj;
876
877 TRACE("NtUserIsClipboardFormatAvailable(%x)\n", fmt);
878
880
881 pWinStaObj = IntGetWinStaForCbAccess();
882 if (!pWinStaObj)
883 goto cleanup;
884
885 if (IntIsFormatAvailable(pWinStaObj, fmt))
886 bRet = TRUE;
887
888 ObDereferenceObject(pWinStaObj);
889
890cleanup:
891 UserLeave();
892
893 return bRet;
894}

Referenced by IsClipboardFormatAvailable().

◆ NtUserKillTimer()

BOOL NTAPI NtUserKillTimer ( HWND  hWnd,
UINT_PTR  uIDEvent 
)

Definition at line 661 of file timer.c.

666{
667 PWND Window = NULL;
668 BOOL ret;
669
670 TRACE("Enter NtUserKillTimer\n");
673
674 ret = IntKillTimer(Window, uIDEvent, FALSE);
675
676 UserLeave();
677
678 TRACE("Leave NtUserKillTimer, ret=%i\n", ret);
679 return ret;
680}

Referenced by KillTimer().

◆ NtUserLoadKeyboardLayoutEx()

HKL NTAPI NtUserLoadKeyboardLayoutEx ( IN HANDLE  hFile,
IN DWORD  offTable,
IN PVOID  pTables,
IN HKL  hOldKL,
IN PUNICODE_STRING  puszKLID,
IN DWORD  dwNewKL,
IN UINT  Flags 
)

Definition at line 1161 of file kbdlayout.c.

1169{
1170 HKL hRetKL;
1172 UNICODE_STRING uszSafeKLID;
1173 PWINSTATION_OBJECT pWinSta;
1174 HANDLE hSafeFile;
1175
1176 UNREFERENCED_PARAMETER(offTable);
1177 UNREFERENCED_PARAMETER(pTables);
1178
1181 KLF_RESET|KLF_SHIFTLOCK))
1182 {
1183 ERR("Invalid flags: %x\n", Flags);
1185 return NULL;
1186 }
1187
1188 RtlInitEmptyUnicodeString(&uszSafeKLID, Buffer, sizeof(Buffer));
1189 _SEH2_TRY
1190 {
1191 ProbeForRead(puszKLID, sizeof(*puszKLID), 1);
1192 ProbeForRead(puszKLID->Buffer, sizeof(puszKLID->Length), 1);
1193 RtlCopyUnicodeString(&uszSafeKLID, puszKLID);
1194 }
1196 {
1198 _SEH2_YIELD(return NULL);
1199 }
1200 _SEH2_END;
1201
1203
1204 hSafeFile = (hFile ? IntVerifyKeyboardFileHandle(hFile) : NULL);
1206 hRetKL = co_IntLoadKeyboardLayoutEx(pWinSta,
1207 hSafeFile,
1208 hOldKL,
1209 &uszSafeKLID,
1210 UlongToHandle(dwNewKL),
1211 Flags);
1212 if (hSafeFile)
1213 ZwClose(hSafeFile);
1214
1215 UserLeave();
1216 return hRetKL;
1217}
_In_ HANDLE hFile
Definition: mswsock.h:90
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
HKL APIENTRY co_IntLoadKeyboardLayoutEx(IN OUT PWINSTATION_OBJECT pWinSta, IN HANDLE hSafeFile, IN HKL hOldKL, IN PUNICODE_STRING puszSafeKLID, IN HKL hNewKL, IN UINT Flags)
Definition: kbdlayout.c:885
HANDLE FASTCALL IntVerifyKeyboardFileHandle(HANDLE hFile)
Definition: kbdlayout.c:963
#define KLF_SETFORPROCESS
Definition: winuser.h:117
#define KLF_REPLACELANG
Definition: winuser.h:115
#define KLF_ACTIVATE
Definition: winuser.h:111
#define KLF_REORDER
Definition: winuser.h:114
#define KLF_SUBSTITUTE_OK
Definition: winuser.h:112
#define KLF_NOTELLSHELL
Definition: winuser.h:116
#define KLF_UNLOADPREVIOUS
Definition: winuser.h:113

Referenced by IntLoadKeyboardLayout().

◆ NtUserLockWindowStation()

BOOL NTAPI NtUserLockWindowStation ( HWINSTA  hWindowStation)

Definition at line 1541 of file winsta.c.

1542{
1545
1546 TRACE("About to set process window station with handle (%p)\n",
1547 hWindowStation);
1548
1550 {
1551 ERR("Unauthorized process attempted to lock the window station!\n");
1553 return FALSE;
1554 }
1555
1556 Status = IntValidateWindowStationHandle(hWindowStation,
1557 UserMode,
1558 0,
1559 &Object,
1560 NULL);
1561 if (!NT_SUCCESS(Status))
1562 {
1563 TRACE("Validation of window station handle (%p) failed\n",
1564 hWindowStation);
1566 return FALSE;
1567 }
1568
1569 Object->Flags |= WSS_LOCKED;
1570
1572 return TRUE;
1573}
#define WSS_LOCKED
Definition: winsta.h:7

Referenced by LockWindowStation().

◆ NtUserLockWindowUpdate()

BOOL NTAPI NtUserLockWindowUpdate ( HWND  hWnd)

Definition at line 912 of file ntstubs.c.

913{
914 STUB;
915 return FALSE;
916}

Referenced by LockWindowUpdate().

◆ NtUserLockWorkStation()

BOOL NTAPI NtUserLockWorkStation ( VOID  )

Definition at line 1972 of file winsta.c.

1973{
1974 BOOL ret;
1976
1978
1979 if (pti->rpdesk == IntGetActiveDesktop())
1980 {
1982 }
1983 else
1984 {
1985 ret = FALSE;
1986 }
1987
1988 UserLeave();
1989
1990 return ret;
1991}
#define LN_LOCK_WORKSTATION
Definition: undocuser.h:118

Referenced by LockWorkStation().

◆ NtUserMapVirtualKeyEx()

UINT NTAPI NtUserMapVirtualKeyEx ( UINT  keyCode,
UINT  transType,
DWORD  keyboardId,
HKL  dwhkl 
)

Definition at line 1439 of file keyboard.c.

1440{
1441 PKBDTABLES pKbdTbl = NULL;
1442 UINT ret = 0;
1443
1444 TRACE("Enter NtUserMapVirtualKeyEx\n");
1446
1447 if (!dwhkl)
1448 {
1449 PTHREADINFO pti;
1450
1452 if (pti && pti->KeyboardLayout)
1453 pKbdTbl = pti->KeyboardLayout->spkf->pKbdTbl;
1454 }
1455 else
1456 {
1457 PKL pKl;
1458
1459 pKl = UserHklToKbl(dwhkl);
1460 if (pKl)
1461 pKbdTbl = pKl->spkf->pKbdTbl;
1462 }
1463
1464 if (pKbdTbl)
1465 ret = IntMapVirtualKeyEx(uCode, uType, pKbdTbl);
1466
1467 UserLeave();
1468 TRACE("Leave NtUserMapVirtualKeyEx, ret=%u\n", ret);
1469 return ret;
1470}
struct _KBDTABLES * pKbdTbl
Definition: input.h:21
PKL NTAPI UserHklToKbl(HKL hKl)
Definition: kbdlayout.c:539
static UINT IntMapVirtualKeyEx(UINT uCode, UINT Type, PKBDTABLES pKbdTbl)
Definition: keyboard.c:1393

Referenced by MapVirtualKeyExA(), MapVirtualKeyExW(), and MapVirtualKeyW().

◆ NtUserMenuItemFromPoint()

int NTAPI NtUserMenuItemFromPoint ( HWND  hWnd,
HMENU  hMenu,
DWORD  X,
DWORD  Y 
)

Definition at line 6297 of file menu.c.

6302{
6303 PMENU Menu;
6304 PWND Window = NULL;
6305 PITEM mi;
6306 ULONG i;
6307 int Ret = -1;
6308
6309 TRACE("Enter NtUserMenuItemFromPoint\n");
6311
6312 if (!(Menu = UserGetMenuObject(hMenu)))
6313 {
6314 goto Exit; // Return -1
6315 }
6316
6317 if (!(Window = UserGetWindowObject(Menu->hWnd)))
6318 {
6319 goto Exit; // Return -1
6320 }
6321
6322 X -= Window->rcWindow.left;
6323 Y -= Window->rcWindow.top;
6324
6325 mi = Menu->rgItems;
6326 for (i = 0; i < Menu->cItems; i++, mi++)
6327 {
6328 RECTL Rect;
6329
6330 Rect.left = mi->xItem;
6331 Rect.top = mi->yItem;
6332 Rect.right = mi->cxItem;
6333 Rect.bottom = mi->cyItem;
6334
6336
6337 if (RECTL_bPointInRect(&Rect, X, Y))
6338 {
6339 break;
6340 }
6341 }
6342
6343 Ret = (mi ? i : NO_SELECTED_ITEM);
6344
6345Exit:
6346 TRACE("Leave NtUserMenuItemFromPoint, ret=%i\n", Ret);
6347 UserLeave();
6348 return Ret;
6349}
#define Y(I)
#define NO_SELECTED_ITEM
Definition: ntuser.h:413
static MONITORINFO mi
Definition: win.c:7338
HWND hWnd
Definition: ntuser.h:437
VOID FASTCALL MENU_AdjustMenuItemRect(PMENU menu, PRECTL rect)
Definition: menu.c:1462

◆ NtUserMessageCall()

BOOL NTAPI NtUserMessageCall ( HWND  hWnd,
UINT  Msg,
WPARAM  wParam,
LPARAM  lParam,
ULONG_PTR  ResultInfo,
DWORD  dwType,
BOOL  Ansi 
)

Definition at line 2540 of file message.c.

2547{
2548 LRESULT lResult = 0;
2549 BOOL Ret = FALSE;
2550 PWND Window = NULL;
2552
2554
2555 switch(dwType)
2556 {
2557 case FNID_SCROLLBAR:
2558 {
2559 lResult = ScrollBarWndProc(hWnd, Msg, wParam, lParam);
2560 break;
2561 }
2562 case FNID_DESKTOP:
2563 {
2565 if (Window)
2566 {
2567 //ERR("FNID_DESKTOP IN\n");
2568 Ret = DesktopWindowProc(Window, Msg, wParam, lParam, &lResult);
2569 //ERR("FNID_DESKTOP OUT\n");
2570 }
2571 break;
2572 }
2573 case FNID_MENU:
2574 {
2576 if (Window)
2577 {
2578 Ret = PopupMenuWndProc( Window, Msg, wParam, lParam, &lResult);
2579 }
2580 break;
2581 }
2582 case FNID_MESSAGEWND:
2583 {
2585 if (Window)
2586 {
2587 Ret = !UserMessageWindowProc(Window, Msg, wParam, lParam, &lResult);
2588 }
2589 break;
2590 }
2591 case FNID_DEFWINDOWPROC:
2592 /* Validate input */
2593 if (hWnd)
2594 {
2596 if (!Window)
2597 {
2598 UserLeave();
2599 return FALSE;
2600 }
2601 UserRefObjectCo(Window, &Ref);
2602 }
2603 lResult = IntDefWindowProc(Window, Msg, wParam, lParam, Ansi);
2604 Ret = TRUE;
2605 if (hWnd)
2607 break;
2610 break;
2612 {
2613 BROADCASTPARM parm, *retparam;
2614 DWORD_PTR RetVal = 0;
2615
2616 if (ResultInfo)
2617 {
2618 _SEH2_TRY
2619 {
2620 ProbeForWrite((PVOID)ResultInfo, sizeof(BROADCASTPARM), 1);
2621 RtlCopyMemory(&parm, (PVOID)ResultInfo, sizeof(BROADCASTPARM));
2622 }
2624 {
2625 _SEH2_YIELD(break);
2626 }
2627 _SEH2_END;
2628 }
2629 else
2630 break;
2631
2632 if ( parm.recipients & BSM_ALLDESKTOPS ||
2634 {
2635 PLIST_ENTRY DesktopEntry;
2636 PDESKTOP rpdesk;
2637 HWND *List, hwndDenied = NULL;
2638 HDESK hDesk = NULL;
2639 PWND pwnd, pwndDesk;
2640 ULONG i;
2641 UINT fuFlags;
2642
2643 for (DesktopEntry = InputWindowStation->DesktopListHead.Flink;
2644 DesktopEntry != &InputWindowStation->DesktopListHead;
2645 DesktopEntry = DesktopEntry->Flink)
2646 {
2647 rpdesk = CONTAINING_RECORD(DesktopEntry, DESKTOP, ListEntry);
2648 pwndDesk = rpdesk->pDeskInfo->spwnd;
2649 List = IntWinListChildren(pwndDesk);
2650
2651 if (parm.flags & BSF_QUERY)
2652 {
2653 if (List != NULL)
2654 {
2655 if (parm.flags & BSF_FORCEIFHUNG || parm.flags & BSF_NOHANG)
2656 {
2657 fuFlags = SMTO_ABORTIFHUNG;
2658 }
2659 else if (parm.flags & BSF_NOTIMEOUTIFNOTHUNG)
2660 {
2661 fuFlags = SMTO_NOTIMEOUTIFNOTHUNG;
2662 }
2663 else
2664 {
2665 fuFlags = SMTO_NORMAL;
2666 }
2668 Msg,
2669 wParam,
2670 lParam,
2671 fuFlags,
2672 2000,
2673 &RetVal);
2674 Ret = TRUE;
2675 for (i = 0; List[i]; i++)
2676 {
2677 pwnd = UserGetWindowObject(List[i]);
2678 if (!pwnd) continue;
2679
2680 if ( pwnd->fnid == FNID_MENU ||
2682 continue;
2683
2684 if ( parm.flags & BSF_IGNORECURRENTTASK )
2685 {
2686 if ( pwnd->head.pti == gptiCurrent )
2687 continue;
2688 }
2690 Msg,
2691 wParam,
2692 lParam,
2693 fuFlags,
2694 2000,
2695 &RetVal);
2696
2697 if (!RetVal && EngGetLastError() == ERROR_TIMEOUT)
2698 {
2699 if (!(parm.flags & BSF_FORCEIFHUNG))
2700 Ret = FALSE;
2701 }
2702 if (RetVal == BROADCAST_QUERY_DENY)
2703 {
2704 hwndDenied = List[i];
2705 hDesk = UserHMGetHandle(pwndDesk);
2706 Ret = FALSE;
2707 }
2708 }
2710 _SEH2_TRY
2711 {
2712 retparam = (PBROADCASTPARM) ResultInfo;
2713 retparam->hDesk = hDesk;
2714 retparam->hWnd = hwndDenied;
2715 }
2717 {
2718 _SEH2_YIELD(break);
2719 }
2720 _SEH2_END;
2721 if (!Ret) break; // Have a hit! Let everyone know!
2722 }
2723 }
2724 else if (parm.flags & BSF_POSTMESSAGE)
2725 {
2726 if (List != NULL)
2727 {
2729
2730 for (i = 0; List[i]; i++)
2731 {
2732 pwnd = UserGetWindowObject(List[i]);
2733 if (!pwnd) continue;
2734
2735 if ( pwnd->fnid == FNID_MENU ||
2737 continue;
2738
2739 if ( parm.flags & BSF_IGNORECURRENTTASK )
2740 {
2741 if ( pwnd->head.pti == gptiCurrent )
2742 continue;
2743 }
2745 }
2747 }
2748 Ret = TRUE;
2749 }
2750 else
2751 {
2752 if (List != NULL)
2753 {
2755
2756 for (i = 0; List[i]; i++)
2757 {
2758 pwnd = UserGetWindowObject(List[i]);
2759 if (!pwnd) continue;
2760
2761 if ( pwnd->fnid == FNID_MENU ||
2763 continue;
2764
2765 if ( parm.flags & BSF_IGNORECURRENTTASK )
2766 {
2767 if ( pwnd->head.pti == gptiCurrent )
2768 continue;
2769 }
2771 }
2773 }
2774 if (lParam && !wParam && _wcsicmp((WCHAR*)lParam, L"Environment") == 0)
2775 {
2776 /* Handle Broadcast of WM_SETTINGCHAGE for Environment */
2778 0, (LPARAM)L"Environment", 0);
2779 }
2780 Ret = TRUE;
2781 }
2782 }
2783 }
2784 else if (parm.recipients & BSM_APPLICATIONS)
2785 {
2786 HWND *List, hwndDenied = NULL;
2787 HDESK hDesk = NULL;
2788 PWND pwnd, pwndDesk;
2789 ULONG i;
2790 UINT fuFlags;
2791
2792 pwndDesk = UserGetDesktopWindow();
2793 List = IntWinListChildren(pwndDesk);
2794
2795 if (parm.flags & BSF_QUERY)
2796 {
2797 if (List != NULL)
2798 {
2799 if (parm.flags & BSF_FORCEIFHUNG || parm.flags & BSF_NOHANG)
2800 {
2801 fuFlags = SMTO_ABORTIFHUNG;
2802 }
2803 else if (parm.flags & BSF_NOTIMEOUTIFNOTHUNG)
2804 {
2805 fuFlags = SMTO_NOTIMEOUTIFNOTHUNG;
2806 }
2807 else
2808 {
2809 fuFlags = SMTO_NORMAL;
2810 }
2812 Msg,
2813 wParam,
2814 lParam,
2815 fuFlags,
2816 2000,
2817 &RetVal);
2818 Ret = TRUE;
2819 for (i = 0; List[i]; i++)
2820 {
2821 pwnd = UserGetWindowObject(List[i]);
2822 if (!pwnd) continue;
2823
2824 if ( pwnd->fnid == FNID_MENU ||
2826 continue;
2827
2828 if ( parm.flags & BSF_IGNORECURRENTTASK )
2829 {
2830 if ( pwnd->head.pti == gptiCurrent )
2831 continue;
2832 }
2834 Msg,
2835 wParam,
2836 lParam,
2837 fuFlags,
2838 2000,
2839 &RetVal);
2840
2841 if (!RetVal && EngGetLastError() == ERROR_TIMEOUT)
2842 {
2843 if (!(parm.flags & BSF_FORCEIFHUNG))
2844 Ret = FALSE;
2845 }
2846 if (RetVal == BROADCAST_QUERY_DENY)
2847 {
2848 hwndDenied = List[i];
2849 hDesk = UserHMGetHandle(pwndDesk);
2850 Ret = FALSE;
2851 }
2852 }
2854 _SEH2_TRY
2855 {
2856 retparam = (PBROADCASTPARM) ResultInfo;
2857 retparam->hDesk = hDesk;
2858 retparam->hWnd = hwndDenied;
2859 }
2861 {
2862 _SEH2_YIELD(break);
2863 }
2864 _SEH2_END;
2865 }
2866 }
2867 else if (parm.flags & BSF_POSTMESSAGE)
2868 {
2869 if (List != NULL)
2870 {
2872
2873 for (i = 0; List[i]; i++)
2874 {
2875 pwnd = UserGetWindowObject(List[i]);
2876 if (!pwnd) continue;
2877
2878 if ( pwnd->fnid == FNID_MENU ||
2880 continue;
2881
2882 if ( parm.flags & BSF_IGNORECURRENTTASK )
2883 {
2884 if ( pwnd->head.pti == gptiCurrent )
2885 continue;
2886 }
2888 }
2890 }
2891 Ret = TRUE;
2892 }
2893 else
2894 {
2895 if (List != NULL)
2896 {
2898
2899 for (i = 0; List[i]; i++)
2900 {
2901 pwnd = UserGetWindowObject(List[i]);
2902 if (!pwnd) continue;
2903
2904 if ( pwnd->fnid == FNID_MENU ||
2906 continue;
2907
2908 if ( parm.flags & BSF_IGNORECURRENTTASK )
2909 {
2910 if ( pwnd->head.pti == gptiCurrent )
2911 continue;
2912 }
2914 }
2916 }
2917 Ret = TRUE;
2918 }
2919 }
2920 }
2921 break;
2923 {
2924 CALL_BACK_INFO CallBackInfo;
2925 ULONG_PTR uResult;
2926
2927 _SEH2_TRY
2928 {
2929 ProbeForRead((PVOID)ResultInfo, sizeof(CALL_BACK_INFO), 1);
2930 RtlCopyMemory(&CallBackInfo, (PVOID)ResultInfo, sizeof(CALL_BACK_INFO));
2931 }
2933 {
2934 _SEH2_YIELD(break);
2935 }
2936 _SEH2_END;
2937
2939 {
2941 break;
2942 }
2943
2945 CallBackInfo.CallBack, CallBackInfo.Context, &uResult)))
2946 {
2947 ERR("Callback failure!\n");
2948 }
2949 }
2950 break;
2951 case FNID_SENDMESSAGE:
2952 {
2953 lResult = co_IntDoSendMessage(hWnd, Msg, wParam, lParam, 0);
2954 Ret = TRUE;
2955
2956 if (ResultInfo)
2957 {
2958 _SEH2_TRY
2959 {
2960 ProbeForWrite((PVOID)ResultInfo, sizeof(ULONG_PTR), 1);
2961 RtlCopyMemory((PVOID)ResultInfo, &lResult, sizeof(ULONG_PTR));
2962 }
2964 {
2965 Ret = FALSE;
2966 _SEH2_YIELD(break);
2967 }
2968 _SEH2_END;
2969 }
2970 break;
2971 }
2972 case FNID_SENDMESSAGEFF:
2974 {
2975 DOSENDMESSAGE dsm, *pdsm = (PDOSENDMESSAGE)ResultInfo;
2976 if (ResultInfo)
2977 {
2978 _SEH2_TRY
2979 {
2980 ProbeForRead(pdsm, sizeof(DOSENDMESSAGE), 1);
2981 RtlCopyMemory(&dsm, pdsm, sizeof(DOSENDMESSAGE));
2982 }
2984 {
2985 _SEH2_YIELD(break);
2986 }
2987 _SEH2_END;
2988 }
2989
2990 Ret = co_IntDoSendMessage( hWnd, Msg, wParam, lParam, pdsm ? &dsm : NULL );
2991
2992 if (pdsm)
2993 {
2994 _SEH2_TRY
2995 {
2996 ProbeForWrite(pdsm, sizeof(DOSENDMESSAGE), 1);
2997 RtlCopyMemory(pdsm, &dsm, sizeof(DOSENDMESSAGE));
2998 }
3000 {
3001 Ret = FALSE;
3002 _SEH2_YIELD(break);
3003 }
3004 _SEH2_END;
3005 }
3006 break;
3007 }
3008 // CallNextHook bypass.
3009 case FNID_CALLWNDPROC:
3011 {
3012 PTHREADINFO pti;
3014 PHOOK NextObj, Hook;
3015
3016 pti = GetW32ThreadInfo();
3017
3018 Hook = pti->sphkCurrent;
3019
3020 if (!Hook) break;
3021
3022 NextObj = Hook->phkNext;
3023 ClientInfo = pti->pClientInfo;
3024 _SEH2_TRY
3025 {
3026 ClientInfo->phkCurrent = NextObj;
3027 }
3029 {
3030 ClientInfo = NULL;
3031 }
3032 _SEH2_END;
3033
3034 if (!ClientInfo || !NextObj) break;
3035
3036 NextObj->phkNext = IntGetNextHook(NextObj);
3037
3038 if ( Hook->HookId == WH_CALLWNDPROC)
3039 {
3040 CWPSTRUCT CWP;
3041 CWP.hwnd = hWnd;
3042 CWP.message = Msg;
3043 CWP.wParam = wParam;
3044 CWP.lParam = lParam;
3045 TRACE("WH_CALLWNDPROC: Hook %p NextHook %p\n", Hook, NextObj);
3046
3047 lResult = co_IntCallHookProc( Hook->HookId,
3048 HC_ACTION,
3049 ((ClientInfo->CI_flags & CI_CURTHPRHOOK) ? 1 : 0),
3050 (LPARAM)&CWP,
3051 Hook->Proc,
3052 Hook->ihmod,
3053 Hook->offPfn,
3054 Hook->Ansi,
3055 &Hook->ModuleName);
3056 }
3057 else
3058 {
3059 CWPRETSTRUCT CWPR;
3060 CWPR.hwnd = hWnd;
3061 CWPR.message = Msg;
3062 CWPR.wParam = wParam;
3063 CWPR.lParam = lParam;
3064 CWPR.lResult = ClientInfo->dwHookData;
3065
3066 lResult = co_IntCallHookProc( Hook->HookId,
3067 HC_ACTION,
3068 ((ClientInfo->CI_flags & CI_CURTHPRHOOK) ? 1 : 0),
3069 (LPARAM)&CWPR,
3070 Hook->Proc,
3071 Hook->ihmod,
3072 Hook->offPfn,
3073 Hook->Ansi,
3074 &Hook->ModuleName);
3075 }
3076 }
3077 break;
3078 }
3079
3080 switch(dwType)
3081 {
3082 case FNID_DEFWINDOWPROC:
3083 case FNID_CALLWNDPROC:
3085 case FNID_SCROLLBAR:
3086 case FNID_DESKTOP:
3087 case FNID_MENU:
3088 if (ResultInfo)
3089 {
3090 _SEH2_TRY
3091 {
3092 ProbeForWrite((PVOID)ResultInfo, sizeof(LRESULT), 1);
3093 RtlCopyMemory((PVOID)ResultInfo, &lResult, sizeof(LRESULT));
3094 }
3096 {
3097 Ret = FALSE;
3098 }
3099 _SEH2_END;
3100 }
3101 break;
3102 default:
3103 break;
3104 }
3105
3106 UserLeave();
3107
3108 return Ret;
3109}
#define BSF_POSTMESSAGE
Definition: dbt.h:58
#define BSF_NOTIMEOUTIFNOTHUNG
Definition: dbt.h:57
#define BSF_NOHANG
Definition: dbt.h:56
#define BSF_IGNORECURRENTTASK
Definition: dbt.h:55
#define BSF_QUERY
Definition: dbt.h:59
#define BSM_APPLICATIONS
Definition: dbt.h:48
#define BSF_FORCEIFHUNG
Definition: dbt.h:54
#define BSM_ALLDESKTOPS
Definition: dbt.h:49
#define BSM_ALLCOMPONENTS
Definition: dbt.h:47
#define FNID_SENDMESSAGEFF
Definition: ntuser.h:883
#define FNID_SCROLLBAR
Definition: ntuser.h:859
#define FNID_DEFWINDOWPROC
Definition: ntuser.h:863
#define FNID_DESKTOP
Definition: ntuser.h:862
#define FNID_SENDMESSAGECALLBACK
Definition: ntuser.h:890
#define FNID_SENDMESSAGEWTOOPTION
Definition: ntuser.h:885
#define FNID_CALLWNDPROCRET
Definition: ntuser.h:877
#define FNID_CALLWNDPROC
Definition: ntuser.h:876
#define ICLS_SWITCH
Definition: ntuser.h:932
#define CI_CURTHPRHOOK
Definition: ntuser.h:304
struct tagDOSENDMESSAGE * PDOSENDMESSAGE
#define FNID_SENDMESSAGE
Definition: ntuser.h:882
struct _BROADCASTPARM * PBROADCASTPARM
#define FNID_BROADCASTSYSTEMMESSAGE
Definition: ntuser.h:887
#define FNID_MESSAGEWND
Definition: ntuser.h:864
#define FNID_SENDNOTIFYMESSAGE
Definition: ntuser.h:889
LRESULT FASTCALL IntDefWindowProc(PWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL Ansi)
Definition: defwnd.c:587
PWINSTATION_OBJECT InputWindowStation
Definition: winsta.c:21
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
DWORD recipients
Definition: ntuser.h:1109
DWORD flags
Definition: ntuser.h:1108
HDESK hDesk
Definition: ntuser.h:1110
SENDASYNCPROC CallBack
Definition: callback.h:45
ULONG_PTR Context
Definition: callback.h:46
struct _WND * spwnd
Definition: ntuser.h:137
LIST_ENTRY DesktopListHead
Definition: winsta.h:19
WPARAM wParam
Definition: winuser.h:3022
LRESULT lResult
Definition: winuser.h:3020
LPARAM lParam
Definition: winuser.h:3021
LPARAM lParam
Definition: winuser.h:3028
WPARAM wParam
Definition: winuser.h:3029
UINT message
Definition: winuser.h:3030
INT_PTR ihmod
Definition: ntuser.h:245
HOOKPROC Proc
Definition: ntuser.h:250
ULONG_PTR offPfn
Definition: ntuser.h:243
int HookId
Definition: ntuser.h:242
UNICODE_STRING ModuleName
Definition: ntuser.h:252
LRESULT APIENTRY co_IntCallHookProc(INT HookId, INT Code, WPARAM wParam, LPARAM lParam, HOOKPROC Proc, INT Mod, ULONG_PTR offPfn, BOOLEAN Ansi, PUNICODE_STRING ModuleName)
Definition: callback.c:508
BOOL FASTCALL DesktopWindowProc(PWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT *lResult)
Definition: desktop.c:1456
BOOL FASTCALL UserMessageWindowProc(PWND pwnd, UINT Msg, WPARAM wParam, LPARAM lParam, LRESULT *lResult)
Definition: desktop.c:1542
BOOL WINAPI PopupMenuWndProc(PWND Wnd, UINT Message, WPARAM wParam, LPARAM lParam, LRESULT *lResult)
Definition: menu.c:4647
static int is_pointer_message(UINT message, WPARAM wparam)
Definition: message.c:120
static LRESULT FASTCALL co_IntDoSendMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, PDOSENDMESSAGE dsm)
Definition: message.c:2004
LRESULT FASTCALL co_IntSendMessageWithCallBack(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, SENDASYNCPROC CompletionCallback, ULONG_PTR CompletionCallbackContext, ULONG_PTR *uResult)
Definition: message.c:1785
BOOL FASTCALL UserSendNotifyMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: message.c:2090
LRESULT FASTCALL co_IntSendMessageTimeout(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, UINT uFlags, UINT uTimeout, ULONG_PTR *uResult)
Definition: message.c:1707
LRESULT APIENTRY ScrollBarWndProc(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: scrollbar.c:1123
ENGAPI ULONG APIENTRY EngGetLastError(VOID)
Definition: error.c:9
#define ERROR_MESSAGE_SYNC_ONLY
Definition: winerror.h:681
#define ERROR_TIMEOUT
Definition: winerror.h:941
#define HWND_BROADCAST
Definition: winuser.h:1207
#define HC_ACTION
Definition: winuser.h:48
#define WM_SETTINGCHANGE
Definition: winuser.h:1632
#define SMTO_ABORTIFHUNG
Definition: winuser.h:1226
#define BROADCAST_QUERY_DENY
Definition: winuser.h:178
#define SMTO_NORMAL
Definition: winuser.h:1228
#define WH_CALLWNDPROC
Definition: winuser.h:34

Referenced by CallNextHookEx(), DefWndHandleSysCommand(), DesktopWndProcW(), IntBroadcastSystemMessage(), IntScrollCreateScrollBar(), MenuWindowProcA(), MenuWindowProcW(), PopupMenuWndProcW(), SendMessageA(), SendMessageCallbackA(), SendMessageCallbackW(), SendMessageTimeoutA(), SendMessageTimeoutW(), SendMessageW(), SendNotifyMessageW(), and User32DefWindowProc().

◆ NtUserMinMaximize()

DWORD NTAPI NtUserMinMaximize ( HWND  hWnd,
UINT  cmd,
BOOL  Hide 
)

Definition at line 3460 of file winpos.c.

3464{
3465 PWND pWnd;
3466
3467 TRACE("Enter NtUserMinMaximize\n");
3469
3470 pWnd = UserGetWindowObject(hWnd);
3471 if (!pWnd || UserIsDesktopWindow(pWnd) || UserIsMessageWindow(pWnd))
3472 {
3473 goto Exit;
3474 }
3475
3476 if ( cmd > SW_MAX || pWnd->state2 & WNDS2_INDESTROY)
3477 {
3479 goto Exit;
3480 }
3481
3482 cmd |= Hide ? SW_HIDE : 0;
3483
3484 co_WinPosShowWindow(pWnd, cmd);
3485
3486Exit:
3487 TRACE("Leave NtUserMinMaximize\n");
3488 UserLeave();
3489 return 0; // Always NULL?
3490}
#define WNDS2_INDESTROY
Definition: ntuser.h:648
BOOLEAN FASTCALL co_WinPosShowWindow(PWND Wnd, INT Cmd)
Definition: winpos.c:2594
DWORD state2
Definition: ntuser.h:702
Definition: ftp_var.h:139
#define SW_HIDE
Definition: winuser.h:771
#define SW_MAX
Definition: winuser.h:785

◆ NtUserMNDragLeave()

DWORD NTAPI NtUserMNDragLeave ( VOID  )

Definition at line 169 of file ntstubs.c.

170{
171 STUB
172
173 return 0;
174}

◆ NtUserMNDragOver()

DWORD NTAPI NtUserMNDragOver ( DWORD  Unknown0,
DWORD  Unknown1 
)

Definition at line 178 of file ntstubs.c.

181{
182 STUB
183
184 return 0;
185}

◆ NtUserModifyUserStartupInfoFlags()

DWORD NTAPI NtUserModifyUserStartupInfoFlags ( DWORD  Unknown0,
DWORD  Unknown1 
)

Definition at line 189 of file ntstubs.c.

192{
193 STUB
194
195 return 0;
196}

◆ NtUserMonitorFromPoint()

HMONITOR NTAPI NtUserMonitorFromPoint ( IN POINT  point,
IN DWORD  dwFlags 
)

Definition at line 827 of file monitor.c.

830{
831 RECTL rc;
832 HMONITOR hMonitor = NULL;
833
834 /* Check if flags are valid */
835 if (dwFlags != MONITOR_DEFAULTTONULL &&
836 dwFlags != MONITOR_DEFAULTTOPRIMARY &&
837 dwFlags != MONITOR_DEFAULTTONEAREST)
838 {
840 return NULL;
841 }
842
843 /* Fill rect (bottom-right exclusive) */
844 rc.left = pt.x;
845 rc.right = pt.x + 1;
846 rc.top = pt.y;
847 rc.bottom = pt.y + 1;
848
850
851 /* Find intersecting monitor */
852 IntGetMonitorsFromRect(&rc, &hMonitor, NULL, 1, dwFlags);
853
854 UserLeave();
855 return hMonitor;
856}
long bottom
Definition: polytest.cpp:53
long right
Definition: polytest.cpp:53
long top
Definition: polytest.cpp:53
long left
Definition: polytest.cpp:53
static UINT IntGetMonitorsFromRect(OPTIONAL IN LPCRECTL pRect, OPTIONAL OUT HMONITOR *phMonitorList, OPTIONAL OUT PRECTL prcMonitorList, OPTIONAL IN DWORD dwListSize, OPTIONAL IN DWORD dwFlags)
Definition: monitor.c:310

Referenced by MonitorFromPoint().

◆ NtUserMonitorFromRect()

HMONITOR NTAPI NtUserMonitorFromRect ( IN LPCRECT  pRect,
IN DWORD  dwFlags 
)

Referenced by MonitorFromRect().

◆ NtUserMonitorFromWindow()

HMONITOR NTAPI NtUserMonitorFromWindow ( IN HWND  hWnd,
IN DWORD  dwFlags 
)

Definition at line 967 of file monitor.c.

970{
971 PWND pWnd;
972 HMONITOR hMonitor = NULL;
973 RECTL Rect = {0, 0, 0, 0};
974
975 TRACE("Enter NtUserMonitorFromWindow\n");
976
977 /* Check if flags are valid */
978 if (dwFlags != MONITOR_DEFAULTTONULL &&
979 dwFlags != MONITOR_DEFAULTTOPRIMARY &&
980 dwFlags != MONITOR_DEFAULTTONEAREST)
981 {
983 return NULL;
984 }
985
987
988 /* If window is given, use it first */
989 if (hWnd)
990 {
991 /* Get window object */
993 if (!pWnd)
994 goto cleanup;
995
996 /* Find only monitors which have intersection with given window */
997 Rect.left = Rect.right = pWnd->rcWindow.left;
998 Rect.top = Rect.bottom = pWnd->rcWindow.bottom;
999 }
1000
1001 /* Find monitors now */
1002 IntGetMonitorsFromRect(&Rect, &hMonitor, NULL, 1, dwFlags);
1003
1004cleanup:
1005 TRACE("Leave NtUserMonitorFromWindow, ret=%p\n", hMonitor);
1006 UserLeave();
1007 return hMonitor;
1008}
RECT rcWindow
Definition: ntuser.h:716

Referenced by MonitorFromWindow().

◆ NtUserMoveWindow()

BOOL NTAPI NtUserMoveWindow ( HWND  hWnd,
int  X,
int  Y,
int  nWidth,
int  nHeight,
BOOL  bRepaint 
)

Definition at line 3496 of file winpos.c.

3503{
3504 return NtUserSetWindowPos(hWnd, 0, X, Y, nWidth, nHeight,
3505 (bRepaint ? SWP_NOZORDER | SWP_NOACTIVATE :
3507}
BOOL APIENTRY NtUserSetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags)
Definition: winpos.c:3533

Referenced by MoveWindow().

◆ NtUserNotifyIMEStatus()

DWORD NTAPI NtUserNotifyIMEStatus ( HWND  hwnd,
BOOL  fOpen,
DWORD  dwConversion 
)

Definition at line 803 of file ime.c.

804{
805 PWND pwnd;
806 PTHREADINFO pti;
807 HKL hKL;
808
810
811 if (!IS_IMM_MODE())
812 {
813 ERR("!IS_IMM_MODE()\n");
814 goto Quit;
815 }
816
817 pwnd = ValidateHwndNoErr(hwnd);
818 if (!pwnd)
819 goto Quit;
820
821 pti = pwnd->head.pti;
822 if (!pti || !gptiForeground)
823 goto Quit;
825 goto Quit;
826 if (ghIMC == pwnd->hImc && gfImeOpen == !!fOpen && gdwImeConversion == dwConversion)
827 goto Quit;
828
829 ghIMC = pwnd->hImc;
830 if (ghIMC)
831 {
832 gfImeOpen = !!fOpen;
833 gdwImeConversion = dwConversion;
834 UserSetImeConversionKeyState(pti, (fOpen ? dwConversion : IME_CMODE_ALPHANUMERIC));
835 }
836
837 if (ISITHOOKED(WH_SHELL))
838 {
839 hKL = (pti->KeyboardLayout ? pti->KeyboardLayout->hkl : NULL);
840 co_HOOK_CallHooks(WH_SHELL, HSHELL_LANGUAGE, (WPARAM)hwnd, (LPARAM)hKL);
841 }
842
843 // TODO:
844
845Quit:
846 UserLeave();
847 return 0;
848}
#define ISITHOOKED(HookId)
Definition: hook.h:6
#define IME_CMODE_ALPHANUMERIC
Definition: imm.h:336
HIMC hImc
Definition: ntuser.h:740
PTHREADINFO gptiForeground
Definition: focus.c:15
HIMC ghIMC
Definition: ime.c:26
DWORD gdwImeConversion
Definition: ime.c:28
static VOID FASTCALL UserSetImeConversionKeyState(PTHREADINFO pti, DWORD dwConversion)
Definition: ime.c:744
BOOL gfImeOpen
Definition: ime.c:27
#define WH_SHELL
Definition: winuser.h:40

Referenced by ImeWnd_OnImeNotify(), Imm32SendNotificationProc(), ImmSetActiveContext(), ImmSetConversionStatus(), and ImmSetOpenStatus().

◆ NtUserNotifyProcessCreate()

BOOL NTAPI NtUserNotifyProcessCreate ( HANDLE  NewProcessId,
HANDLE  ParentThreadId,
ULONG  dwUnknown,
ULONG  CreateFlags 
)

Definition at line 463 of file ntstubs.c.

468{
469 // STUB;
470 TRACE("NtUserNotifyProcessCreate is UNIMPLEMENTED\n");
471 return FALSE;
472}

Referenced by CSR_SERVER_DLL_INIT().

◆ NtUserNotifyWinEvent()

VOID NTAPI NtUserNotifyWinEvent ( DWORD  Event,
HWND  hWnd,
LONG  idObject,
LONG  idChild 
)

Definition at line 254 of file event.c.

259{
260 PWND Window = NULL;
263
264 /* Validate input */
265 if (hWnd && (hWnd != INVALID_HANDLE_VALUE))
266 {
268 if (!Window)
269 {
270 UserLeave();
271 return;
272 }
273 }
274
276 {
277 if (Window) UserRefObjectCo(Window, &Ref);
278 IntNotifyWinEvent( Event, Window, idObject, idChild, WEF_SETBYWNDPTI);
280 }
281 UserLeave();
282}
#define WEF_SETBYWNDPTI
Definition: ntuser.h:236
DWORD dwInstalledEventHooks
Definition: ntuser.h:1071
static DWORD FASTCALL GetMaskFromEvent(DWORD Event)
Definition: event.c:26

Referenced by NotifyWinEvent().

◆ NtUserOpenClipboard()

BOOL NTAPI NtUserOpenClipboard ( HWND  hWnd,
DWORD  Unknown1 
)

Definition at line 533 of file clipboard.c.

534{
535 BOOL bRet;
536
538 bRet = UserOpenClipboard(hWnd);
539 UserLeave();
540
541 return bRet;
542}
BOOL NTAPI UserOpenClipboard(HWND hWnd)
Definition: clipboard.c:488

Referenced by OpenClipboard().

◆ NtUserOpenDesktop()

HDESK NTAPI NtUserOpenDesktop ( POBJECT_ATTRIBUTES  ObjectAttributes,
DWORD  dwFlags,
ACCESS_MASK  dwDesiredAccess 
)

Definition at line 2624 of file desktop.c.

2628{
2630 HDESK Desktop;
2631
2635 UserMode,
2636 NULL,
2637 dwDesiredAccess,
2638 NULL,
2639 (HANDLE*)&Desktop);
2640
2641 if (!NT_SUCCESS(Status))
2642 {
2643 ERR("Failed to open desktop\n");
2645 return NULL;
2646 }
2647
2648 TRACE("Opened desktop %S with handle 0x%p\n", ObjectAttributes->ObjectName->Buffer, Desktop);
2649
2650 return Desktop;
2651}
NTSTATUS NTAPI ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, IN PACCESS_STATE PassedAccessState, IN ACCESS_MASK DesiredAccess, IN OUT PVOID ParseContext, OUT PHANDLE Handle)
Definition: obhandle.c:2532

Referenced by OpenDesktopW().

◆ NtUserOpenInputDesktop()

HDESK NTAPI NtUserOpenInputDesktop ( DWORD  dwFlags,
BOOL  fInherit,
ACCESS_MASK  dwDesiredAccess 
)

Definition at line 2718 of file desktop.c.

2722{
2723 HDESK hdesk;
2724
2726 TRACE("Enter NtUserOpenInputDesktop gpdeskInputDesktop 0x%p\n", gpdeskInputDesktop);
2727
2728 hdesk = UserOpenInputDesktop(dwFlags, fInherit, dwDesiredAccess);
2729
2730 TRACE("NtUserOpenInputDesktop returning 0x%p\n", hdesk);
2731 UserLeave();
2732 return hdesk;
2733}
HDESK UserOpenInputDesktop(DWORD dwFlags, BOOL fInherit, ACCESS_MASK dwDesiredAccess)
Definition: desktop.c:2653
PDESKTOP gpdeskInputDesktop
Definition: desktop.c:52

Referenced by OpenInputDesktop().

◆ NtUserOpenWindowStation()

HWINSTA NTAPI NtUserOpenWindowStation ( POBJECT_ATTRIBUTES  ObjectAttributes,
ACCESS_MASK  dwDesiredAccess 
)

◆ NtUserPaintDesktop()

BOOL NTAPI NtUserPaintDesktop ( HDC  hDC)

Definition at line 2815 of file desktop.c.

2816{
2817 BOOL Ret;
2818
2820 TRACE("Enter NtUserPaintDesktop\n");
2821
2822 Ret = IntPaintDesktop(hDC);
2823
2824 TRACE("Leave NtUserPaintDesktop, ret=%i\n", Ret);
2825 UserLeave();
2826 return Ret;
2827}
BOOL FASTCALL IntPaintDesktop(HDC hDC)
Definition: desktop.c:1852

Referenced by PaintDesktop().

◆ NtUserPaintMenuBar()

DWORD NTAPI NtUserPaintMenuBar ( HWND  hWnd,
HDC  hDC,
ULONG  left,
ULONG  right,
ULONG  top,
BOOL  bActive 
)

Definition at line 6354 of file menu.c.

6361{
6362 PWND Window;
6363 RECT Rect;
6364 DWORD ret;
6365
6367
6369 {
6371 UserLeave();
6372 return 0;
6373 }
6374
6375 Rect.left = leftBorder;
6376 Rect.right = Window->rcWindow.right - Window->rcWindow.left - rightBorder;
6377 Rect.top = top;
6378 Rect.bottom = 0;
6379
6381
6382 UserLeave();
6383
6384 return ret;
6385}

◆ NtUserPeekMessage()

BOOL APIENTRY NtUserPeekMessage ( PMSG  pMsg,
HWND  hWnd,
UINT  MsgFilterMin,
UINT  MsgFilterMax,
UINT  RemoveMsg 
)

Definition at line 2391 of file message.c.

2396{
2397 MSG Msg;
2398 BOOL Ret;
2399
2400 if ( RemoveMsg & PM_BADMSGFLAGS )
2401 {
2403 return FALSE;
2404 }
2405
2407
2408 RtlZeroMemory(&Msg, sizeof(MSG));
2409
2410 Ret = co_IntGetPeekMessage(&Msg, hWnd, MsgFilterMin, MsgFilterMax, RemoveMsg, FALSE);
2411
2412 UserLeave();
2413
2414 if (Ret)
2415 {
2416 _SEH2_TRY
2417 {
2418 ProbeForWrite(pMsg, sizeof(MSG), 1);
2419 RtlCopyMemory(pMsg, &Msg, sizeof(MSG));
2420 }
2422 {
2424 Ret = FALSE;
2425 }
2426 _SEH2_END;
2427 }
2428
2429 return Ret;
2430}
#define PM_BADMSGFLAGS
Definition: message.c:14

Referenced by PeekMessageWorker().

◆ NtUserPostMessage()

BOOL NTAPI NtUserPostMessage ( HWND  hWnd,
UINT  Msg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 2279 of file message.c.

2283{
2284 BOOL ret;
2285
2287
2289
2290 UserLeave();
2291
2292 return ret;
2293}

Referenced by PostMessageA(), and PostMessageW().

◆ NtUserPostThreadMessage()

BOOL NTAPI NtUserPostThreadMessage ( DWORD  idThread,
UINT  Msg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 2296 of file message.c.

2300{
2301 BOOL ret = FALSE;
2302 PETHREAD peThread;
2303 PTHREADINFO pThread;
2305
2307
2308 Status = PsLookupThreadByThreadId(UlongToHandle(idThread), &peThread);
2309
2310 if ( Status == STATUS_SUCCESS )
2311 {
2312 pThread = (PTHREADINFO)peThread->Tcb.Win32Thread;
2313 if( !pThread ||
2314 !pThread->MessageQueue ||
2315 (pThread->TIF_flags & TIF_INCLEANUP))
2316 {
2317 ObDereferenceObject( peThread );
2318 goto exit;
2319 }
2320 ret = UserPostThreadMessage( pThread, Msg, wParam, lParam);
2321 ObDereferenceObject( peThread );
2322 }
2323 else
2324 {
2326 }
2327exit:
2328 UserLeave();
2329 return ret;
2330}
#define TIF_INCLEANUP
Definition: ntuser.h:263
#define exit(n)
Definition: config.h:202
BOOL FASTCALL UserPostThreadMessage(PTHREADINFO pti, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: message.c:1358

Referenced by PostThreadMessageA(), and PostThreadMessageW().

◆ NtUserPrintWindow()

BOOL NTAPI NtUserPrintWindow ( HWND  hwnd,
HDC  hdcBlt,
UINT  nFlags 
)

Definition at line 2573 of file painting.c.

2577{
2578 PWND Window;
2579 BOOL Ret = FALSE;
2580
2582
2583 if (hwnd)
2584 {
2585 if (!(Window = UserGetWindowObject(hwnd)) ||
2587 {
2588 goto Exit;
2589 }
2590
2591 if ( Window )
2592 {
2593 /* Validate flags and check it as a mask for 0 or 1. */
2594 if ( (nFlags & PW_CLIENTONLY) == nFlags)
2595 Ret = IntPrintWindow( Window, hdcBlt, nFlags);
2596 else
2598 }
2599 }
2600Exit:
2601 UserLeave();
2602 return Ret;
2603}
BOOL FASTCALL IntPrintWindow(PWND pwnd, HDC hdcBlt, UINT nFlags)
Definition: painting.c:1259

◆ NtUserProcessConnect()

NTSTATUS NTAPI NtUserProcessConnect ( IN HANDLE  ProcessHandle,
OUT PUSERCONNECT  pUserConnect,
IN ULONG  Size 
)

Definition at line 476 of file ntstubs.c.

480{
483 PPROCESSINFO W32Process;
484
485 TRACE("NtUserProcessConnect\n");
486
487 if (pUserConnect == NULL ||
488 Size != sizeof(*pUserConnect))
489 {
490 return STATUS_UNSUCCESSFUL;
491 }
492
493 /* Get the process object the user handle was referencing */
497 UserMode,
498 (PVOID*)&Process,
499 NULL);
500 if (!NT_SUCCESS(Status)) return Status;
501
503
504 /* Get Win32 process information */
505 W32Process = PsGetProcessWin32Process(Process);
506
508 {
509 UINT i;
510
511 // FIXME: Check that pUserConnect->ulVersion == USER_VERSION;
512 // FIXME: Check the value of pUserConnect->dwDispatchCount.
513
514 ProbeForWrite(pUserConnect, sizeof(*pUserConnect), sizeof(PVOID));
515
516 // FIXME: Instead of assuming that the mapping of the heap desktop
517 // also holds there, we **MUST** create and map instead the shared
518 // section! Its client base must be stored in W32Process->pClientBase.
519 // What is currently done (ReactOS-specific only), is that within the
520 // IntUserHeapCommitRoutine()/MapGlobalUserHeap() routines we assume
521 // it's going to be also called early, so that we manually add a very
522 // first memory mapping that corresponds to the "global user heap",
523 // and that we use instead of a actual win32 "shared USER section"
524 // (see slide 29 of https://paper.bobylive.com/Meeting_Papers/BlackHat/USA-2011/BH_US_11_Mandt_win32k_Slides.pdf )
525
526 pUserConnect->siClient.ulSharedDelta =
529
530#define SERVER_TO_CLIENT(ptr) \
531 ((PVOID)((ULONG_PTR)ptr - pUserConnect->siClient.ulSharedDelta))
532
533 ASSERT(gpsi);
535
536 pUserConnect->siClient.psi = SERVER_TO_CLIENT(gpsi);
537 pUserConnect->siClient.aheList = SERVER_TO_CLIENT(gHandleTable);
538 pUserConnect->siClient.pDispInfo = NULL;
539
540 // NOTE: kernel server should also have a SHAREDINFO gSharedInfo;
541 // FIXME: These USER window-proc data should be used somehow!
542
543 pUserConnect->siClient.DefWindowMsgs.maxMsgs = 0;
544 pUserConnect->siClient.DefWindowMsgs.abMsgs = NULL;
545 pUserConnect->siClient.DefWindowSpecMsgs.maxMsgs = 0;
546 pUserConnect->siClient.DefWindowSpecMsgs.abMsgs = NULL;
547
548 for (i = 0; i < ARRAYSIZE(pUserConnect->siClient.awmControl); ++i)
549 {
550 pUserConnect->siClient.awmControl[i].maxMsgs = 0;
551 pUserConnect->siClient.awmControl[i].abMsgs = NULL;
552 }
553#undef SERVER_TO_CLIENT
554 }
556 {
558 }
559 _SEH2_END;
560
561 if (!NT_SUCCESS(Status))
563
564 UserLeave();
565
566 /* Dereference the process object */
568
569 return Status;
570}
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define PROCESS_VM_OPERATION
Definition: pstypes.h:161
_In_ HANDLE ProcessHandle
Definition: mmfuncs.h:403
PVOID NTAPI PsGetProcessWin32Process(PEPROCESS Process)
Definition: process.c:1193
#define SERVER_TO_CLIENT(ptr)
W32HEAP_USER_MAPPING HeapMappings
Definition: win32.h:291
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533

Referenced by ClientThreadSetupHelper(), Init(), START_TEST(), and UserClientConnect().

◆ NtUserQueryInformationThread()

NTSTATUS NTAPI NtUserQueryInformationThread ( IN HANDLE  ThreadHandle,
IN USERTHREADINFOCLASS  ThreadInformationClass,
OUT PVOID  ThreadInformation,
IN ULONG  ThreadInformationLength 
)

Definition at line 574 of file ntstubs.c.

578{
581
582 /* Allow only CSRSS to perform this operation */
585
587
588 /* Get the Thread */
589 Status = ObReferenceObjectByHandle(ThreadHandle,
592 UserMode,
593 (PVOID)&Thread,
594 NULL);
595 if (!NT_SUCCESS(Status)) goto Quit;
596
598 {
599 default:
600 {
601 STUB;
603 break;
604 }
605 }
606
608
609Quit:
610 UserLeave();
611 return Status;
612}
#define THREAD_QUERY_INFORMATION
Definition: pstypes.h:150
_In_ THREADINFOCLASS ThreadInformationClass
Definition: psfuncs.h:840
POBJECT_TYPE PsThreadType
Definition: thread.c:20

◆ NtUserQueryInputContext()

DWORD_PTR NTAPI NtUserQueryInputContext ( HIMC  hIMC,
DWORD  dwType 
)

Definition at line 1791 of file ime.c.

1792{
1793 PIMC pIMC;
1794 PTHREADINFO ptiIMC;
1795 DWORD_PTR ret = 0;
1796
1798
1799 if (!IS_IMM_MODE())
1800 goto Quit;
1801
1803 if (!pIMC)
1804 goto Quit;
1805
1806 ptiIMC = pIMC->head.pti;
1807
1808 switch (dwType)
1809 {
1810 case QIC_INPUTPROCESSID:
1811 ret = (DWORD_PTR)PsGetThreadProcessId(ptiIMC->pEThread);
1812 break;
1813
1814 case QIC_INPUTTHREADID:
1815 ret = (DWORD_PTR)PsGetThreadId(ptiIMC->pEThread);
1816 break;
1817
1819 if (ptiIMC->spwndDefaultIme)
1821 break;
1822
1823 case QIC_DEFAULTIMC:
1824 if (ptiIMC->spDefaultImc)
1826 break;
1827 }
1828
1829Quit:
1830 UserLeave();
1831 return ret;
1832}
HANDLE NTAPI PsGetThreadId(IN PETHREAD Thread)
Definition: thread.c:705
HANDLE NTAPI PsGetThreadProcessId(IN PETHREAD Thread)
Definition: thread.c:745
THRDESKHEAD head
Definition: ntuser.h:200
@ QIC_DEFAULTWINDOWIME
Definition: undocuser.h:400
@ QIC_DEFAULTIMC
Definition: undocuser.h:401
@ QIC_INPUTTHREADID
Definition: undocuser.h:399
@ QIC_INPUTPROCESSID
Definition: undocuser.h:398

Referenced by CtfImmGenerateMessage(), CtfImmGetGuidAtom(), CtfImmIsGuidMapEnable(), CtfImmTIMCreateInputContext(), Imm32CheckImcProcess(), Imm32GetImeMenuItemWInterProcess(), Imm32InternalLockIMC(), Imm32IsCrossThreadAccess(), Imm32MakeIMENotify(), ImmGetImeMenuItemsAW(), and ImmSetCompositionStringAW().

◆ NtUserQuerySendMessage()

DWORD NTAPI NtUserQuerySendMessage ( DWORD  Unknown0)

Definition at line 919 of file ntstubs.c.

920{
921 STUB;
922
923 return 0;
924}

◆ NtUserQueryUserCounters()

DWORD NTAPI NtUserQueryUserCounters ( DWORD  Unknown0,
DWORD  Unknown1,
DWORD  Unknown2,
DWORD  Unknown3,
DWORD  Unknown4 
)

Definition at line 200 of file ntstubs.c.

206{
207 STUB
208
209 return 0;
210}

◆ NtUserQueryWindow()

DWORD_PTR NTAPI NtUserQueryWindow ( HWND  hWnd,
DWORD  Index 
)

Definition at line 4194 of file window.c.

4195{
4196/* Console Leader Process CID Window offsets */
4197#define GWLP_CONSOLE_LEADER_PID 0
4198#define GWLP_CONSOLE_LEADER_TID 4
4199
4200 DWORD_PTR Result = 0;
4201 PWND pWnd, pwndActive;
4202 PTHREADINFO pti, ptiActive;
4203
4204 TRACE("Enter NtUserQueryWindow\n");
4206
4207 if (!(pWnd = UserGetWindowObject(hWnd)))
4208 {
4209 goto Exit; // Return 0
4210 }
4211
4212 switch(Index)
4213 {
4215 {
4216 if ( (pWnd->head.pti->TIF_flags & TIF_CSRSSTHREAD) &&
4218 {
4219 // IntGetWindowLong(offset == GWLP_CONSOLE_LEADER_PID)
4220 Result = (DWORD_PTR)(*((LONG_PTR*)((PCHAR)(pWnd + 1) + GWLP_CONSOLE_LEADER_PID)));
4221 }
4222 else
4223 {
4225 }
4226 break;
4227 }
4228
4230 {
4231 if ( (pWnd->head.pti->TIF_flags & TIF_CSRSSTHREAD) &&
4233 {
4234 // IntGetWindowLong(offset == GWLP_CONSOLE_LEADER_TID)
4235 Result = (DWORD_PTR)(*((LONG_PTR*)((PCHAR)(pWnd + 1) + GWLP_CONSOLE_LEADER_TID)));
4236 }
4237 else
4238 {
4240 }
4241 break;
4242 }
4243
4245 Result = (DWORD_PTR)(pWnd->head.pti->MessageQueue->spwndActive ? UserHMGetHandle(pWnd->head.pti->MessageQueue->spwndActive) : 0);
4246 break;
4247
4248 case QUERY_WINDOW_FOCUS:
4249 Result = (DWORD_PTR)(pWnd->head.pti->MessageQueue->spwndFocus ? UserHMGetHandle(pWnd->head.pti->MessageQueue->spwndFocus) : 0);
4250 break;
4251
4253 Result = (pWnd->fnid == FNID_GHOST) || MsqIsHung(pWnd->head.pti, MSQ_HUNG);
4254 break;
4255
4257 Result = (DWORD_PTR)pWnd->head.pti->pEThread->Cid.UniqueProcess;
4258 break;
4259
4261 Result = (pWnd->head.pti->MessageQueue == gpqForeground);
4262 break;
4263
4264 case QUERY_WINDOW_DEFAULT_IME: /* default IME window */
4265 if (pWnd->head.pti->spwndDefaultIme)
4266 Result = (DWORD_PTR)UserHMGetHandle(pWnd->head.pti->spwndDefaultIme);
4267 break;
4268
4269 case QUERY_WINDOW_DEFAULT_ICONTEXT: /* default input context handle */
4270 if (pWnd->head.pti->spDefaultImc)
4271 Result = (DWORD_PTR)UserHMGetHandle(pWnd->head.pti->spDefaultImc);
4272 break;
4273
4276 {
4277 pwndActive = gpqForeground->spwndActive;
4279 if (pti->rpdesk == pwndActive->head.rpdesk)
4280 {
4281 ptiActive = pwndActive->head.pti;
4282 if (ptiActive->spwndDefaultIme)
4284 }
4285 }
4286 break;
4287 }
4288
4289Exit:
4290 TRACE("Leave NtUserQueryWindow, ret=%u\n", Result);
4291 UserLeave();
4292 return Result;
4293}
#define QUERY_WINDOW_DEFAULT_ICONTEXT
Definition: ntuser.h:2835
#define QUERY_WINDOW_UNIQUE_THREAD_ID
Definition: ntuser.h:2828
#define QUERY_WINDOW_ACTIVE_IME
Definition: ntuser.h:2836
#define TIF_CSRSSTHREAD
Definition: ntuser.h:266
#define QUERY_WINDOW_FOCUS
Definition: ntuser.h:2830
#define QUERY_WINDOW_ACTIVE
Definition: ntuser.h:2829
#define QUERY_WINDOW_REAL_ID
Definition: ntuser.h:2832
#define QUERY_WINDOW_FOREGROUND
Definition: ntuser.h:2833
#define FNID_GHOST
Definition: ntuser.h:875
#define QUERY_WINDOW_UNIQUE_PROCESS_ID
Definition: ntuser.h:2827
#define QUERY_WINDOW_ISHUNG
Definition: ntuser.h:2831
#define QUERY_WINDOW_DEFAULT_IME
Definition: ntuser.h:2834
#define PCHAR
Definition: match.c:90
BOOL FASTCALL MsqIsHung(PTHREADINFO pti, DWORD TimeOut)
Definition: msgqueue.c:2149
#define MSQ_HUNG
Definition: msgqueue.h:3
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
char * PCHAR
Definition: typedefs.h:51
#define GWLP_CONSOLE_LEADER_PID
#define GWLP_CONSOLE_LEADER_TID
#define IntGetWndThreadId(WndObj)
Definition: window.h:35
#define IntGetWndProcessId(WndObj)
Definition: window.h:38

Referenced by DIALOG_CreateIndirect(), GetRealWindowOwner(), GetWindowThreadProcessId(), ImeWnd_OnImeSetContext(), Imm32IsCrossProcessAccess(), ImmAssociateContext(), ImmAssociateContextEx(), ImmGetDefaultIMEWnd(), ImmGetSaveContext(), IsHungAppWindow(), PostMessageA(), PostMessageW(), TestWindowProcess(), and UserPaintCaption().

◆ NtUserRealChildWindowFromPoint()

HWND NTAPI NtUserRealChildWindowFromPoint ( HWND  Parent,
LONG  x,
LONG  y 
)

Definition at line 3513 of file winpos.c.

3516{
3517 PWND pwndParent;
3518 TRACE("Enter NtUserRealChildWindowFromPoint\n");
3520 if ((pwndParent = UserGetWindowObject(Parent)))
3521 {
3522 pwndParent = IntRealChildWindowFromPoint(pwndParent, x, y);
3523 }
3524 UserLeave();
3525 TRACE("Leave NtUserRealChildWindowFromPoint\n");
3526 return pwndParent ? UserHMGetHandle(pwndParent) : NULL;
3527}
PWND FASTCALL IntRealChildWindowFromPoint(PWND Parent, LONG x, LONG y)
Definition: winpos.c:2995

Referenced by RealChildWindowFromPoint().

◆ NtUserRealInternalGetMessage()

BOOL NTAPI NtUserRealInternalGetMessage ( LPMSG  lpMsg,
HWND  hWnd,
UINT  wMsgFilterMin,
UINT  wMsgFilterMax,
UINT  wRemoveMsg,
BOOL  bGMSG 
)

Definition at line 616 of file ntstubs.c.

623{
624 STUB;
625 return 0;
626}

Referenced by ResetMessagePumpHook().

◆ NtUserRealWaitMessageEx()

BOOL NTAPI NtUserRealWaitMessageEx ( DWORD  dwWakeMask,
UINT  uTimeout 
)

Definition at line 630 of file ntstubs.c.

633{
634 STUB;
635 return 0;
636}

Referenced by ResetMessagePumpHook().

◆ NtUserRedrawWindow()

BOOL NTAPI NtUserRedrawWindow ( HWND  hWnd,
CONST RECT lprcUpdate,
HRGN  hrgnUpdate,
UINT  flags 
)

Definition at line 2003 of file painting.c.

2008{
2009 RECTL SafeUpdateRect;
2010 PWND Wnd;
2011 BOOL Ret = FALSE;
2014 PREGION RgnUpdate = NULL;
2015
2016 TRACE("Enter NtUserRedrawWindow\n");
2018
2020 {
2021 goto Exit; // Return FALSE
2022 }
2023
2024 if (lprcUpdate)
2025 {
2026 _SEH2_TRY
2027 {
2028 ProbeForRead(lprcUpdate, sizeof(RECTL), 1);
2029 RtlCopyMemory(&SafeUpdateRect, lprcUpdate, sizeof(RECTL));
2030 }
2032 {
2034 }
2035 _SEH2_END
2036 if (!NT_SUCCESS(Status))
2037 {
2039 goto Exit; // Return FALSE
2040 }
2041 }
2042
2046 {
2047 /* RedrawWindow fails only in case that flags are invalid */
2049 goto Exit; // Return FALSE
2050 }
2051
2052 /* We can't hold lock on GDI objects while doing roundtrips to user mode,
2053 * so it will be copied.
2054 */
2055 if (hrgnUpdate > HRGN_WINDOW)
2056 {
2057 RgnUpdate = REGION_LockRgn(hrgnUpdate);
2058 if (!RgnUpdate)
2059 {
2061 goto Exit; // Return FALSE
2062 }
2063 REGION_UnlockRgn(RgnUpdate);
2064 }
2065 else if (hrgnUpdate == HRGN_WINDOW) // Trap it out.
2066 {
2067 ERR("NTRW: Caller is passing Window Region 1\n");
2068 }
2069
2070 UserRefObjectCo(Wnd, &Ref);
2071
2072 Ret = co_UserRedrawWindow( Wnd,
2073 lprcUpdate ? &SafeUpdateRect : NULL,
2074 RgnUpdate,
2075 flags);
2076
2077 UserDerefObjectCo(Wnd);
2078
2079Exit:
2080 TRACE("Leave NtUserRedrawWindow, ret=%i\n", Ret);
2081 UserLeave();
2082 return Ret;
2083}
#define HRGN_WINDOW
Definition: ntuser.h:361
#define RDW_NOINTERNALPAINT
Definition: winuser.h:1220
#define RDW_UPDATENOW
Definition: winuser.h:1223
#define RDW_NOCHILDREN
Definition: winuser.h:1225
#define RDW_NOFRAME
Definition: winuser.h:1219
#define RDW_INTERNALPAINT
Definition: winuser.h:1216
#define RDW_NOERASE
Definition: winuser.h:1218

Referenced by NtUserInvalidateRect(), NtUserInvalidateRgn(), NtUserValidateRect(), RedrawWindow(), SpiSetWallpaper(), START_TEST(), UpdateWindow(), and ValidateRgn().

◆ NtUserRegisterClassExWOW()

RTL_ATOM NTAPI NtUserRegisterClassExWOW ( WNDCLASSEXW lpwcx,
PUNICODE_STRING  pustrClassName,
PUNICODE_STRING  pustrCVersion,
PCLSMENUNAME  pClassMenuName,
DWORD  fnID,
DWORD  Flags,
LPDWORD  pWow 
)

Definition at line 2444 of file class.c.

2462{
2463 WNDCLASSEXW CapturedClassInfo = {0};
2464 UNICODE_STRING CapturedName = {0}, CapturedMenuName = {0}, CapturedVersion = {0};
2465 RTL_ATOM Ret = (RTL_ATOM)0;
2467 BOOL Exception = FALSE;
2468
2469 if (Flags & ~(CSF_ANSIPROC))
2470 {
2471 ERR("NtUserRegisterClassExWOW Bad Flags!\n");
2473 return Ret;
2474 }
2475
2477
2478 TRACE("NtUserRegisterClassExWOW ClsN %wZ\n",ClassName);
2479
2480 if ( !(ppi->W32PF_flags & W32PF_CLASSESREGISTERED ))
2481 {
2483 }
2484
2485 _SEH2_TRY
2486 {
2487 /* Probe the parameters and basic parameter checks */
2488 if (ProbeForReadUint(&lpwcx->cbSize) != sizeof(WNDCLASSEXW))
2489 {
2490 ERR("NtUserRegisterClassExWOW Wrong cbSize!\n");
2491 goto InvalidParameter;
2492 }
2493
2494 ProbeForRead(lpwcx,
2495 sizeof(WNDCLASSEXW),
2496 sizeof(ULONG));
2497 RtlCopyMemory(&CapturedClassInfo,
2498 lpwcx,
2499 sizeof(WNDCLASSEXW));
2500
2501 CapturedName = ProbeForReadUnicodeString(ClassName);
2502 CapturedVersion = ProbeForReadUnicodeString(ClsVersion);
2503
2504 ProbeForRead(pClassMenuName,
2505 sizeof(CLSMENUNAME),
2506 1);
2507
2508 CapturedMenuName = ProbeForReadUnicodeString(pClassMenuName->pusMenuName);
2509
2510 if ( (CapturedName.Length & 1) ||
2511 (CapturedMenuName.Length & 1) ||
2512 (CapturedClassInfo.cbClsExtra < 0) ||
2513 ((CapturedClassInfo.cbClsExtra + CapturedName.Length +
2514 CapturedMenuName.Length + sizeof(CLS))
2515 < (ULONG)CapturedClassInfo.cbClsExtra) ||
2516 (CapturedClassInfo.cbWndExtra < 0) ||
2517 (CapturedClassInfo.hInstance == NULL) )
2518 {
2519 ERR("NtUserRegisterClassExWOW Invalid Parameter Error!\n");
2520 goto InvalidParameter;
2521 }
2522
2523 if (CapturedName.Length != 0)
2524 {
2525 ProbeForRead(CapturedName.Buffer,
2526 CapturedName.Length,
2527 sizeof(WCHAR));
2528 }
2529 else
2530 {
2531 if (!IS_ATOM(CapturedName.Buffer))
2532 {
2533 ERR("NtUserRegisterClassExWOW ClassName Error!\n");
2534 goto InvalidParameter;
2535 }
2536 }
2537
2538 if (CapturedVersion.Length != 0)
2539 {
2540 ProbeForRead(CapturedVersion.Buffer,
2541 CapturedVersion.Length,
2542 sizeof(WCHAR));
2543 }
2544 else
2545 {
2546 if (!IS_ATOM(CapturedVersion.Buffer))
2547 {
2548 ERR("NtUserRegisterClassExWOW ClassName Error!\n");
2549 goto InvalidParameter;
2550 }
2551 }
2552
2553 if (CapturedMenuName.Length != 0)
2554 {
2555 ProbeForRead(CapturedMenuName.Buffer,
2556 CapturedMenuName.Length,
2557 sizeof(WCHAR));
2558 }
2559 else if (CapturedMenuName.Buffer != NULL &&
2560 !IS_INTRESOURCE(CapturedMenuName.Buffer))
2561 {
2562 ERR("NtUserRegisterClassExWOW MenuName Error!\n");
2566 }
2567
2568 if (IsCallProcHandle(lpwcx->lpfnWndProc))
2569 { // Never seen this yet, but I'm sure it's a little haxxy trick!
2570 // If this pops up we know what todo!
2571 ERR("NtUserRegisterClassExWOW WndProc is CallProc!!\n");
2572 }
2573
2574 TRACE("NtUserRegisterClassExWOW MnuN %wZ\n",&CapturedMenuName);
2575 }
2577 {
2578 ERR("NtUserRegisterClassExWOW Exception Error!\n");
2580 Exception = TRUE;
2581 }
2582 _SEH2_END;
2583
2584 if (!Exception)
2585 {
2586 /* Register the class */
2587 Ret = UserRegisterClass(&CapturedClassInfo,
2588 &CapturedName,
2589 &CapturedVersion,
2590 &CapturedMenuName,
2591 fnID,
2592 Flags);
2593 }
2594
2595 if (!Ret)
2596 {
2597 TRACE("NtUserRegisterClassExWOW Null Return!\n");
2598 }
2599
2600 UserLeave();
2601
2602 return Ret;
2603}
static __inline BOOL IsCallProcHandle(IN WNDPROC lpWndProc)
Definition: class.h:13
@ InvalidParameter
Definition: gdiplustypes.h:28
#define CSF_ANSIPROC
Definition: ntuser.h:557
#define ProbeForReadUint(Ptr)
Definition: probe.h:67
PUNICODE_STRING pusMenuName
Definition: ntuser.h:500
WNDPROC lpfnWndProc
Definition: winuser.h:3221
UINT cbSize
Definition: winuser.h:3219
int cbWndExtra
Definition: winuser.h:3223
HINSTANCE hInstance
Definition: winuser.h:3224
int cbClsExtra
Definition: winuser.h:3222
RTL_ATOM UserRegisterClass(IN CONST WNDCLASSEXW *lpwcx, IN PUNICODE_STRING ClassName, IN PUNICODE_STRING ClassVersion, IN PUNICODE_STRING MenuName, IN DWORD fnID, IN DWORD dwFlags)
Definition: class.c:1504

Referenced by RegisterClassExWOWW(), and START_TEST().

◆ NtUserRegisterHotKey()

BOOL NTAPI NtUserRegisterHotKey ( HWND  hWnd,
int  id,
UINT  fsModifiers,
UINT  vk 
)

Definition at line 512 of file hotkey.c.

516{
517 PHOT_KEY pHotKey;
518 PWND pWnd = NULL;
519 PTHREADINFO pHotKeyThread;
520 BOOL bRet = FALSE;
521
522 TRACE("Enter NtUserRegisterHotKey\n");
523
524 if (fsModifiers & ~(MOD_ALT|MOD_CONTROL|MOD_SHIFT|MOD_WIN)) // FIXME: Does Win2k3 support MOD_NOREPEAT?
525 {
526 WARN("Invalid modifiers: %x\n", fsModifiers);
528 return 0;
529 }
530
532
533 /* Find hotkey thread */
534 if (hWnd == NULL)
535 {
536 pHotKeyThread = gptiCurrent;
537 }
538 else
539 {
541 if (!pWnd)
542 goto cleanup;
543
544 pHotKeyThread = pWnd->head.pti;
545
546 /* Fix wine msg "Window on another thread" test_hotkey */
547 if (pWnd->head.pti != gptiCurrent)
548 {
550 WARN("Must be from the same Thread.\n");
551 goto cleanup;
552 }
553 }
554
555 /* Check for existing hotkey */
556 if (IsHotKey(fsModifiers, vk))
557 {
559 WARN("Hotkey already exists\n");
560 goto cleanup;
561 }
562
563 /* Create new hotkey */
565 if (pHotKey == NULL)
566 {
568 goto cleanup;
569 }
570
571 pHotKey->pti = pHotKeyThread;
572 pHotKey->pWnd = pWnd;
573 pHotKey->fsModifiers = fsModifiers;
574 pHotKey->vk = vk;
575 pHotKey->id = id;
576
577 /* Insert hotkey to the global list */
578 pHotKey->pNext = gphkFirst;
579 gphkFirst = pHotKey;
580
581 bRet = TRUE;
582
583cleanup:
584 TRACE("Leave NtUserRegisterHotKey, ret=%i\n", bRet);
585 UserLeave();
586 return bRet;
587}
GLuint id
Definition: glext.h:5910
#define MOD_ALT
Definition: imm.h:184
#define MOD_SHIFT
Definition: imm.h:186
#define MOD_CONTROL
Definition: imm.h:185
WORD vk
Definition: input.c:77
Definition: hotkey.h:4
UINT fsModifiers
Definition: hotkey.h:7
PTHREADINFO pti
Definition: hotkey.h:5
struct _HOT_KEY * pNext
Definition: hotkey.h:10
INT id
Definition: hotkey.h:9
UINT vk
Definition: hotkey.h:8
PWND pWnd
Definition: hotkey.h:6
static PHOT_KEY FASTCALL IsHotKey(UINT fsModifiers, WORD wVk)
Definition: hotkey.c:151
PHOT_KEY gphkFirst
Definition: hotkey.c:38
#define USERTAG_HOTKEY
Definition: tags.h:238
#define ERROR_WINDOW_OF_OTHER_THREAD
Definition: winerror.h:889
#define ERROR_HOTKEY_ALREADY_REGISTERED
Definition: winerror.h:890
#define MOD_WIN
Definition: winuser.h:2647

Referenced by RegisterHotKey().

◆ NtUserRegisterRawInputDevices()

BOOL NTAPI NtUserRegisterRawInputDevices ( IN PCRAWINPUTDEVICE  pRawInputDevices,
IN UINT  uiNumDevices,
IN UINT  cbSize 
)

Definition at line 640 of file ntstubs.c.

644{
645 STUB;
646 return 0;
647}

◆ NtUserRegisterTasklist()

DWORD NTAPI NtUserRegisterTasklist ( DWORD  Unknown0)

Definition at line 214 of file ntstubs.c.

216{
217 STUB
218
219 return 0;
220}

Referenced by RegisterTasklist().

◆ NtUserRegisterUserApiHook()

BOOL NTAPI NtUserRegisterUserApiHook ( PUNICODE_STRING  m_dllname1,
PUNICODE_STRING  m_funname1,
DWORD  dwUnknown3,
DWORD  dwUnknown4 
)

Definition at line 1722 of file hook.c.

1727{
1728 BOOL ret;
1729 UNICODE_STRING strDllNameSafe;
1730 UNICODE_STRING strFuncNameSafe;
1732
1733 /* Probe and capture parameters */
1734 Status = ProbeAndCaptureUnicodeString(&strDllNameSafe, UserMode, m_dllname1);
1735 if(!NT_SUCCESS(Status))
1736 {
1738 return FALSE;
1739 }
1740
1741 Status = ProbeAndCaptureUnicodeString(&strFuncNameSafe, UserMode, m_funname1);
1742 if(!NT_SUCCESS(Status))
1743 {
1744 ReleaseCapturedUnicodeString(&strDllNameSafe, UserMode);
1746 return FALSE;
1747 }
1748
1750
1751 /* Call internal function */
1752 ret = UserRegisterUserApiHook(&strDllNameSafe, &strFuncNameSafe);
1753
1754 UserLeave();
1755
1756 /* Cleanup only in case of failure */
1757 if(ret == FALSE)
1758 {
1759 ReleaseCapturedUnicodeString(&strDllNameSafe, UserMode);
1760 ReleaseCapturedUnicodeString(&strFuncNameSafe, UserMode);
1761 }
1762
1763 return ret;
1764}
BOOL FASTCALL UserRegisterUserApiHook(PUNICODE_STRING pstrDllName, PUNICODE_STRING pstrFuncName)
Definition: hook.c:138

Referenced by RegisterUserApiHook().

◆ NtUserRegisterWindowMessage()

UINT NTAPI NtUserRegisterWindowMessage ( PUNICODE_STRING  MessageName)

Definition at line 4299 of file window.c.

4300{
4301 UNICODE_STRING SafeMessageName;
4303 UINT Ret = 0;
4304
4305 TRACE("Enter NtUserRegisterWindowMessage\n");
4307
4308 if(MessageNameUnsafe == NULL)
4309 {
4311 goto Exit; // Return 0
4312 }
4313
4314 Status = IntSafeCopyUnicodeStringTerminateNULL(&SafeMessageName, MessageNameUnsafe);
4315 if(!NT_SUCCESS(Status))
4316 {
4318 goto Exit; // Return 0
4319 }
4320
4321 Ret = (UINT)IntAddAtom(SafeMessageName.Buffer);
4322 if (SafeMessageName.Buffer)
4323 ExFreePoolWithTag(SafeMessageName.Buffer, TAG_STRING);
4324
4325Exit:
4326 TRACE("Leave NtUserRegisterWindowMessage, ret=%u\n", Ret);
4327 UserLeave();
4328 return Ret;
4329}
RTL_ATOM FASTCALL IntAddAtom(LPWSTR AtomName)
Definition: useratom.c:13
NTSTATUS FASTCALL IntSafeCopyUnicodeStringTerminateNULL(PUNICODE_STRING Dest, PUNICODE_STRING Source)
Definition: misc.c:685

Referenced by RegisterClipboardFormatA(), RegisterClipboardFormatW(), RegisterWindowMessageA(), and RegisterWindowMessageW().

◆ NtUserRemoteConnect()

DWORD NTAPI NtUserRemoteConnect ( DWORD  dwUnknown1,
DWORD  dwUnknown2,
DWORD  dwUnknown3 
)

Definition at line 860 of file ntstubs.c.

864{
865 STUB;
866 return 0;
867}

◆ NtUserRemoteRedrawRectangle()

DWORD NTAPI NtUserRemoteRedrawRectangle ( DWORD  dwUnknown1,
DWORD  dwUnknown2,
DWORD  dwUnknown3,
DWORD  dwUnknown4 
)

Definition at line 871 of file ntstubs.c.

876{
877 STUB;
878 return 0;
879}

◆ NtUserRemoteRedrawScreen()

DWORD NTAPI NtUserRemoteRedrawScreen ( VOID  )

Definition at line 883 of file ntstubs.c.

884{
885 STUB;
886 return 0;
887}

◆ NtUserRemoteStopScreenUpdates()

DWORD NTAPI NtUserRemoteStopScreenUpdates ( VOID  )

Definition at line 891 of file ntstubs.c.

892{
893 STUB;
894 return 0;
895}

◆ NtUserRemoveMenu()

BOOL NTAPI NtUserRemoveMenu ( HMENU  hMenu,
UINT  uPosition,
UINT  uFlags 
)

Definition at line 6391 of file menu.c.

6395{
6396 PMENU Menu;
6397 BOOL Ret = FALSE;
6398
6399 TRACE("Enter NtUserRemoveMenu\n");
6401
6402 Menu = UserGetMenuObject(hMenu);
6403 if (Menu)
6404 {
6405 Ret = IntRemoveMenuItem(Menu, uPosition, uFlags, FALSE);
6406 }
6407
6408 TRACE("Leave NtUserRemoveMenu, ret=%i\n", Ret);
6409 UserLeave();
6410 return Ret;
6411}

Referenced by RemoveMenu().

◆ NtUserRemoveProp()

HANDLE NTAPI NtUserRemoveProp ( HWND  hWnd,
ATOM  Atom 
)

◆ NtUserResolveDesktop()

HDESK NTAPI NtUserResolveDesktop ( IN HANDLE  ProcessHandle,
IN PUNICODE_STRING  DesktopPath,
IN BOOL  bInherit,
OUT HWINSTA *  phWinSta 
)

Definition at line 2865 of file desktop.c.

2870{
2873 HWINSTA hWinSta = NULL;
2874 HDESK hDesktop = NULL;
2875 UNICODE_STRING CapturedDesktopPath;
2876
2877 /* Allow only the Console Server to perform this operation (via CSRSS) */
2879 return NULL;
2880
2881 /* Get the process object the user handle was referencing */
2885 UserMode,
2886 (PVOID*)&Process,
2887 NULL);
2888 if (!NT_SUCCESS(Status))
2889 return NULL;
2890
2892
2893 _SEH2_TRY
2894 {
2895 /* Probe the handle pointer */
2896 // ProbeForWriteHandle
2897 ProbeForWrite(phWinSta, sizeof(HWINSTA), sizeof(HWINSTA));
2898 }
2900 {
2902 _SEH2_YIELD(goto Quit);
2903 }
2904 _SEH2_END;
2905
2906 /* Capture the user desktop path string */
2907 Status = ProbeAndCaptureUnicodeString(&CapturedDesktopPath,
2908 UserMode,
2909 DesktopPath);
2910 if (!NT_SUCCESS(Status))
2911 goto Quit;
2912
2913 /* Call the internal function */
2915 &CapturedDesktopPath,
2916 bInherit,
2917 &hWinSta,
2918 &hDesktop);
2919 if (!NT_SUCCESS(Status))
2920 {
2921 ERR("IntResolveDesktop failed, Status 0x%08lx\n", Status);
2922 hWinSta = NULL;
2923 hDesktop = NULL;
2924 }
2925
2926 _SEH2_TRY
2927 {
2928 /* Return the window station handle */
2929 *phWinSta = hWinSta;
2930 }
2932 {
2934
2935 /* We failed, close the opened desktop and window station */
2936 if (hDesktop) ObCloseHandle(hDesktop, UserMode);
2937 hDesktop = NULL;
2938 if (hWinSta) ObCloseHandle(hWinSta, UserMode);
2939 }
2940 _SEH2_END;
2941
2942 /* Free the captured string */
2943 ReleaseCapturedUnicodeString(&CapturedDesktopPath, UserMode);
2944
2945Quit:
2946 UserLeave();
2947
2948 /* Dereference the process object */
2950
2951 /* Return the desktop handle */
2952 return hDesktop;
2953}
NTSTATUS FASTCALL IntResolveDesktop(IN PEPROCESS Process, IN PUNICODE_STRING DesktopPath, IN BOOL bInherit, OUT HWINSTA *phWinSta, OUT HDESK *phDesktop)
Definition: desktop.c:568

Referenced by GuiInit().

◆ NtUserResolveDesktopForWOW()

DWORD NTAPI NtUserResolveDesktopForWOW ( DWORD  Unknown0)

Definition at line 650 of file ntstubs.c.

651{
652 STUB
653 return 0;
654}

◆ NtUserSBGetParms()

BOOL NTAPI NtUserSBGetParms ( HWND  hwnd,
int  fnBar,
PSBDATA  pSBData,
LPSCROLLINFO  lpsi 
)

Definition at line 1182 of file scrollbar.c.

1187{
1188 PWND Window;
1189 SCROLLINFO psi;
1190 BOOL Ret = FALSE;
1191 SBDATA SBDataSafe;
1193
1194 TRACE("Enter NtUserGetScrollInfo\n");
1196
1197 _SEH2_TRY
1198 {
1199 RtlCopyMemory(&psi, lpsi, sizeof(SCROLLINFO));
1200 if (pSBData)
1201 RtlCopyMemory(&SBDataSafe, pSBData, sizeof(SBDATA));
1202 }
1204 {
1205 ERR("NtUserGetScrollInfo Failed size\n");
1207 _SEH2_YIELD(goto Exit); // Return FALSE
1208 }
1209 _SEH2_END
1210
1212 {
1213 ERR("NtUserGetScrollInfo Bad window\n");
1214 goto Exit; // Return FALSE
1215 }
1216
1217 UserRefObjectCo(Window, &Ref);
1218 Ret = co_IntGetScrollInfo(Window, fnBar, &SBDataSafe, &psi);
1220
1221 _SEH2_TRY
1222 {
1223 RtlCopyMemory(lpsi, &psi, sizeof(SCROLLINFO));
1224 }
1226 {
1227 ERR("NtUserGetScrollInfo Failed copy to user\n");
1229 Ret = FALSE;
1230 _SEH2_YIELD(goto Exit);
1231 }
1232 _SEH2_END
1233
1234Exit:
1235 TRACE("Leave NtUserGetScrollInfo, ret=%i\n", Ret);
1236 UserLeave();
1237 return Ret;
1238}
static BOOL FASTCALL co_IntGetScrollInfo(PWND Window, INT nBar, PSBDATA pSBData, LPSCROLLINFO lpsi)
Definition: scrollbar.c:264

Referenced by RealGetScrollInfo(), and ScrollBarWndProc_common().

◆ NtUserScrollDC()

BOOL NTAPI NtUserScrollDC ( HDC  hDC,
int  dx,
int  dy,
CONST RECT lprcScroll,
CONST RECT lprcClip,
HRGN  hrgnUpdate,
LPRECT  lprcUpdate 
)

Referenced by ScrollDC(), and START_TEST().

◆ NtUserScrollWindowEx()

DWORD NTAPI NtUserScrollWindowEx ( HWND  hWnd,
INT  dx,
INT  dy,
const RECT rect,
const RECT clipRect,
HRGN  hrgnUpdate,
LPRECT  rcUpdate,
UINT  flags 
)

Definition at line 571 of file scrollex.c.

580{
583 PWND Window = NULL;
584 RECTL rcScroll, rcClip, rcUpdate;
586
587 TRACE("Enter NtUserScrollWindowEx\n");
589
592 {
593 Window = NULL; /* prevent deref at cleanup */
594 goto Cleanup; // Return ERROR
595 }
596 UserRefObjectCo(Window, &Ref);
597
599 {
600 if (prcUnsafeScroll)
601 {
602 ProbeForRead(prcUnsafeScroll, sizeof(*prcUnsafeScroll), 1);
603 rcScroll = *prcUnsafeScroll;
604 }
605
606 if (prcUnsafeClip)
607 {
608 ProbeForRead(prcUnsafeClip, sizeof(*prcUnsafeClip), 1);
609 rcClip = *prcUnsafeClip;
610 }
611 }
613 {
615 }
616 _SEH2_END;
617
618 if (!NT_SUCCESS(Status))
619 {
621 goto Cleanup; // Return ERROR
622 }
623
625 dx, dy,
626 prcUnsafeScroll ? &rcScroll : NULL,
627 prcUnsafeClip ? &rcClip : NULL,
628 hrgnUpdate,
629 prcUnsafeUpdate ? &rcUpdate : NULL,
630 flags);
631
632 if (prcUnsafeUpdate)
633 {
635 {
636 /* Probe here, to not fail on invalid pointer before scrolling */
637 ProbeForWrite(prcUnsafeUpdate, sizeof(*prcUnsafeUpdate), 1);
638 *prcUnsafeUpdate = rcUpdate;
639 }
641 {
643 }
644 _SEH2_END;
645
646 if (!NT_SUCCESS(Status))
647 {
649 Result = ERROR;
650 }
651 }
652
653Cleanup:
654 if (Window)
656
657 TRACE("Leave NtUserScrollWindowEx, ret=%lu\n", Result);
658 UserLeave();
659 return Result;
660}
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97
DWORD FASTCALL IntScrollWindowEx(PWND Window, INT dx, INT dy, const RECT *prcScroll, const RECT *prcClip, HRGN hrgnUpdate, LPRECT prcUpdate, UINT flags)
Definition: scrollex.c:228
BOOL FASTCALL IntIsWindowDrawable(PWND Wnd)
Definition: painting.c:868

Referenced by ScrollWindow(), and ScrollWindowEx().

◆ NtUserSelectPalette()

HPALETTE NTAPI NtUserSelectPalette ( HDC  hDC,
HPALETTE  hpal,
BOOL  ForceBackground 
)

Select logical palette into device context.

Parameters
hDChandle to the device context
hpalhandle to the palette
ForceBackgroundIf this value is FALSE the logical palette will be copied to the device palette only when the application is in the foreground. If this value is TRUE then map the colors in the logical palette to the device palette colors in the best way.
Returns
old palette
Todo:
implement ForceBackground == TRUE

Definition at line 1034 of file windc.c.

1037{
1038 HPALETTE oldPal;
1040 // Implement window checks
1041 oldPal = GdiSelectPalette( hDC, hpal, ForceBackground);
1042 UserLeave();
1043 return oldPal;
1044}
HPALETTE NTAPI GdiSelectPalette(_In_ HDC hDC, _In_ HPALETTE hpal, _In_ BOOL ForceBackground)

◆ NtUserSendInput()

UINT NTAPI NtUserSendInput ( UINT  nInputs,
LPINPUT  pInput,
INT  cbSize 
)

Definition at line 708 of file input.c.

712{
713 PTHREADINFO pti;
714 UINT uRet = 0;
715
716 TRACE("Enter NtUserSendInput\n");
718
720 ASSERT(pti);
721
722 if (!pti->rpdesk)
723 {
724 goto cleanup;
725 }
726
727 if (!nInputs || !pInput || cbSize != sizeof(INPUT))
728 {
730 goto cleanup;
731 }
732
733 /*
734 * FIXME: Check access rights of the window station
735 * e.g. services running in the service window station cannot block input
736 */
737 if (!ThreadHasInputAccess(pti) ||
739 {
741 goto cleanup;
742 }
743
744 while (nInputs--)
745 {
746 INPUT SafeInput;
748
749 Status = MmCopyFromCaller(&SafeInput, pInput++, sizeof(INPUT));
750 if (!NT_SUCCESS(Status))
751 {
753 goto cleanup;
754 }
755
756 switch (SafeInput.type)
757 {
758 case INPUT_MOUSE:
759 if (UserSendMouseInput(&SafeInput.mi, TRUE))
760 uRet++;
761 break;
762 case INPUT_KEYBOARD:
763 if (UserSendKeyboardInput(&SafeInput.ki, TRUE))
764 uRet++;
765 break;
766 case INPUT_HARDWARE:
767 FIXME("INPUT_HARDWARE not supported!\n");
768 break;
769 default:
770 ERR("SendInput(): Invalid input type: 0x%x\n", SafeInput.type);
771 break;
772 }
773 }
774
775cleanup:
776 TRACE("Leave NtUserSendInput, ret=%u\n", uRet);
777 UserLeave();
778 return uRet;
779}
KEYBDINPUT ki
Definition: winable.h:62
DWORD type
Definition: winable.h:59
MOUSEINPUT mi
Definition: winable.h:61
#define IntIsActiveDesktop(Desktop)
Definition: desktop.h:172
BOOL NTAPI UserSendKeyboardInput(KEYBDINPUT *pKbdInput, BOOL bInjected)
Definition: keyboard.c:1110
#define ThreadHasInputAccess(W32Thread)
Definition: input.h:65
BOOL NTAPI UserSendMouseInput(MOUSEINPUT *pMouseInput, BOOL bInjected)
Definition: mouse.c:168
#define INPUT_HARDWARE
Definition: winable.h:11
#define INPUT_KEYBOARD
Definition: winable.h:10
#define INPUT_MOUSE
Definition: winable.h:9

Referenced by keybd_event(), mouse_event(), and SendInput().

◆ NtUserSetActiveWindow()

HWND NTAPI NtUserSetActiveWindow ( HWND  Wnd)

Definition at line 1665 of file focus.c.

1666{
1668 HWND hWndPrev;
1669 PWND Window, pwndPrev;
1670 HWND Ret = NULL;
1671
1672 TRACE("Enter NtUserSetActiveWindow(%p)\n", hWnd);
1674
1675 Window = NULL;
1676 if (hWnd)
1677 {
1679 {
1680 ERR("NtUserSetActiveWindow: Invalid handle 0x%p!\n",hWnd);
1681 goto Exit; // Return NULL
1682 }
1683 }
1684
1685 if (!Window ||
1686 Window->head.pti->MessageQueue == gptiCurrent->MessageQueue)
1687 {
1688 pwndPrev = gptiCurrent->MessageQueue->spwndActive;
1689 hWndPrev = (pwndPrev ? UserHMGetHandle(pwndPrev) : NULL);
1690 if (Window) UserRefObjectCo(Window, &Ref);
1693 Ret = ((hWndPrev && IntIsWindow(hWndPrev)) ? hWndPrev : NULL);
1694 }
1695
1696Exit:
1697 TRACE("Leave NtUserSetActiveWindow, ret=%p\n", Ret);
1698 UserLeave();
1699 return Ret;
1700}

Referenced by SetActiveWindow().

◆ NtUserSetAppImeLevel()

BOOL NTAPI NtUserSetAppImeLevel ( HWND  hWnd,
DWORD  dwLevel 
)

Definition at line 1060 of file ime.c.

1061{
1062 BOOL ret = FALSE;
1063 PWND pWnd;
1064 PTHREADINFO pti;
1065
1067
1068 if (!IS_IMM_MODE())
1069 {
1070 ERR("!IS_IMM_MODE()\n");
1072 goto Quit;
1073 }
1074
1075 pWnd = ValidateHwndNoErr(hWnd);
1076 if (!pWnd)
1077 goto Quit;
1078
1080 if (pWnd->head.pti->ppi == pti->ppi)
1081 ret = UserSetProp(pWnd, AtomImeLevel, UlongToHandle(dwLevel), TRUE);
1082
1083Quit:
1084 UserLeave();
1085 return ret;
1086}

◆ NtUserSetCapture()

HWND NTAPI NtUserSetCapture ( HWND  Wnd)

Definition at line 1706 of file focus.c.

1707{
1708 HWND Ret;
1709
1710 TRACE("Enter NtUserSetCapture(%p)\n", hWnd);
1712
1713 Ret = co_UserSetCapture(hWnd);
1714
1715 TRACE("Leave NtUserSetCapture, ret=%p\n", Ret);
1716 UserLeave();
1717 return Ret;
1718}

Referenced by SetCapture().

◆ NtUserSetClassLong()

ULONG_PTR NTAPI NtUserSetClassLong ( _In_ HWND  hWnd,
_In_ INT  Offset,
_In_ ULONG  dwNewLong,
_In_ BOOL  Ansi 
)

Definition at line 2706 of file class.c.

2711{
2712 return IntNtUserSetClassLongPtr(hWnd, Offset, dwNewLong, Ansi, sizeof(LONG));
2713}
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
ULONG_PTR APIENTRY IntNtUserSetClassLongPtr(HWND hWnd, INT Offset, ULONG_PTR dwNewLong, BOOL Ansi, ULONG Size)
Definition: class.c:2606

Referenced by SetClassLongA(), SetClassLongW(), and START_TEST().

◆ NtUserSetClassWord()

WORD NTAPI NtUserSetClassWord ( HWND  hWnd,
INT  nIndex,
WORD  wNewWord 
)

Definition at line 2732 of file class.c.

2736{
2737/*
2738 * NOTE: Obsoleted in 32-bit windows
2739 */
2740 return(0);
2741}

◆ NtUserSetClipboardData()

HANDLE NTAPI NtUserSetClipboardData ( UINT  fmt,
HANDLE  hMem,
PSETCLIPBDATA  scd 
)

Definition at line 1084 of file clipboard.c.

1085{
1086 SETCLIPBDATA scd;
1087 HANDLE hRet;
1088
1089 TRACE("NtUserSetClipboardData(%x %p %p)\n", fmt, hData, pUnsafeScd);
1090
1091 _SEH2_TRY
1092 {
1093 ProbeForRead(pUnsafeScd, sizeof(*pUnsafeScd), 1);
1094 RtlCopyMemory(&scd, pUnsafeScd, sizeof(scd));
1095 }
1097 {
1099 _SEH2_YIELD(return NULL;)
1100 }
1101 _SEH2_END
1102
1104
1105 /* Call internal function */
1106 hRet = UserSetClipboardData(fmt, hData, &scd);
1107
1108 UserLeave();
1109
1110 return hRet;
1111}
HANDLE NTAPI UserSetClipboardData(UINT fmt, HANDLE hData, PSETCLIPBDATA scd)
Definition: clipboard.c:1023

Referenced by GetClipboardData(), and SetClipboardData().

◆ NtUserSetClipboardViewer()

HWND NTAPI NtUserSetClipboardViewer ( HWND  hWndNewViewer)

Definition at line 1114 of file clipboard.c.

1115{
1116 HWND hWndNext = NULL;
1117 PWINSTATION_OBJECT pWinStaObj;
1118 PWND pWindow;
1119
1121
1122 pWinStaObj = IntGetWinStaForCbAccess();
1123 if (!pWinStaObj)
1124 goto cleanup;
1125
1126 pWindow = UserGetWindowObject(hWndNewViewer);
1127 if (!pWindow)
1128 {
1130 goto cleanup;
1131 }
1132
1133 /* Return previous viewer. New viever window should
1134 send messages to rest of the chain */
1135 if (pWinStaObj->spwndClipViewer)
1136 hWndNext = UserHMGetHandle(pWinStaObj->spwndClipViewer);
1137
1138 /* Set new viewer window */
1139 pWinStaObj->spwndClipViewer = pWindow;
1140
1141 /* Notify viewer windows in chain */
1142 pWinStaObj->fClipboardChanged = FALSE;
1143 if (pWinStaObj->spwndClipViewer)
1144 {
1145 TRACE("Clipboard: sending WM_DRAWCLIPBOARD to %p\n", UserHMGetHandle(pWinStaObj->spwndClipViewer));
1146 // For 32-bit applications this message is sent as a notification
1148 }
1149
1150cleanup:
1151 if (pWinStaObj)
1152 ObDereferenceObject(pWinStaObj);
1153
1154 UserLeave();
1155
1156 return hWndNext;
1157}
INT fClipboardChanged
Definition: winsta.h:33
LRESULT FASTCALL co_IntSendMessageNoWait(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: message.c:1763
#define WM_DRAWCLIPBOARD
Definition: winuser.h:1872

Referenced by SetClipboardViewer().

◆ NtUserSetConsoleReserveKeys()

DWORD NTAPI NtUserSetConsoleReserveKeys ( DWORD  Unknown0,
DWORD  Unknown1 
)

Definition at line 224 of file ntstubs.c.

227{
228 STUB
229
230 return 0;
231}

◆ NtUserSetCursor()

HCURSOR NTAPI NtUserSetCursor ( HCURSOR  hCursor)

Definition at line 1049 of file cursoricon.c.

1051{
1052 PCURICON_OBJECT pcurOld, pcurNew;
1053 HCURSOR hOldCursor = NULL;
1054
1055 TRACE("Enter NtUserSetCursor: %p\n", hCursor);
1057
1058 if (hCursor)
1059 {
1060 pcurNew = UserGetCurIconObject(hCursor);
1061 if (!pcurNew)
1062 {
1064 goto leave;
1065 }
1066 pcurNew->CURSORF_flags |= CURSORF_CURRENT;
1067 }
1068 else
1069 {
1070 pcurNew = NULL;
1071 }
1072
1073 pcurOld = UserSetCursor(pcurNew, FALSE);
1074
1075 // If returning an old cursor than validate it, Justin Case!
1076 if ( pcurOld &&
1078 {
1079 hOldCursor = UserHMGetHandle(pcurOld);
1080 /*
1081 Problem:
1082
1083 System Global Cursors start out having at least 2 lock counts. If a system
1084 cursor is the default cursor and is returned to the caller twice in its
1085 life, the count will reach zero. Causing an assert to occur in objects.
1086
1087 This fixes a SeaMonkey crash while the mouse crosses a boundary.
1088 */
1089 if (pcurOld->CURSORF_flags & CURSORF_GLOBAL)
1090 {
1091 TRACE("Returning Global Cursor hcur %p\n",hOldCursor);
1092
1093 /*if (pcurOld->head.cLockObj > 2) // Throttle down to 2.
1094 {
1095 UserDereferenceObject(pcurOld);
1096 }
1097
1098 goto leave;*/
1099 }
1100
1101 /* See if it was destroyed in the meantime */
1102 if (UserObjectInDestroy(hOldCursor))
1103 hOldCursor = NULL;
1104 pcurOld->CURSORF_flags &= ~CURSORF_CURRENT;
1105 UserDereferenceObject(pcurOld);
1106 }
1107
1108leave:
1109 UserLeave();
1110 return hOldCursor;
1111}
#define CURSORF_GLOBAL
Definition: ntuser.h:1200
PCURICON_OBJECT FASTCALL UserSetCursor(PCURICON_OBJECT NewCursor, BOOL ForceChange)
Definition: msgqueue.c:93
BOOL FASTCALL UserObjectInDestroy(HANDLE h)
Definition: object.c:703
#define ERROR_INVALID_CURSOR_HANDLE
Definition: winerror.h:883

Referenced by SetCursor().

◆ NtUserSetCursorContents()

BOOL NTAPI NtUserSetCursorContents ( HANDLE  Handle,
PICONINFO  IconInfo 
)

Definition at line 1119 of file cursoricon.c.

1122{
1123 FIXME(" is UNIMPLEMENTED.\n");
1124 return FALSE;
1125}

◆ NtUserSetCursorIconData()

BOOL NTAPI NtUserSetCursorIconData ( _In_ HCURSOR  hCursor,
_In_opt_ PUNICODE_STRING  pustrModule,
_In_opt_ PUNICODE_STRING  puSrcName,
_In_ const CURSORDATA pCursorData 
)

Definition at line 1510 of file cursoricon.c.

1515{
1516 CURSORDATA cursordata;
1517 UNICODE_STRING ustrModule, ustrRsrc;
1518 _SEH2_VOLATILE PVOID pvBuffer;
1519 CURSORDATA* aspcur;
1520 DWORD* aicur;
1521 PINT ajifRate;
1522 UINT cjSize;
1524 BOOL bResult = FALSE;
1525
1526 TRACE("Enter NtUserSetCursorIconData\n");
1527
1528 /* Initialize buffer, so we can handle cleanup */
1529 ustrRsrc.Buffer = NULL;
1530 ustrModule.Buffer = NULL;
1531 pvBuffer = NULL;
1532
1533 _SEH2_TRY
1534 {
1535 /* Probe and capture the cursor data structure */
1536 ProbeForRead(pCursorData, sizeof(*pCursorData), 1);
1537 cursordata = *pCursorData;
1538
1539 /* Check if this is an animated cursor */
1540 if (cursordata.CURSORF_flags & CURSORF_ACON)
1541 {
1542 /* Check of the range is ok */
1543 if ((cursordata.cpcur == 0) || (cursordata.cicur == 0) ||
1544 (cursordata.cpcur > 1000) || (cursordata.cicur > 1000))
1545 {
1546 ERR("Range error (cpcur = %u, cicur = %u)\n",
1547 cursordata.cpcur, cursordata.cicur);
1548 goto Exit;
1549 }
1550
1551 /* Calculate size: one cursor data structure for each frame,
1552 and a frame index and jiffies for each "step" */
1553 cjSize = (cursordata.cpcur * sizeof(CURSORDATA)) +
1554 (cursordata.cicur * sizeof(DWORD)) +
1555 (cursordata.cicur * sizeof(INT));
1556
1557 /* Allocate a buffer */
1559 if (pvBuffer == NULL)
1560 {
1561 ERR("Failed to allocate memory (cpcur = %u, cicur = %u)\n",
1562 cursordata.cpcur, cursordata.cicur);
1563 goto Exit;
1564 }
1565
1566 /* Calculate the kernel mode pointers */
1567 aspcur = (CURSORDATA*)pvBuffer;
1568 aicur = (DWORD*)&aspcur[cursordata.cpcur];
1569 ajifRate = (INT*)&aicur[cursordata.cicur];
1570
1571 /* Probe and copy aspcur */
1572 ProbeForRead(cursordata.aspcur, cursordata.cpcur * sizeof(CURSORDATA), 1);
1573 RtlCopyMemory(aspcur,
1574 cursordata.aspcur,
1575 cursordata.cpcur * sizeof(CURSORDATA));
1576
1577 /* Probe and copy aicur */
1578 ProbeForRead(cursordata.aicur, cursordata.cicur * sizeof(DWORD), 1);
1579 RtlCopyMemory(aicur,
1580 cursordata.aicur,
1581 cursordata.cicur * sizeof(DWORD));
1582
1583 /* Probe and copy ajifRate */
1584 ProbeForRead(cursordata.ajifRate, cursordata.cicur * sizeof(INT), 1);
1585 RtlCopyMemory(ajifRate,
1586 cursordata.ajifRate,
1587 cursordata.cicur * sizeof(INT));
1588
1589 /* Set the new pointers */
1590 cursordata.aspcur = aspcur;
1591 cursordata.aicur = aicur;
1592 cursordata.ajifRate = ajifRate;
1593 }
1594 else
1595 {
1596 /* This is a standard cursor, we don't use the pointers */
1597 cursordata.aspcur = NULL;
1598 cursordata.aicur = NULL;
1599 cursordata.ajifRate = NULL;
1600 }
1601 }
1603 {
1605 goto Exit;
1606 }
1607 _SEH2_END
1608
1609 /* Check if we got a module name */
1610 if (pustrModule != NULL)
1611 {
1612 /* Capture the name */
1613 status = ProbeAndCaptureUnicodeString(&ustrModule, UserMode, pustrModule);
1614 if (!NT_SUCCESS(status))
1615 {
1616 ERR("Failed to copy pustrModule: status 0x%08lx\n", status);
1617 goto Exit;
1618 }
1619 }
1620
1621 /* Check if we got a resource name */
1622 if (pustrRsrc != NULL)
1623 {
1624 /* We use this function, because INTRESOURCEs and ATOMs are the same */
1625 status = ProbeAndCaptureUnicodeStringOrAtom(&ustrRsrc, pustrRsrc);
1626 if (!NT_SUCCESS(status))
1627 {
1628 ERR("Failed to copy pustrRsrc: status 0x%08lx\n", status);
1629 goto Exit;
1630 }
1631 }
1632
1633 /* Make sure the caller doesn't give us invalid flags */
1634 if (cursordata.CURSORF_flags & ~CURSORF_USER_MASK)
1635 {
1636 ERR("Invalid cursor flags: 0x%08lx\n", cursordata.CURSORF_flags);
1637 goto Exit;
1638 }
1639
1640 /* Acquire the global user lock */
1642
1643 /* Call the internal function */
1644 bResult = UserSetCursorIconData(hcursor,
1645 pustrModule ? &ustrModule : NULL,
1646 pustrRsrc ? &ustrRsrc : NULL,
1647 &cursordata);
1648
1649 /* Release the global user lock */
1650 UserLeave();
1651
1652Exit:
1653
1654 /* Free the captured module name */
1655 if ((ustrModule.Buffer != NULL) && !IS_INTRESOURCE(ustrModule.Buffer))
1656 {
1658 }
1659
1660 if (pvBuffer != NULL)
1661 {
1663 }
1664
1665 /* Additional cleanup on failure */
1666 if (bResult == FALSE)
1667 {
1668 if ((ustrRsrc.Buffer != NULL) &&
1669 !IS_INTRESOURCE(ustrRsrc.Buffer))
1670 {
1672 }
1673 }
1674
1675 TRACE("Leave NtUserSetCursorIconData, bResult = %i\n", bResult);
1676
1677 return bResult;
1678}
#define CURSORF_USER_MASK
Definition: cursoricon.h:6
struct tagCURSORDATA CURSORDATA
#define _SEH2_VOLATILE
Definition: pseh2_64.h:185
Definition: ps.c:97
DWORD * aicur
Definition: ntuser.h:1193
INT * ajifRate
Definition: ntuser.h:1194
ULONG CURSORF_flags
Definition: ntuser.h:1179
UINT cpcur
Definition: ntuser.h:1190
UINT cicur
Definition: ntuser.h:1191
struct tagCURSORDATA * aspcur
Definition: ntuser.h:1192
BOOL APIENTRY UserSetCursorIconData(_In_ HCURSOR hcursor, _In_opt_ PUNICODE_STRING pustrModule, _In_opt_ PUNICODE_STRING pustrRsrc, _In_ PCURSORDATA pcursordata)
Definition: cursoricon.c:1419
#define USERTAG_CURSOR
Definition: tags.h:209
_In_ ULONG cjSize
Definition: winddi.h:3634
int * PINT
Definition: windef.h:177

Referenced by CreateIconFromResourceEx(), CreateIconIndirect(), CURSORICON_CopyImage(), CURSORICON_LoadFromFileW(), and CURSORICON_LoadImageW().

◆ NtUserSetDbgTag()

DWORD NTAPI NtUserSetDbgTag ( DWORD  Unknown0,
DWORD  Unknown1 
)

Definition at line 235 of file ntstubs.c.

238{
239 STUB;
240
241 return 0;
242}

◆ NtUserSetDbgTagCount()

DWORD APIENTRY NtUserSetDbgTagCount ( DWORD  Unknown0)

Definition at line 246 of file ntstubs.c.

248{
249 STUB;
250
251 return 0;
252}

◆ NtUserSetFocus()

HWND NTAPI NtUserSetFocus ( HWND  hWnd)

Definition at line 1724 of file focus.c.

1725{
1726 PWND Window;
1728 HWND ret = NULL;
1729
1730 TRACE("Enter NtUserSetFocus(%p)\n", hWnd);
1732
1733 if (hWnd)
1734 {
1736 {
1737 ERR("NtUserSetFocus: Invalid handle 0x%p!\n",hWnd);
1738 goto Exit; // Return NULL
1739 }
1740
1741 UserRefObjectCo(Window, &Ref);
1744 }
1745 else
1746 {
1748 }
1749
1750Exit:
1751 TRACE("Leave NtUserSetFocus, ret=%p\n", ret);
1752 UserLeave();
1753 return ret;
1754}
HWND FASTCALL co_UserSetFocus(PWND Window)
Definition: focus.c:1317

Referenced by SetFocus().

◆ NtUserSetImeHotKey()

BOOL NTAPI NtUserSetImeHotKey ( DWORD  dwHotKeyId,
UINT  uModifiers,
UINT  uVirtualKey,
HKL  hKL,
DWORD  dwAction 
)

Definition at line 451 of file ime.c.

457{
458 BOOL ret;
460 ret = IntSetImeHotKey(dwHotKeyId, uModifiers, uVirtualKey, hKL, dwAction);
461 UserLeave();
462 return ret;
463}
static BOOL APIENTRY IntSetImeHotKey(DWORD dwHotKeyId, UINT uModifiers, UINT uVirtualKey, HKL hKL, DWORD dwAction)
Definition: ime.c:339

Referenced by CliImmInitializeHotKeys(), and CliImmSetHotKeyWorker().

◆ NtUserSetImeInfoEx()

BOOL NTAPI NtUserSetImeInfoEx ( PIMEINFOEX  pImeInfoEx)

Definition at line 1126 of file ime.c.

1127{
1128 BOOL ret = FALSE;
1129 IMEINFOEX ImeInfoEx;
1130 PWINSTATION_OBJECT pWinSta;
1131
1133
1134 if (!IS_IMM_MODE())
1135 {
1136 ERR("!IS_IMM_MODE()\n");
1137 goto Quit;
1138 }
1139
1140 _SEH2_TRY
1141 {
1142 ProbeForRead(pImeInfoEx, sizeof(*pImeInfoEx), 1);
1143 ImeInfoEx = *pImeInfoEx;
1144 }
1146 {
1147 ERR("%p\n", pImeInfoEx);
1148 _SEH2_YIELD(goto Quit);
1149 }
1150 _SEH2_END;
1151
1153 ret = UserSetImeInfoEx(pWinSta, &ImeInfoEx);
1154
1155Quit:
1156 UserLeave();
1157 return ret;
1158}
BOOL FASTCALL UserSetImeInfoEx(_Inout_ PWINSTATION_OBJECT pWinSta, _Inout_ PIMEINFOEX pImeInfoEx)
Definition: ime.c:1090

Referenced by Imm32LoadIME().

◆ NtUserSetImeOwnerWindow()

BOOL NTAPI NtUserSetImeOwnerWindow ( HWND  hImeWnd,
HWND  hwndFocus 
)

Definition at line 1362 of file ime.c.

1363{
1364 BOOL ret = FALSE;
1365 PWND pImeWnd, pwndFocus, pwndTopLevel, pwndNode, pwndActive;
1366 PTHREADINFO ptiIme;
1367
1369
1370 if (!IS_IMM_MODE())
1371 {
1372 ERR("!IS_IMM_MODE()\n");
1373 goto Quit;
1374 }
1375
1376 pImeWnd = ValidateHwndNoErr(hImeWnd);
1377 if (!pImeWnd || pImeWnd->fnid != FNID_IME)
1378 goto Quit;
1379
1380 pwndFocus = ValidateHwndNoErr(hwndFocus);
1381 if (pwndFocus)
1382 {
1383 if (IS_WND_IMELIKE(pwndFocus))
1384 goto Quit;
1385
1386 pwndTopLevel = IntGetTopLevelWindow(pwndFocus);
1387
1388 for (pwndNode = pwndTopLevel; pwndNode; pwndNode = pwndNode->spwndOwner)
1389 {
1390 if (pwndNode->pcls->atomClassName == gpsi->atomSysClass[ICLS_IME])
1391 {
1392 pwndTopLevel = NULL;
1393 break;
1394 }
1395 }
1396
1397 WndSetOwner(pImeWnd, pwndTopLevel);
1398 IntImeCheckTopmost(pImeWnd);
1399 }
1400 else
1401 {
1402 ptiIme = pImeWnd->head.pti;
1403 pwndActive = ptiIme->MessageQueue->spwndActive;
1404
1405 if (!pwndActive || pwndActive != pImeWnd->spwndOwner)
1406 {
1407 if (pwndActive && ptiIme == pwndActive->head.pti && !IS_WND_IMELIKE(pwndActive))
1408 {
1409 WndSetOwner(pImeWnd, pwndActive);
1410 }
1411 else
1412 {
1413 IntImeSetFutureOwner(pImeWnd, pImeWnd->spwndOwner);
1414 }
1415
1416 IntImeCheckTopmost(pImeWnd);
1417 }
1418 }
1419
1420 ret = TRUE;
1421
1422Quit:
1423 UserLeave();
1424 return ret;
1425}
#define ICLS_IME
Definition: ntuser.h:927
#define FNID_IME
Definition: ntuser.h:874
PWND FASTCALL IntGetTopLevelWindow(PWND pwnd)
Definition: ime.c:487
VOID FASTCALL IntImeSetFutureOwner(PWND pImeWnd, PWND pwndOwner)
Definition: ime.c:1162
VOID FASTCALL IntImeCheckTopmost(PWND pImeWnd)
Definition: ime.c:1346
static VOID WndSetOwner(_Inout_ PWND pwnd, _In_opt_ PWND pwndOwner)
Definition: window.h:150
#define IS_WND_IMELIKE(pWnd)
Definition: window.h:114

Referenced by ImeWnd_OnImeSetContext().

◆ NtUserSetInformationProcess()

DWORD NTAPI NtUserSetInformationProcess ( DWORD  dwUnknown1,
DWORD  dwUnknown2,
DWORD  dwUnknown3,
DWORD  dwUnknown4 
)

Definition at line 658 of file ntstubs.c.

663{
664 STUB;
665 return 0;
666}

◆ NtUserSetInformationThread()

NTSTATUS NTAPI NtUserSetInformationThread ( IN HANDLE  ThreadHandle,
IN USERTHREADINFOCLASS  ThreadInformationClass,
IN PVOID  ThreadInformation,
IN ULONG  ThreadInformationLength 
)

Definition at line 673 of file ntstubs.c.

677{
680
681 /* Allow only CSRSS to perform this operation */
684
686
687 /* Get the Thread */
688 Status = ObReferenceObjectByHandle(ThreadHandle,
691 UserMode,
692 (PVOID)&Thread,
693 NULL);
694 if (!NT_SUCCESS(Status)) goto Quit;
695
697 {
699 {
700 ULONG CapturedFlags = 0;
701
702 TRACE("Shutdown initiated\n");
703
704 if (ThreadInformationLength != sizeof(CapturedFlags))
705 {
707 break;
708 }
709
710 /* Capture the caller value */
713 {
714 ProbeForWrite(ThreadInformation, sizeof(CapturedFlags), __alignof(CapturedFlags));
715 CapturedFlags = *(PULONG)ThreadInformation;
716 }
718 {
720 _SEH2_YIELD(break);
721 }
722 _SEH2_END;
723
724 Status = UserInitiateShutdown(Thread, &CapturedFlags);
725
726 /* Return the modified value to the caller */
728 {
729 *(PULONG)ThreadInformation = CapturedFlags;
730 }
732 {
734 }
735 _SEH2_END;
736
737 break;
738 }
739
741 {
742 NTSTATUS ShutdownStatus;
743
744 TRACE("Shutdown ended\n");
745
746 if (ThreadInformationLength != sizeof(ShutdownStatus))
747 {
749 break;
750 }
751
752 /* Capture the caller value */
755 {
756 ProbeForRead(ThreadInformation, sizeof(ShutdownStatus), __alignof(ShutdownStatus));
757 ShutdownStatus = *(NTSTATUS*)ThreadInformation;
758 }
760 {
762 _SEH2_YIELD(break);
763 }
764 _SEH2_END;
765
766 Status = UserEndShutdown(Thread, ShutdownStatus);
767 break;
768 }
769
771 {
772 HANDLE CsrPortHandle;
773
774
775 TRACE("Set CSR API Port for Win32k\n");
776 if (ThreadInformationLength != sizeof(CsrPortHandle))
777 {
779 break;
780 }
781
782 /* Capture the caller value */
785 {
786 ProbeForRead(ThreadInformation, sizeof(CsrPortHandle), __alignof(CsrPortHandle));
787 CsrPortHandle = *(PHANDLE)ThreadInformation;
788 }
790 {
792 _SEH2_YIELD(break);
793 }
794 _SEH2_END;
795
796 Status = InitCsrApiPort(CsrPortHandle);
797 break;
798 }
799
801 {
802 HDESK hdesk;
803
804 if (Thread != PsGetCurrentThread())
805 {
807 break;
808 }
809
812
813 break;
814 }
816 {
817 if (Thread != PsGetCurrentThread())
818 {
820 break;
821 }
822
824 break;
825 }
826 default:
827 {
828 STUB;
830 break;
831 }
832 }
833
835
836Quit:
837 UserLeave();
838 return Status;
839}
NTSTATUS InitCsrApiPort(IN HANDLE CsrPortHandle)
Definition: csr.c:38
_In_ THREADINFOCLASS _In_ ULONG ThreadInformationLength
Definition: psfuncs.h:843
#define THREAD_SET_INFORMATION
Definition: nt_native.h:1337
HDESK FASTCALL IntGetDesktopObjectHandle(PDESKTOP DesktopObject)
Definition: desktop.c:1288
uint32_t * PULONG
Definition: typedefs.h:59
BOOL IntSetThreadDesktop(IN HDESK hDesktop, IN BOOL FreeOnFailure)
Definition: desktop.c:3296
NTSTATUS UserEndShutdown(IN PETHREAD Thread, IN NTSTATUS ShutdownStatus)
Definition: shutdown.c:290
NTSTATUS UserInitiateShutdown(IN PETHREAD Thread, IN OUT PULONG pFlags)
Definition: shutdown.c:166

Referenced by CSR_API(), EndNowThreadProc(), UserClientConnect(), UserExitReactOS(), and UserServerHardError().

◆ NtUserSetInternalWindowPos()

DWORD NTAPI NtUserSetInternalWindowPos ( HWND  hwnd,
UINT  showCmd,
LPRECT  rect,
LPPOINT  pt 
)

Definition at line 3653 of file winpos.c.

3658{
3659 WINDOWPLACEMENT wndpl;
3660 UINT flags;
3661 PWND Wnd;
3662 RECT rect;
3663 POINT pt = {0};
3664 BOOL Ret = FALSE;
3666
3667 TRACE("Enter NtUserSetWindowPlacement\n");
3669
3670 if (!(Wnd = UserGetWindowObject(hwnd)) || // FIXME:
3672 {
3673 goto Exit; // Return FALSE
3674 }
3675
3676 _SEH2_TRY
3677 {
3678 if (lppt)
3679 {
3680 ProbeForRead(lppt, sizeof(POINT), 1);
3681 RtlCopyMemory(&pt, lppt, sizeof(POINT));
3682 }
3683 if (lprect)
3684 {
3685 ProbeForRead(lprect, sizeof(RECT), 1);
3686 RtlCopyMemory(&rect, lprect, sizeof(RECT));
3687 }
3688 }
3690 {
3692 _SEH2_YIELD(goto Exit); // Return FALSE
3693 }
3694 _SEH2_END
3695
3696 wndpl.length = sizeof(wndpl);
3697 wndpl.showCmd = showCmd;
3698 wndpl.flags = flags = 0;
3699
3700 if ( lppt )
3701 {
3702 flags |= PLACE_MIN;
3703 wndpl.flags |= WPF_SETMINPOSITION;
3704 wndpl.ptMinPosition = pt;
3705 }
3706 if ( lprect )
3707 {
3708 flags |= PLACE_RECT;
3709 wndpl.rcNormalPosition = rect;
3710 }
3711
3712 UserRefObjectCo(Wnd, &Ref);
3713 IntSetWindowPlacement(Wnd, &wndpl, flags);
3714 UserDerefObjectCo(Wnd);
3715 Ret = TRUE;
3716
3717Exit:
3718 TRACE("Leave NtUserSetWindowPlacement, ret=%i\n", Ret);
3719 UserLeave();
3720 return Ret;
3721}
BOOL FASTCALL IntSetWindowPlacement(PWND Wnd, WINDOWPLACEMENT *wpl, UINT Flags)
Definition: winpos.c:671
#define PLACE_RECT
Definition: winpos.c:32
#define PLACE_MIN
Definition: winpos.c:30
#define WPF_SETMINPOSITION
Definition: winuser.h:2536

◆ NtUserSetKeyboardState()

BOOL NTAPI NtUserSetKeyboardState ( LPBYTE  lpKeyState)

Definition at line 2616 of file msgqueue.c.

2617{
2618 UINT i;
2619 BOOL bRet = TRUE;
2620 PTHREADINFO pti;
2621 PUSER_MESSAGE_QUEUE MessageQueue;
2622
2624
2626 MessageQueue = pti->MessageQueue;
2627
2628 _SEH2_TRY
2629 {
2630 ProbeForRead(pKeyState, 256 * sizeof(BYTE), 1);
2631 for (i = 0; i < 256; ++i)
2632 {
2633 SET_KEY_DOWN(MessageQueue->afKeyState, i, pKeyState[i] & KS_DOWN_BIT);
2634 SET_KEY_LOCKED(MessageQueue->afKeyState, i, pKeyState[i] & KS_LOCK_BIT);
2635 }
2636 }
2638 {
2640 bRet = FALSE;
2641 }
2642 _SEH2_END;
2643
2644 UserLeave();
2645
2646 return bRet;
2647}
#define SET_KEY_DOWN(ks, vk, down)
Definition: input.h:100
#define SET_KEY_LOCKED(ks, vk, down)
Definition: input.h:103

Referenced by SetKeyboardState().

◆ NtUserSetLayeredWindowAttributes()

BOOL NTAPI NtUserSetLayeredWindowAttributes ( HWND  hwnd,
COLORREF  crKey,
BYTE  bAlpha,
DWORD  dwFlags 
)

Definition at line 311 of file layered.c.

315{
316 PWND pWnd;
317 BOOL Ret = FALSE;
318
319 TRACE("Enter NtUserSetLayeredWindowAttributes\n");
321
322 if (!(pWnd = UserGetWindowObject(hwnd)) ||
323 !(pWnd->ExStyle & WS_EX_LAYERED) )
324 {
325 ERR("Not a Layered Window!\n");
326 goto Exit;
327 }
328
329 Ret = IntSetLayeredWindowAttributes(pWnd, crKey, bAlpha, dwFlags);
330Exit:
331 TRACE("Leave NtUserSetLayeredWindowAttributes, ret=%i\n", Ret);
332 UserLeave();
333 return Ret;
334}
BOOL FASTCALL IntSetLayeredWindowAttributes(PWND pWnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags)
Definition: layered.c:46

◆ NtUserSetLogonNotifyWindow()

BOOL NTAPI NtUserSetLogonNotifyWindow ( HWND  hWnd)

Definition at line 1953 of file winsta.c.

1954{
1956 {
1957 return FALSE;
1958 }
1959
1960 if (!IntIsWindow(hWnd))
1961 {
1962 return FALSE;
1963 }
1964
1965 hwndSAS = hWnd;
1966
1967 return TRUE;
1968}

Referenced by SetLogonNotifyWindow().

◆ NtUserSetMenu()

BOOL NTAPI NtUserSetMenu ( HWND  hWnd,
HMENU  hMenu,
BOOL  bRepaint 
)

Definition at line 6417 of file menu.c.

6421{
6422 PWND Window;
6423 BOOL Changed;
6424 BOOL Ret = FALSE;
6425
6426 TRACE("Enter NtUserSetMenu\n");
6428
6430 {
6431 goto Exit; // Return FALSE
6432 }
6433
6434 if (!IntSetMenu(Window, Menu, &Changed))
6435 {
6436 goto Exit; // Return FALSE
6437 }
6438
6439 // Not minimized and please repaint!!!
6440 if (!(Window->style & WS_MINIMIZE) && (Repaint || Changed))
6441 {
6443 UserRefObjectCo(Window, &Ref);
6446 }
6447
6448 Ret = TRUE;
6449
6450Exit:
6451 TRACE("Leave NtUserSetMenu, ret=%i\n", Ret);
6452 UserLeave();
6453 return Ret;
6454}
BOOL FASTCALL IntSetMenu(PWND Wnd, HMENU Menu, BOOL *Changed)
Definition: menu.c:5475

Referenced by SetMenu().

◆ NtUserSetMenuContextHelpId()

BOOL NTAPI NtUserSetMenuContextHelpId ( HMENU  hmenu,
DWORD  dwContextHelpId 
)

Definition at line 6460 of file menu.c.

6463{
6464 PMENU Menu;
6465 BOOL Ret = FALSE;
6466
6467 TRACE("Enter NtUserSetMenuContextHelpId\n");
6469
6470 Menu = UserGetMenuObject(hMenu);
6471 if (Menu)
6472 {
6473 Ret = IntSetMenuContextHelpId(Menu, dwContextHelpId);
6474 }
6475
6476 TRACE("Leave NtUserSetMenuContextHelpId, ret=%i\n", Ret);
6477 UserLeave();
6478 return Ret;
6479}
BOOL FASTCALL IntSetMenuContextHelpId(PMENU Menu, DWORD dwContextHelpId)
Definition: menu.c:872

Referenced by SetMenuContextHelpId().

◆ NtUserSetMenuDefaultItem()

BOOL NTAPI NtUserSetMenuDefaultItem ( HMENU  hMenu,
UINT  uItem,
UINT  fByPos 
)

Definition at line 6485 of file menu.c.

6489{
6490 PMENU Menu;
6491 BOOL Ret = FALSE;
6492
6493 TRACE("Enter NtUserSetMenuDefaultItem\n");
6495
6496 Menu = UserGetMenuObject(hMenu);
6497 if (Menu)
6498 {
6499 Ret = UserSetMenuDefaultItem(Menu, uItem, fByPos);
6500 }
6501
6502 TRACE("Leave NtUserSetMenuDefaultItem, ret=%i\n", Ret);
6503 UserLeave();
6504 return Ret;
6505}
BOOL FASTCALL UserSetMenuDefaultItem(PMENU MenuObject, UINT uItem, UINT fByPos)
Definition: menu.c:1274

Referenced by SetMenuDefaultItem().

◆ NtUserSetMenuFlagRtoL()

BOOL NTAPI NtUserSetMenuFlagRtoL ( HMENU  hMenu)

Definition at line 6511 of file menu.c.

6513{
6514 PMENU Menu;
6515 BOOL Ret = FALSE;
6516
6517 TRACE("Enter NtUserSetMenuFlagRtoL\n");
6519
6520 Menu = UserGetMenuObject(hMenu);
6521 if (Menu)
6522 {
6523 Ret = IntSetMenuFlagRtoL(Menu);
6524 }
6525
6526 TRACE("Leave NtUserSetMenuFlagRtoL, ret=%i\n", Ret);
6527 UserLeave();
6528 return Ret;
6529}
BOOL FASTCALL IntSetMenuFlagRtoL(PMENU Menu)
Definition: menu.c:864

◆ NtUserSetObjectInformation()

BOOL NTAPI NtUserSetObjectInformation ( HANDLE  hObject,
DWORD  nIndex,
PVOID  pvInformation,
DWORD  nLength 
)

Definition at line 1339 of file winsta.c.

1344{
1345 /* FIXME: ZwQueryObject */
1346 /* FIXME: ZwSetInformationObject */
1348 return FALSE;
1349}

◆ NtUserSetParent()

HWND NTAPI NtUserSetParent ( HWND  hWndChild,
HWND  hWndNewParent 
)

Definition at line 3650 of file window.c.

3651{
3652 HWND Ret;
3653
3654 TRACE("Enter NtUserSetParent\n");
3656
3657 /*
3658 Check Parent first from user space, set it here.
3659 */
3660 if (!hWndNewParent)
3661 {
3662 hWndNewParent = IntGetDesktopWindow();
3663 }
3664 else if (hWndNewParent == HWND_MESSAGE)
3665 {
3666 hWndNewParent = IntGetMessageWindow();
3667 }
3668
3669 Ret = co_UserSetParent(hWndChild, hWndNewParent);
3670
3671 TRACE("Leave NtUserSetParent, ret=%p\n", Ret);
3672 UserLeave();
3673 return Ret;
3674}
HWND hWndChild[NUM_TABS]
Definition: main.h:74
HWND FASTCALL co_UserSetParent(HWND hWndChild, HWND hWndNewParent)
Definition: window.c:1297

Referenced by SetParent().

◆ NtUserSetProcessWindowStation()

BOOL NTAPI NtUserSetProcessWindowStation ( HWINSTA  hWindowStation)

Definition at line 1518 of file winsta.c.

1519{
1520 BOOL ret;
1521
1523
1524 ret = UserSetProcessWindowStation(hWindowStation);
1525
1526 UserLeave();
1527
1528 return ret;
1529}
BOOL FASTCALL UserSetProcessWindowStation(HWINSTA hWindowStation)
Definition: winsta.c:1382

Referenced by SetProcessWindowStation().

◆ NtUserSetProp()

BOOL NTAPI NtUserSetProp ( HWND  hWnd,
ATOM  Atom,
HANDLE  Data 
)

◆ NtUserSetRipFlags()

DWORD NTAPI NtUserSetRipFlags ( DWORD  Unknown0)

Definition at line 256 of file ntstubs.c.

258{
259 STUB;
260
261 return 0;
262}

◆ NtUserSetScrollBarInfo()

BOOL NTAPI NtUserSetScrollBarInfo ( HWND  hwnd,
LONG  idObject,
SETSCROLLBARINFO info 
)

Definition at line 1397 of file scrollbar.c.

1401{
1402 PWND Window = NULL;
1403 SETSCROLLBARINFO Safeinfo;
1404 PSCROLLBARINFO sbi;
1405 LPSCROLLINFO psi;
1407 LONG Obj;
1408 BOOL Ret = FALSE;
1410
1411 TRACE("Enter NtUserSetScrollBarInfo\n");
1413
1415 goto Cleanup; // Return FALSE
1416
1417 UserRefObjectCo(Window, &Ref);
1418
1419 Obj = SBOBJ_TO_SBID(idObject);
1420 if(!SBID_IS_VALID(Obj))
1421 {
1423 ERR("Trying to set scrollinfo for unknown scrollbar type %d\n", Obj);
1424 goto Cleanup; // Return FALSE
1425 }
1426
1428 goto Cleanup; // Return FALSE
1429
1430 Status = MmCopyFromCaller(&Safeinfo, info, sizeof(SETSCROLLBARINFO));
1431 if(!NT_SUCCESS(Status))
1432 {
1434 goto Cleanup; // Return FALSE
1435 }
1436
1439
1440 psi->nTrackPos = Safeinfo.nTrackPos;
1441 sbi->reserved = Safeinfo.reserved;
1442 RtlCopyMemory(&sbi->rgstate, &Safeinfo.rgstate, sizeof(Safeinfo.rgstate));
1443
1444 Ret = TRUE;
1445
1446Cleanup:
1447 if (Window)
1449
1450 TRACE("Leave NtUserSetScrollBarInfo, ret=%i\n", Ret);
1451 UserLeave();
1452 return Ret;
1453}
#define IntGetScrollInfoFromWindow(Window, i)
Definition: scroll.h:36
#define SBOBJ_TO_SBID(Obj)
Definition: scroll.h:39
DWORD rgstate[CCHILDREN_SCROLLBAR+1]
Definition: ntuser.h:3627
DWORD rgstate[CCHILDREN_SCROLLBAR+1]
Definition: winuser.h:3757

Referenced by IntScrollHandleScrollEvent(), and IntUpdateScrollArrows().

◆ NtUserSetScrollInfo()

DWORD NTAPI NtUserSetScrollInfo ( HWND  hwnd,
int  fnBar,
LPCSCROLLINFO  lpsi,
BOOL  bRedraw 
)

Definition at line 1331 of file scrollbar.c.

1336{
1337 PWND Window = NULL;
1339 SCROLLINFO ScrollInfo;
1340 DWORD Ret = 0;
1342
1343 TRACE("Enter NtUserSetScrollInfo\n");
1345
1347 goto Cleanup; // Return 0
1348
1349 UserRefObjectCo(Window, &Ref);
1350
1351 Status = MmCopyFromCaller(&ScrollInfo, lpsi, sizeof(SCROLLINFO) - sizeof(ScrollInfo.nTrackPos));
1352 if(!NT_SUCCESS(Status))
1353 {
1355 goto Cleanup; // Return 0
1356 }
1357
1358 Ret = co_IntSetScrollInfo(Window, fnBar, &ScrollInfo, bRedraw);
1359
1360Cleanup:
1361 if (Window)
1363
1364 TRACE("Leave NtUserSetScrollInfo, ret=%lu\n", Ret);
1365 UserLeave();
1366 return Ret;
1367}
static DWORD FASTCALL co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
Definition: scrollbar.c:455

Referenced by IntScrollCreateScrollBar(), IntSetScrollInfo(), and RealSetScrollInfo().

◆ NtUserSetShellWindowEx()

BOOL NTAPI NtUserSetShellWindowEx ( HWND  hwndShell,
HWND  hwndShellListView 
)

Definition at line 3717 of file window.c.

3718{
3719 PWINSTATION_OBJECT WinStaObject;
3720 PWND WndShell, WndListView;
3721 BOOL Ret = FALSE;
3724 PTHREADINFO ti;
3725
3726 TRACE("Enter NtUserSetShellWindowEx\n");
3728
3729 if (!(WndShell = UserGetWindowObject(hwndShell)))
3730 {
3731 goto Exit; // Return FALSE
3732 }
3733
3734 if (!(WndListView = UserGetWindowObject(hwndListView)))
3735 {
3736 goto Exit; // Return FALSE
3737 }
3738
3740 UserMode,
3741 0,
3742 &WinStaObject,
3743 0);
3744
3745 if (!NT_SUCCESS(Status))
3746 {
3748 goto Exit; // Return FALSE
3749 }
3750
3751 /*
3752 * Test if we are permitted to change the shell window.
3753 */
3754 if (WinStaObject->ShellWindow)
3755 {
3756 ObDereferenceObject(WinStaObject);
3757 goto Exit; // Return FALSE
3758 }
3759
3760 /*
3761 * Move shell window into background.
3762 */
3763 if (hwndListView && hwndListView != hwndShell)
3764 {
3765 /*
3766 * Disabled for now to get Explorer working.
3767 * -- Filip, 01/nov/2003
3768 */
3769#if 0
3771#endif
3772
3773 if (WndListView->ExStyle & WS_EX_TOPMOST)
3774 {
3775 ObDereferenceObject(WinStaObject);
3776 goto Exit; // Return FALSE
3777 }
3778 }
3779
3780 if (WndShell->ExStyle & WS_EX_TOPMOST)
3781 {
3782 ObDereferenceObject(WinStaObject);
3783 goto Exit; // Return FALSE
3784 }
3785
3786 UserRefObjectCo(WndShell, &Ref);
3787 WndShell->state2 |= WNDS2_BOTTOMMOST;
3789
3790 WinStaObject->ShellWindow = hwndShell;
3791 WinStaObject->ShellListView = hwndListView;
3792
3793 ti = GetW32ThreadInfo();
3794 if (ti->pDeskInfo)
3795 {
3796 ti->pDeskInfo->hShellWindow = hwndShell;
3797 ti->pDeskInfo->spwndShell = WndShell;
3798 ti->pDeskInfo->spwndBkGnd = WndListView;
3799 ti->pDeskInfo->ppiShellProcess = ti->ppi;
3800 }
3801
3803
3804 UserDerefObjectCo(WndShell);
3805
3806 ObDereferenceObject(WinStaObject);
3807 Ret = TRUE;
3808
3809Exit:
3810 TRACE("Leave NtUserSetShellWindowEx, ret=%i\n", Ret);
3811 UserLeave();
3812 return Ret;
3813}
HWND hwndListView
Definition: eventvwr.c:66
#define WNDS2_BOTTOMMOST
Definition: ntuser.h:646
HANDLE ShellListView
Definition: winsta.h:44
HANDLE ShellWindow
Definition: winsta.h:43
BOOL FASTCALL UserRegisterHotKey(PWND pWnd, int id, UINT fsModifiers, UINT vk)
Definition: hotkey.c:431
#define SC_TASKLIST
Definition: winuser.h:2602

Referenced by SetShellWindow(), and SetShellWindowEx().

◆ NtUserSetSysColors()

BOOL NTAPI NtUserSetSysColors ( int  cElements,
IN CONST INT lpaElements,
IN CONST COLORREF lpaRgbValues,
FLONG  Flags 
)

Definition at line 288 of file ntstubs.c.

293{
294 DWORD Ret = TRUE;
295
296 if (cElements == 0)
297 return TRUE;
298
299 /* We need this check to prevent overflow later */
300 if ((ULONG)cElements >= 0x40000000)
301 {
303 return FALSE;
304 }
305
307
309 {
310 ProbeForRead(lpaElements, cElements * sizeof(INT), 1);
311 ProbeForRead(lpaRgbValues, cElements * sizeof(COLORREF), 1);
312
313 IntSetSysColors(cElements, lpaElements, lpaRgbValues);
314 }
316 {
318 Ret = FALSE;
319 }
320 _SEH2_END;
321
322 if (Ret)
323 {
325
327 }
328
329 UserLeave();
330 return Ret;
331}
VOID FASTCALL IntSetSysColors(UINT nColors, CONST INT *Elements, CONST COLORREF *Colors)
Definition: stockobj.c:300
VOID APIENTRY UserRedrawDesktop(VOID)
Definition: desktop.c:1616
DWORD COLORREF
Definition: windef.h:300
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1629

Referenced by SetSysColors().

◆ NtUserSetSystemCursor()

BOOL NTAPI NtUserSetSystemCursor ( HCURSOR  hcur,
DWORD  id 
)

Definition at line 2201 of file cursoricon.c.

2204{
2205 PCURICON_OBJECT pcur, pcurOrig = NULL;
2206 int i;
2207 PPROCESSINFO ppi;
2208 BOOL Ret = FALSE;
2210
2212 {
2213 goto Exit;
2214 }
2215
2216 if (hcur)
2217 {
2218 pcur = UserGetCurIconObject(hcur);
2219 if (!pcur)
2220 {
2222 goto Exit;
2223 }
2224
2226
2227 for (i = 0 ; i < 16; i++)
2228 {
2229 if (gasyscur[i].type == id)
2230 {
2231 pcurOrig = gasyscur[i].handle;
2232
2233 if (pcurOrig) break;
2234
2235 if (ppi->W32PF_flags & W32PF_CREATEDWINORDC)
2236 {
2237 gasyscur[i].handle = pcur;
2239 pcur->head.ppi = NULL;
2241 Ret = TRUE;
2242 }
2243 break;
2244 }
2245 }
2246 if (pcurOrig)
2247 {
2248 FIXME("Need to copy cursor data or do something! pcurOrig %p new pcur %p\n",pcurOrig,pcur);
2249 }
2250 }
2251Exit:
2252 UserLeave();
2253 return Ret;
2254}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
BOOL FASTCALL CheckWinstaAttributeAccess(ACCESS_MASK DesiredAccess)
Definition: winsta.c:377
PCURICON_OBJECT handle
Definition: cursoricon.h:99
#define W32PF_CREATEDWINORDC
Definition: win32.h:34
static VOID IntInsertCursorIntoList(_Inout_ PCURICON_OBJECT pcur)
Definition: cursoricon.c:80
SYSTEMCURICO gasyscur[]
Definition: cursoricon.c:32
#define WINSTA_WRITEATTRIBUTES
Definition: winuser.h:416

Referenced by LoadSystemCursors(), and SetSystemCursor().

◆ NtUserSetSystemMenu()

BOOL NTAPI NtUserSetSystemMenu ( HWND  hWnd,
HMENU  hMenu 
)

Definition at line 5711 of file menu.c.

5712{
5713 BOOL Result = FALSE;
5714 PWND Window;
5715 PMENU Menu;
5716
5717 TRACE("Enter NtUserSetSystemMenu\n");
5719
5721 {
5722 goto Exit; // Return FALSE
5723 }
5724
5725 if (hMenu)
5726 {
5727 /*
5728 * Assign new menu handle and Up the Lock Count.
5729 */
5730 if (!(Menu = IntGetMenuObject(hMenu)))
5731 {
5732 goto Exit; // Return FALSE
5733 }
5734
5736 }
5737 else
5739
5740Exit:
5741 TRACE("Leave NtUserSetSystemMenu, ret=%i\n", Result);
5742 UserLeave();
5743 return Result;
5744}
BOOL FASTCALL IntSetSystemMenu(PWND Window, PMENU Menu)
Definition: menu.c:5442

Referenced by SetSystemMenu().

◆ NtUserSetSystemTimer()

UINT_PTR NTAPI NtUserSetSystemTimer ( HWND  hWnd,
UINT_PTR  nIDEvent,
UINT  uElapse,
TIMERPROC  lpTimerFunc 
)

Definition at line 685 of file timer.c.

691{
693
695 TRACE("Enter NtUserSetSystemTimer\n");
696
697 ret = IntSetTimer(UserGetWindowObject(hWnd), nIDEvent, uElapse, NULL, TMRF_SYSTEM);
698
699 UserLeave();
700
701 TRACE("Leave NtUserSetSystemTimer, ret=%u\n", ret);
702 return ret;
703}

Referenced by SetSystemTimer().

◆ NtUserSetThreadDesktop()

BOOL NTAPI NtUserSetThreadDesktop ( HDESK  hDesktop)

Definition at line 3488 of file desktop.c.

3489{
3490 BOOL ret = FALSE;
3491
3493
3494 // FIXME: IntSetThreadDesktop validates the desktop handle, it should happen
3495 // here too and set the NT error level. Q. Is it necessary to have the validation
3496 // in IntSetThreadDesktop? Is it needed there too?
3497 if (hDesktop || (!hDesktop && PsGetCurrentProcess() == gpepCSRSS))
3498 ret = IntSetThreadDesktop(hDesktop, FALSE);
3499
3500 UserLeave();
3501
3502 return ret;
3503}

Referenced by SetThreadDesktop().

◆ NtUserSetThreadLayoutHandles()

DWORD NTAPI NtUserSetThreadLayoutHandles ( HKL  hNewKL,
HKL  hOldKL 
)

Definition at line 508 of file ime.c.

509{
510 PTHREADINFO pti;
511 PKL pOldKL, pNewKL;
512
514
515 pti = GetW32ThreadInfo();
516 pOldKL = pti->KeyboardLayout;
517 if (pOldKL && pOldKL->hkl != hOldKL)
518 goto Quit;
519
520 pNewKL = UserHklToKbl(hNewKL);
521 if (!pNewKL)
522 goto Quit;
523
524 if (IS_IME_HKL(hNewKL) != IS_IME_HKL(hOldKL))
525 pti->hklPrev = hOldKL;
526
527 UserAssignmentLock((PVOID*)&pti->KeyboardLayout, pNewKL);
528 pti->pClientInfo->hKL = pNewKL->hkl;
529
530Quit:
531 UserLeave();
532 return 0;
533}
PVOID FASTCALL UserAssignmentLock(PVOID *ppvObj, PVOID pvNew)
Definition: object.c:839

Referenced by ImmActivateLayout().

◆ NtUserSetThreadState()

DWORD NTAPI NtUserSetThreadState ( DWORD  Unknown0,
DWORD  Unknown1 
)

Definition at line 361 of file misc.c.

364{
365 PTHREADINFO pti;
366 DWORD Ret = 0;
367 // Test the only flags user can change.
372 if (pti->MessageQueue)
373 {
374 Ret = pti->MessageQueue->QF_flags; // Get the queue flags.
375 if (Set)
376 pti->MessageQueue->QF_flags |= (Set&Flags); // Set the queue flags.
377 else
378 {
379 if (Flags) pti->MessageQueue->QF_flags &= ~Flags; // Clr the queue flags.
380 }
381 }
382 UserLeave();
383 return Ret;
384}
#define QF_DIALOGACTIVE
Definition: msgqueue.h:106
#define QF_TABSWITCHING
Definition: msgqueue.h:101
#define QF_FMENUSTATUSBREAK
Definition: msgqueue.h:96
#define QF_FMENUSTATUS
Definition: msgqueue.h:97
#define QF_FF10STATUS
Definition: msgqueue.h:98
static BOOL Set
Definition: pageheap.c:10

Referenced by DEFDLG_Proc().

◆ NtUserSetTimer()

UINT_PTR NTAPI NtUserSetTimer ( HWND  hWnd,
UINT_PTR  nIDEvent,
UINT  uElapse,
TIMERPROC  lpTimerFunc 
)

Definition at line 635 of file timer.c.

642{
643 PWND Window = NULL;
645
646 TRACE("Enter NtUserSetTimer\n");
649
650 ret = IntSetTimer(Window, nIDEvent, uElapse, lpTimerFunc, TMRF_TIFROMWND);
651
652 UserLeave();
653 TRACE("Leave NtUserSetTimer, ret=%u\n", ret);
654
655 return ret;
656}
#define TMRF_TIFROMWND
Definition: timer.h:25

Referenced by SetTimer().

◆ NtUserSetWindowFNID()

BOOL NTAPI NtUserSetWindowFNID ( HWND  hWnd,
WORD  fnID 
)

Definition at line 4335 of file window.c.

4337{
4338 PWND Wnd;
4339 BOOL Ret = FALSE;
4340
4341 TRACE("Enter NtUserSetWindowFNID\n");
4343
4344 if (!(Wnd = UserGetWindowObject(hWnd)))
4345 {
4346 goto Exit; // Return FALSE
4347 }
4348
4349 if (Wnd->head.pti->ppi != PsGetCurrentProcessWin32Process())
4350 {
4352 goto Exit; // Return FALSE
4353 }
4354
4355 // From user land we only set these.
4356 if (fnID != FNID_DESTROY)
4357 {
4358 /* HACK: The minimum should be FNID_BUTTON, but menu code relies on this */
4359 if (fnID < FNID_FIRST || fnID > FNID_GHOST ||
4360 Wnd->fnid != 0)
4361 {
4363 goto Exit; // Return FALSE
4364 }
4365 }
4366
4367 Wnd->fnid |= fnID;
4368 Ret = TRUE;
4369
4370Exit:
4371 TRACE("Leave NtUserSetWindowFNID\n");
4372 UserLeave();
4373 return Ret;
4374}

Referenced by ButtonWndProc_common(), ComboWndProc_common(), EditWndProc_common(), Ghost_OnCreate(), Ghost_OnNCDestroy(), ImeWndProc_common(), ListBoxWndProc_common(), MDIClientWndProc_common(), MsgWindowProc(), ScrollBarWndProc_common(), StaticWndProc_common(), and SwitchWndProc_common().

◆ NtUserSetWindowLong()

LONG NTAPI NtUserSetWindowLong ( HWND  hWnd,
DWORD  Index,
LONG  NewValue,
BOOL  Ansi 
)

Definition at line 4048 of file window.c.

4049{
4050 LONG ret;
4051
4053
4054 if (hWnd == IntGetDesktopWindow())
4055 {
4057 UserLeave();
4058 return 0;
4059 }
4060
4061 ret = (LONG)co_IntSetWindowLongPtr(hWnd, Index, NewValue, Ansi, sizeof(LONG), FALSE);
4062
4063 UserLeave();
4064
4065 return ret;
4066}

Referenced by SetWindowLongA(), and SetWindowLongW().

◆ NtUserSetWindowPlacement()

BOOL NTAPI NtUserSetWindowPlacement ( HWND  hWnd,
WINDOWPLACEMENT lpwndpl 
)

Definition at line 3727 of file winpos.c.

3729{
3730 PWND Wnd;
3731 WINDOWPLACEMENT Safepl;
3732 UINT Flags;
3733 BOOL Ret = FALSE;
3735
3736 TRACE("Enter NtUserSetWindowPlacement\n");
3738
3739 _SEH2_TRY
3740 {
3741 ProbeForRead(lpwndpl, sizeof(*lpwndpl), 1);
3742 Safepl = *lpwndpl;
3743 }
3745 {
3747 _SEH2_YIELD(goto Exit); // Return FALSE
3748 }
3749 _SEH2_END
3750
3751 /* Backwards-compatibility: Win 3.x doesn't check the length */
3753 Safepl.length = sizeof(Safepl);
3754
3755 if (Safepl.length != sizeof(Safepl))
3756 {
3758 goto Exit;
3759 }
3760
3762 if (Safepl.flags & WPF_SETMINPOSITION)
3763 Flags |= PLACE_MIN;
3764
3766 if (!Wnd)
3767 goto Exit; // Return FALSE
3768
3769 UserRefObjectCo(Wnd, &Ref);
3770 if (!UserIsDesktopWindow(Wnd) && !UserIsMessageWindow(Wnd))
3771 Ret = IntSetWindowPlacement(Wnd, &Safepl, Flags);
3772 UserDerefObjectCo(Wnd);
3773
3774Exit:
3775 TRACE("Leave NtUserSetWindowPlacement, ret=%i\n", Ret);
3776 UserLeave();
3777 return Ret;
3778}
#define PLACE_MAX
Definition: winpos.c:31
DWORD dwExpWinVer
Definition: win32.h:112
#define WINVER_WINNT4
Definition: window.h:57

Referenced by SetWindowPlacement().

◆ NtUserSetWindowPos()

BOOL NTAPI NtUserSetWindowPos ( HWND  hWnd,
HWND  hWndInsertAfter,
int  X,
int  Y,
int  cx,
int  cy,
UINT  uFlags 
)

Definition at line 3533 of file winpos.c.

3541{
3542 PWND Window, pWndIA;
3543 BOOL ret = FALSE;
3545
3546 TRACE("Enter NtUserSetWindowPos\n");
3548
3549 if (!(Window = UserGetWindowObject(hWnd)) ||
3551 {
3552 ERR("NtUserSetWindowPos bad window handle!\n");
3553 goto Exit; // Return FALSE
3554 }
3555
3556 if ( hWndInsertAfter != HWND_TOP &&
3557 hWndInsertAfter != HWND_BOTTOM &&
3558 hWndInsertAfter != HWND_TOPMOST &&
3559 hWndInsertAfter != HWND_NOTOPMOST )
3560 {
3561 if (!(pWndIA = UserGetWindowObject(hWndInsertAfter)) ||
3562 UserIsDesktopWindow(pWndIA) || UserIsMessageWindow(pWndIA))
3563 {
3564 ERR("NtUserSetWindowPos bad insert window handle!\n");
3565 goto Exit; // Return FALSE
3566 }
3567 }
3568
3569 /* First make sure that coordinates are valid for WM_WINDOWPOSCHANGING */
3570 if (!(uFlags & SWP_NOMOVE))
3571 {
3572 if (X < -32768) X = -32768;
3573 else if (X > 32767) X = 32767;
3574 if (Y < -32768) Y = -32768;
3575 else if (Y > 32767) Y = 32767;
3576 }
3577 if (!(uFlags & SWP_NOSIZE))
3578 {
3579 if (cx < 0) cx = 0;
3580 else if (cx > 32767) cx = 32767;
3581 if (cy < 0) cy = 0;
3582 else if (cy > 32767) cy = 32767;
3583 }
3584
3585 UserRefObjectCo(Window, &Ref);
3586 ret = co_WinPosSetWindowPos(Window, hWndInsertAfter, X, Y, cx, cy, uFlags);
3588
3589Exit:
3590 TRACE("Leave NtUserSetWindowPos, ret=%i\n", ret);
3591 UserLeave();
3592 return ret;
3593}
#define HWND_TOP
Definition: winuser.h:1210

Referenced by BringWindowToTop(), NtUserMoveWindow(), and SetWindowPos().

◆ NtUserSetWindowRgn()

INT NTAPI NtUserSetWindowRgn ( HWND  hWnd,
HRGN  hRgn,
BOOL  bRedraw 
)

Definition at line 3599 of file winpos.c.

3603{
3604 HRGN hrgnCopy = NULL;
3605 PWND Window;
3607 INT Ret = 0;
3608
3609 TRACE("Enter NtUserSetWindowRgn\n");
3611
3612 if (!(Window = UserGetWindowObject(hWnd)) ||
3614 {
3615 goto Exit; // Return 0
3616 }
3617
3618 if (hRgn) // The region will be deleted in user32.
3619 {
3621 {
3622 hrgnCopy = NtGdiCreateRectRgn(0, 0, 0, 0);
3623 /* The coordinates of a window's window region are relative to the
3624 upper-left corner of the window, not the client area of the window. */
3625 NtGdiCombineRgn( hrgnCopy, hRgn, 0, RGN_COPY);
3626 }
3627 else
3628 goto Exit; // Return 0
3629 }
3630
3632 if (hrgnCopy)
3633 {
3634 Window->hrgnNewFrame = hrgnCopy; // Should be PSMWP->acvr->hrgnClip
3635 }
3636 else
3637 {
3638 Window->hrgnNewFrame = HRGN_WINDOW;
3639 }
3641 Ret = (INT)co_WinPosSetWindowPos(Window, HWND_TOP, 0, 0, 0, 0, bRedraw ? flags : (flags | SWP_NOREDRAW));
3642
3643Exit:
3644 TRACE("Leave NtUserSetWindowRgn, ret=%i\n", Ret);
3645 UserLeave();
3646 return Ret;
3647}
#define SWP_NOCLIENTSIZE
Definition: msg.h:31
#define SWP_NOCLIENTMOVE
Definition: msg.h:32
__kernel_entry W32KAPI INT APIENTRY NtGdiCombineRgn(_In_ HRGN hrgnDst, _In_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ INT iMode)
__kernel_entry W32KAPI HRGN APIENTRY NtGdiCreateRectRgn(_In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
BOOL NTAPI GreIsHandleValid(HGDIOBJ hobj)
Definition: gdiobj.c:1146
#define RGN_COPY
Definition: wingdi.h:357

Referenced by ResetUserApiHook(), and SetWindowRgn().

◆ NtUserSetWindowsHookAW()

HHOOK NTAPI NtUserSetWindowsHookAW ( int  idHook,
HOOKPROC  lpfn,
BOOL  Ansi 
)

Definition at line 1419 of file hook.c.

1422{
1423 DWORD ThreadId;
1424 UNICODE_STRING USModuleName;
1425
1426 RtlInitUnicodeString(&USModuleName, NULL);
1428
1430 &USModuleName,
1431 ThreadId,
1432 idHook,
1433 lpfn,
1434 Ansi);
1435}
#define PtrToUint(p)
Definition: basetsd.h:85
#define NtCurrentTeb
HHOOK APIENTRY NtUserSetWindowsHookEx(HINSTANCE Mod, PUNICODE_STRING UnsafeModuleName, DWORD ThreadId, int HookId, HOOKPROC HookProc, BOOL Ansi)
Definition: hook.c:1439
HANDLE UniqueThread
Definition: compat.h:826
_Out_ PCLIENT_ID ClientId
Definition: kefuncs.h:1151

◆ NtUserSetWindowsHookEx()

HHOOK NTAPI NtUserSetWindowsHookEx ( HINSTANCE  Mod,
PUNICODE_STRING  ModuleName,
DWORD  ThreadId,
int  HookId,
HOOKPROC  HookProc,
BOOL  Ansi 
)

Definition at line 1439 of file hook.c.

1445{
1446 PWINSTATION_OBJECT WinStaObj;
1447 PHOOK Hook = NULL;
1450 HHOOK Handle;
1451 PTHREADINFO pti, ptiHook = NULL;
1452 HHOOK Ret = NULL;
1453
1454 TRACE("Enter NtUserSetWindowsHookEx\n");
1456
1458
1459 if (HookId < WH_MINHOOK || WH_MAXHOOK < HookId )
1460 {
1462 goto Cleanup; // Return NULL
1463 }
1464
1465 if (!HookProc)
1466 {
1468 goto Cleanup; // Return NULL
1469 }
1470
1471 if (ThreadId) /* thread-local hook */
1472 {
1473 if ( HookId == WH_JOURNALRECORD ||
1474 HookId == WH_JOURNALPLAYBACK ||
1475 HookId == WH_KEYBOARD_LL ||
1476 HookId == WH_MOUSE_LL ||
1477 HookId == WH_SYSMSGFILTER)
1478 {
1479 TRACE("Local hook installing Global HookId: %d\n",HookId);
1480 /* these can only be global */
1482 goto Cleanup; // Return NULL
1483 }
1484
1485 if ( !(ptiHook = IntTID2PTI( UlongToHandle(ThreadId) )))
1486 {
1487 ERR("Invalid thread id 0x%x\n", ThreadId);
1489 goto Cleanup; // Return NULL
1490 }
1491
1492 if ( ptiHook->rpdesk != pti->rpdesk) // gptiCurrent->rpdesk)
1493 {
1494 ERR("Local hook wrong desktop HookId: %d\n",HookId);
1496 goto Cleanup; // Return NULL
1497 }
1498
1499 if (ptiHook->ppi != pti->ppi)
1500 {
1501 if ( !Mod &&
1502 (HookId == WH_GETMESSAGE ||
1503 HookId == WH_CALLWNDPROC ||
1504 HookId == WH_CBT ||
1505 HookId == WH_HARDWARE ||
1506 HookId == WH_DEBUG ||
1507 HookId == WH_SHELL ||
1508 HookId == WH_FOREGROUNDIDLE ||
1509 HookId == WH_CALLWNDPROCRET) )
1510 {
1511 ERR("Local hook needs hMod HookId: %d\n",HookId);
1513 goto Cleanup; // Return NULL
1514 }
1515
1516 if ( (ptiHook->TIF_flags & (TIF_CSRSSTHREAD|TIF_SYSTEMTHREAD)) &&
1517 (HookId == WH_GETMESSAGE ||
1518 HookId == WH_CALLWNDPROC ||
1519 HookId == WH_CBT ||
1520 HookId == WH_HARDWARE ||
1521 HookId == WH_DEBUG ||
1522 HookId == WH_SHELL ||
1523 HookId == WH_FOREGROUNDIDLE ||
1524 HookId == WH_CALLWNDPROCRET) )
1525 {
1527 goto Cleanup; // Return NULL
1528 }
1529 }
1530 }
1531 else /* System-global hook */
1532 {
1533 ptiHook = pti; // gptiCurrent;
1534 if ( !Mod &&
1535 (HookId == WH_GETMESSAGE ||
1536 HookId == WH_CALLWNDPROC ||
1537 HookId == WH_CBT ||
1538 HookId == WH_SYSMSGFILTER ||
1539 HookId == WH_HARDWARE ||
1540 HookId == WH_DEBUG ||
1541 HookId == WH_SHELL ||
1542 HookId == WH_FOREGROUNDIDLE ||
1543 HookId == WH_CALLWNDPROCRET) )
1544 {
1545 ERR("Global hook needs hMod HookId: %d\n",HookId);
1547 goto Cleanup; // Return NULL
1548 }
1549 }
1550
1552 UserMode,
1553 0,
1554 &WinStaObj,
1555 0);
1556
1557 if (!NT_SUCCESS(Status))
1558 {
1560 goto Cleanup; // Return NULL
1561 }
1562 ObDereferenceObject(WinStaObj);
1563
1564 Hook = UserCreateObject(gHandleTable, NULL, ptiHook, (PHANDLE)&Handle, TYPE_HOOK, sizeof(HOOK));
1565
1566 if (!Hook)
1567 {
1568 goto Cleanup; // Return NULL
1569 }
1570
1571 Hook->ihmod = (INT_PTR)Mod; // Module Index from atom table, Do this for now.
1572 Hook->HookId = HookId;
1573 Hook->rpdesk = ptiHook->rpdesk;
1574 Hook->phkNext = NULL; /* Dont use as a chain! Use link lists for chaining. */
1575 Hook->Proc = HookProc;
1576 Hook->Ansi = Ansi;
1577
1578 TRACE("Set Hook Desk %p DeskInfo %p Handle Desk %p\n", pti->rpdesk, pti->pDeskInfo, Hook->head.rpdesk);
1579
1580 if (ThreadId) /* Thread-local hook */
1581 {
1582 InsertHeadList(&ptiHook->aphkStart[HOOKID_TO_INDEX(HookId)], &Hook->Chain);
1583 ptiHook->sphkCurrent = NULL;
1584 Hook->ptiHooked = ptiHook;
1585 ptiHook->fsHooks |= HOOKID_TO_FLAG(HookId);
1586
1587 if (ptiHook->pClientInfo)
1588 {
1589 if ( ptiHook->ppi == pti->ppi) /* gptiCurrent->ppi) */
1590 {
1591 _SEH2_TRY
1592 {
1593 ptiHook->pClientInfo->fsHooks = ptiHook->fsHooks;
1594 ptiHook->pClientInfo->phkCurrent = NULL;
1595 }
1597 {
1598 ERR("Problem writing to Local ClientInfo!\n");
1599 }
1600 _SEH2_END;
1601 }
1602 else
1603 {
1605
1606 KeStackAttachProcess(&ptiHook->ppi->peProcess->Pcb, &ApcState);
1607 _SEH2_TRY
1608 {
1609 ptiHook->pClientInfo->fsHooks = ptiHook->fsHooks;
1610 ptiHook->pClientInfo->phkCurrent = NULL;
1611 }
1613 {
1614 ERR("Problem writing to Remote ClientInfo!\n");
1615 }
1616 _SEH2_END;
1618 }
1619 }
1620 }
1621 else
1622 {
1623 InsertHeadList(&ptiHook->rpdesk->pDeskInfo->aphkStart[HOOKID_TO_INDEX(HookId)], &Hook->Chain);
1624 Hook->ptiHooked = NULL;
1625 //gptiCurrent->pDeskInfo->fsHooks |= HOOKID_TO_FLAG(HookId);
1626 ptiHook->rpdesk->pDeskInfo->fsHooks |= HOOKID_TO_FLAG(HookId);
1627 ptiHook->sphkCurrent = NULL;
1628 ptiHook->pClientInfo->phkCurrent = NULL;
1629 }
1630
1632
1633 if (Mod)
1634 {
1636 UnsafeModuleName,
1637 sizeof(UNICODE_STRING));
1638 if (!NT_SUCCESS(Status))
1639 {
1640 IntRemoveHook(Hook);
1642 goto Cleanup; // Return NULL
1643 }
1644
1646 ModuleName.MaximumLength,
1647 TAG_HOOK);
1648 if (NULL == Hook->ModuleName.Buffer)
1649 {
1650 IntRemoveHook(Hook);
1652 goto Cleanup; // Return NULL
1653 }
1654
1655 Hook->ModuleName.MaximumLength = ModuleName.MaximumLength;
1657 ModuleName.Buffer,
1658 ModuleName.MaximumLength);
1659 if (!NT_SUCCESS(Status))
1660 {
1662 Hook->ModuleName.Buffer = NULL;
1663 IntRemoveHook(Hook);
1665 goto Cleanup; // Return NULL
1666 }
1667
1671 FIXME("NtUserSetWindowsHookEx Setting process hMod instance addressing.\n");
1672 /* Make proc relative to the module base */
1673 Hook->offPfn = (ULONG_PTR)((char *)HookProc - (char *)Mod);
1674 }
1675 else
1676 Hook->offPfn = 0;
1677
1678 TRACE("Installing: HookId %d Global %s\n", HookId, !ThreadId ? "TRUE" : "FALSE");
1679 Ret = Handle;
1680
1681Cleanup:
1682 if (Hook)
1684 TRACE("Leave NtUserSetWindowsHookEx, ret=%p\n", Ret);
1685 UserLeave();
1686 return Ret;
1687}
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char * ModuleName
Definition: acpixf.h:1280
#define InsertHeadList(ListHead, Entry)
ULONG Handle
Definition: gdb_input.c:15
#define HOOKID_TO_INDEX(HookId)
Definition: hook.h:4
#define HOOKID_TO_FLAG(HookId)
Definition: hook.h:5
#define TIF_SYSTEMTHREAD
Definition: ntuser.h:265
_Out_ PKAPC_STATE ApcState
Definition: mm.h:1777
BOOLEAN IntRemoveHook(PVOID Object)
Definition: hook.c:1036
VOID NTAPI KeStackAttachProcess(IN PKPROCESS Process, OUT PRKAPC_STATE ApcState)
Definition: procobj.c:704
VOID NTAPI KeUnstackDetachProcess(IN PRKAPC_STATE ApcState)
Definition: procobj.c:756
ULONG fsHooks
Definition: win32.h:117
LIST_ENTRY aphkStart[NB_HOOKS]
FIXME!
Definition: win32.h:143
ACPI_SIZE Length
Definition: actypes.h:1053
THRDESKHEAD head
Definition: ntuser.h:240
LIST_ENTRY Chain
Definition: ntuser.h:249
struct _THREADINFO * ptiHooked
Definition: ntuser.h:246
struct _DESKTOP * rpdesk
Definition: ntuser.h:247
int32_t INT_PTR
Definition: typedefs.h:64
#define TAG_HOOK
Definition: tags.h:5
#define ERROR_HOOK_TYPE_NOT_ALLOWED
Definition: winerror.h:939
#define ERROR_INVALID_FILTER_PROC
Definition: winerror.h:908
#define ERROR_HOOK_NEEDS_HMOD
Definition: winerror.h:909
#define ERROR_INVALID_HOOK_FILTER
Definition: winerror.h:907
#define ERROR_GLOBAL_ONLY_HOOK
Definition: winerror.h:910
#define WH_CALLWNDPROCRET
Definition: winuser.h:42
#define WH_MINHOOK
Definition: winuser.h:46
#define WH_MAXHOOK
Definition: winuser.h:47
#define WH_JOURNALPLAYBACK
Definition: winuser.h:31
#define WH_MOUSE_LL
Definition: winuser.h:44
#define WH_DEBUG
Definition: winuser.h:39
#define WH_HARDWARE
Definition: winuser.h:38
#define WH_KEYBOARD_LL
Definition: winuser.h:43
#define WH_GETMESSAGE
Definition: winuser.h:33
#define WH_FOREGROUNDIDLE
Definition: winuser.h:41
#define WH_JOURNALRECORD
Definition: winuser.h:30
KAPC_STATE
Definition: ketypes.h:1409

Referenced by IntSetWindowsHook(), and NtUserSetWindowsHookAW().

◆ NtUserSetWindowStationUser()

BOOL NTAPI NtUserSetWindowStationUser ( IN HWINSTA  hWindowStation,
IN PLUID  pluid,
IN PSID psid  OPTIONAL,
IN DWORD  size 
)

Definition at line 1995 of file winsta.c.

2000{
2001 BOOL Ret = FALSE;
2003 PWINSTATION_OBJECT WindowStation = NULL;
2004 LUID luidUser;
2005
2007
2009 {
2011 goto Leave;
2012 }
2013
2014 /* Validate the window station */
2015 Status = IntValidateWindowStationHandle(hWindowStation,
2016 UserMode,
2017 0,
2018 &WindowStation,
2019 NULL);
2020 if (!NT_SUCCESS(Status))
2021 {
2022 goto Leave;
2023 }
2024
2025 /* Capture the user LUID */
2026 _SEH2_TRY
2027 {
2028 ProbeForRead(pluid, sizeof(LUID), 1);
2029 luidUser = *pluid;
2030 }
2032 {
2034 _SEH2_YIELD(goto Leave);
2035 }
2036 _SEH2_END;
2037
2038 /* Reset the window station user LUID */
2039 RtlZeroMemory(&WindowStation->luidUser, sizeof(LUID));
2040
2041 /* Reset the window station user SID */
2042 if (WindowStation->psidUser)
2043 {
2045 WindowStation->psidUser = NULL;
2046 }
2047
2048 /* Copy the new user SID if one has been provided */
2049 if (psid)
2050 {
2052 if (WindowStation->psidUser == NULL)
2053 {
2055 goto Leave;
2056 }
2057
2059 _SEH2_TRY
2060 {
2061 ProbeForRead(psid, size, 1);
2062 RtlCopyMemory(WindowStation->psidUser, psid, size);
2063 }
2065 {
2067 }
2068 _SEH2_END;
2069
2070 if (!NT_SUCCESS(Status))
2071 {
2073 WindowStation->psidUser = NULL;
2074 goto Leave;
2075 }
2076 }
2077
2078 /* Copy the new user LUID */
2079 WindowStation->luidUser = luidUser;
2080
2081 Ret = TRUE;
2082
2083Leave:
2084 if (WindowStation)
2085 ObDereferenceObject(WindowStation);
2086
2087 UserLeave();
2088 return Ret;
2089}
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
GLsizeiptr size
Definition: glext.h:5919
PVOID psidUser
Definition: winsta.h:39
#define USERTAG_SECURITY
Definition: tags.h:275

Referenced by SetWindowStationUser().

◆ NtUserSetWindowWord()

WORD NTAPI NtUserSetWindowWord ( HWND  hWnd,
INT  Index,
WORD  NewVal 
)

Definition at line 4123 of file window.c.

4124{
4125 PWND Window;
4126 WORD OldValue;
4127 WORD Ret = 0;
4128
4129 TRACE("Enter NtUserSetWindowWord\n");
4131
4132 if (hWnd == IntGetDesktopWindow())
4133 {
4135 goto Exit; // Return 0
4136 }
4137
4139 {
4140 goto Exit; // Return 0
4141 }
4142
4143 switch (Index)
4144 {
4145 case GWL_ID:
4146 case GWL_HINSTANCE:
4147 case GWL_HWNDPARENT:
4149 goto Exit;
4150
4151 default:
4152 if (Index < 0)
4153 {
4155 goto Exit; // Return 0
4156 }
4157 }
4158
4159 if ((ULONG)Index > (Window->cbwndExtra - sizeof(WORD)))
4160 {
4162 goto Exit; // Return 0
4163 }
4164
4165 OldValue = *((WORD *)((PCHAR)(Window + 1) + Index));
4166 *((WORD *)((PCHAR)(Window + 1) + Index)) = NewValue;
4167
4168 Ret = OldValue;
4169
4170Exit:
4171 TRACE("Leave NtUserSetWindowWord, ret=%u\n", Ret);
4172 UserLeave();
4173 return Ret;
4174}
LONG FASTCALL co_UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
Definition: window.c:4025
#define ERROR_INVALID_INDEX
Definition: winerror.h:894
#define GWL_HINSTANCE
Definition: winuser.h:858
#define GWL_ID
Definition: winuser.h:862
#define GWL_HWNDPARENT
Definition: winuser.h:860

Referenced by SetWindowWord().

◆ NtUserSetWinEventHook()

HWINEVENTHOOK NTAPI NtUserSetWinEventHook ( UINT  eventMin,
UINT  eventMax,
HMODULE  hmodWinEventProc,
PUNICODE_STRING  puString,
WINEVENTPROC  lpfnWinEventProc,
DWORD  idProcess,
DWORD  idThread,
UINT  dwflags 
)

Definition at line 286 of file event.c.

295{
296 PEVENTHOOK pEH;
297 HWINEVENTHOOK Ret = NULL;
300 PTHREADINFO pti;
301
302 TRACE("NtUserSetWinEventHook hmod %p, pfn %p\n", hmodWinEventProc, lpfnWinEventProc);
303
305
306 if ( !GlobalEvents )
307 {
309 if (GlobalEvents == NULL)
310 {
312 goto SetEventExit;
313 }
314 GlobalEvents->Counts = 0;
316 }
317
318 if (eventMin > eventMax)
319 {
321 goto SetEventExit;
322 }
323
324 if (!lpfnWinEventProc)
325 {
327 goto SetEventExit;
328 }
329
331 {
332 if (!hmodWinEventProc)
333 {
334 ERR("Hook needs a module\n");
336 goto SetEventExit;
337 }
338 if (puString == NULL)
339 {
340 ERR("Dll not found\n");
342 goto SetEventExit;
343 }
344 }
345 else
346 {
347 TRACE("Out of Context\n");
348 hmodWinEventProc = 0;
349 }
350
351 if (idThread)
352 {
355 if (!NT_SUCCESS(Status))
356 {
358 goto SetEventExit;
359 }
362 }
363 else
364 {
366 }
367 // Creator, pti is set here.
369 if (pEH)
370 {
373
375 pEH->eventMin = eventMin;
376 pEH->eventMax = eventMax;
377 pEH->idProcess = idProcess; // These are cmp'ed
378 pEH->idThread = idThread; // "
379 pEH->Flags = dwflags;
380 /*
381 If WINEVENT_INCONTEXT, set offset from hmod and proc. Save ihmod from
382 the atom index table where the hmod data is saved to be recalled later
383 if fSync set by WINEVENT_INCONTEXT.
384 If WINEVENT_OUTOFCONTEXT just use proc..
385 Do this instead....
386 */
387 if (hmodWinEventProc != NULL)
388 {
389 pEH->offPfn = (ULONG_PTR)((char *)lpfnWinEventProc - (char *)hmodWinEventProc);
390 pEH->ihmod = (INT_PTR)hmodWinEventProc;
391 pEH->Proc = lpfnWinEventProc;
392 }
393 else
394 {
395 pEH->Proc = lpfnWinEventProc;
396 pEH->offPfn = 0;
397 pEH->ihmod = (INT_PTR)hmodWinEventProc;
398 }
399
401
402 Ret = Handle;
403 IntSetSrvEventMask( eventMin, eventMax);
404 }
405
406SetEventExit:
407 UserLeave();
408 return Ret;
409}
#define InsertTailList(ListHead, Entry)
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#define UserHMSetHandle(obj, handle)
Definition: ntuser.h:231
static HWINEVENTHOOK(WINAPI *pSetWinEventHook)(DWORD
PVOID NTAPI PsGetThreadWin32Thread(IN PETHREAD Thread)
Definition: thread.c:795
UINT eventMax
Definition: hook.h:20
DWORD idThread
Definition: hook.h:22
WINEVENTPROC Proc
Definition: hook.h:23
ULONG_PTR offPfn
Definition: hook.h:25
INT_PTR ihmod
Definition: hook.h:26
LIST_ENTRY Chain
Definition: hook.h:18
UINT eventMin
Definition: hook.h:19
ULONG Flags
Definition: hook.h:24
DWORD idProcess
Definition: hook.h:21
UINT Counts
Definition: hook.h:32
LIST_ENTRY Events
Definition: hook.h:31
static PEVENTTABLE GlobalEvents
Definition: event.c:19
static VOID FASTCALL IntSetSrvEventMask(UINT EventMin, UINT EventMax)
Definition: event.c:60
#define WINEVENT_INCONTEXT
Definition: winable.h:35
#define ERROR_INVALID_THREAD_ID
Definition: winerror.h:925
#define ERROR_DLL_NOT_FOUND
Definition: winerror.h:679

Referenced by SetWinEventHook().

◆ NtUserShowCaret()

BOOL NTAPI NtUserShowCaret ( HWND  hWnd)

Definition at line 424 of file caret.c.

425{
426 PWND Window = NULL;
428 BOOL ret = FALSE;
429
430 TRACE("Enter NtUserShowCaret\n");
432
434 {
435 goto Exit; // Return FALSE
436 }
437
438 if (Window) UserRefObjectCo(Window, &Ref);
439
441
443
444Exit:
445 TRACE("Leave NtUserShowCaret, ret=%i\n", ret);
446 UserLeave();
447 return ret;
448}
BOOL FASTCALL co_UserShowCaret(PWND Window OPTIONAL)
Definition: caret.c:262

Referenced by ShowCaret().

◆ NtUserShowScrollBar()

DWORD NTAPI NtUserShowScrollBar ( HWND  hWnd,
int  wBar,
DWORD  bShow 
)

Definition at line 1370 of file scrollbar.c.

1371{
1372 PWND Window;
1373 DWORD ret = 0;
1375
1376 TRACE("Enter NtUserShowScrollBar\n");
1378
1380 if (Window)
1381 {
1382 UserRefObjectCo(Window, &Ref);
1383 ret = co_UserShowScrollBar(Window, nBar, (nBar == SB_VERT) ? 0 : bShow,
1384 (nBar == SB_HORZ) ? 0 : bShow);
1386 }
1387
1388 TRACE("Leave NtUserShowScrollBar, ret=%lu\n", ret);
1389 UserLeave();
1390 return ret;
1391}
DWORD FASTCALL co_UserShowScrollBar(PWND Wnd, int nBar, BOOL fShowH, BOOL fShowV)
Definition: scrollbar.c:852

Referenced by ShowScrollBar().

◆ NtUserShowWindow()

BOOL NTAPI NtUserShowWindow ( HWND  hWnd,
LONG  nCmdShow 
)

Definition at line 3821 of file winpos.c.

3822{
3823 PWND Window;
3824 BOOL ret = FALSE;
3826
3827 TRACE("Enter NtUserShowWindow hWnd %p SW_ %d\n",hWnd, nCmdShow);
3829
3830 if (!(Window = UserGetWindowObject(hWnd)) ||
3832 {
3833 goto Exit; // Return FALSE
3834 }
3835
3836 if ( nCmdShow > SW_MAX || Window->state2 & WNDS2_INDESTROY)
3837 {
3839 goto Exit; // Return FALSE
3840 }
3841
3842 UserRefObjectCo(Window, &Ref);
3843 ret = co_WinPosShowWindow(Window, nCmdShow);
3845
3846Exit:
3847 TRACE("Leave NtUserShowWindow, ret=%i\n", ret);
3848 UserLeave();
3849 return ret;
3850}

Referenced by AnimateWindow(), CloseWindow(), OpenIcon(), ShowWindow(), SwitchToThisWindow(), and WIN_CreateWindowEx().

◆ NtUserShowWindowAsync()

BOOL NTAPI NtUserShowWindowAsync ( HWND  hWnd,
LONG  nCmdShow 
)

Definition at line 3784 of file winpos.c.

3785{
3786 PWND Window;
3788 BOOL ret = FALSE;
3790
3791 TRACE("Enter NtUserShowWindowAsync\n");
3793
3794 if (!(Window = UserGetWindowObject(hWnd)) ||
3796 {
3797 goto Exit; // Return FALSE
3798 }
3799
3800 if ( nCmdShow > SW_MAX )
3801 {
3803 goto Exit; // Return FALSE
3804 }
3805
3806 UserRefObjectCo(Window, &Ref);
3809 if (Result != -1 && Result != 0) ret = TRUE;
3810
3811Exit:
3812 TRACE("Leave NtUserShowWindowAsync, ret=%i\n", ret);
3813 UserLeave();
3814 return ret;
3815}
@ WM_ASYNC_SHOWWINDOW
Definition: msgqueue.h:117

Referenced by ShowWindowAsync().

◆ NtUserSoundSentry()

BOOL NTAPI NtUserSoundSentry ( VOID  )

Definition at line 843 of file ntstubs.c.

844{
845 STUB;
846 return 0;
847}

◆ NtUserSwitchDesktop()

BOOL NTAPI NtUserSwitchDesktop ( HDESK  hDesktop)

Definition at line 2972 of file desktop.c.

2973{
2974 PDESKTOP pdesk;
2976 BOOL bRedrawDesktop;
2977 BOOL Ret = FALSE;
2978
2980 TRACE("Enter NtUserSwitchDesktop(0x%p)\n", hdesk);
2981
2982 Status = IntValidateDesktopHandle(hdesk, UserMode, 0, &pdesk);
2983 if (!NT_SUCCESS(Status))
2984 {
2985 ERR("Validation of desktop handle 0x%p failed\n", hdesk);
2986 goto Exit; // Return FALSE
2987 }
2988
2989 if (PsGetCurrentProcessSessionId() != pdesk->rpwinstaParent->dwSessionId)
2990 {
2991 ObDereferenceObject(pdesk);
2992 ERR("NtUserSwitchDesktop called for a desktop of a different session\n");
2993 goto Exit; // Return FALSE
2994 }
2995
2996 if (pdesk == gpdeskInputDesktop)
2997 {
2998 ObDereferenceObject(pdesk);
2999 WARN("NtUserSwitchDesktop called for active desktop\n");
3000 Ret = TRUE;
3001 goto Exit;
3002 }
3003
3004 /*
3005 * Don't allow applications switch the desktop if it's locked, unless the caller
3006 * is the logon application itself
3007 */
3008 if ((pdesk->rpwinstaParent->Flags & WSS_LOCKED) &&
3010 {
3011 ObDereferenceObject(pdesk);
3012 ERR("Switching desktop 0x%p denied because the window station is locked!\n", hdesk);
3013 goto Exit; // Return FALSE
3014 }
3015
3016 if (pdesk->rpwinstaParent != InputWindowStation)
3017 {
3018 ObDereferenceObject(pdesk);
3019 ERR("Switching desktop 0x%p denied because desktop doesn't belong to the interactive winsta!\n", hdesk);
3020 goto Exit; // Return FALSE
3021 }
3022
3023 /* FIXME: Fail if the process is associated with a secured
3024 desktop such as Winlogon or Screen-Saver */
3025 /* FIXME: Connect to input device */
3026
3027 TRACE("Switching from desktop 0x%p to 0x%p\n", gpdeskInputDesktop, pdesk);
3028
3029 bRedrawDesktop = FALSE;
3030
3031 /* The first time SwitchDesktop is called, gpdeskInputDesktop is NULL */
3032 if (gpdeskInputDesktop != NULL)
3033 {
3035 bRedrawDesktop = TRUE;
3036
3037 /* Hide the previous desktop window */
3039 }
3040
3041 /* Set the active desktop in the desktop's window station. */
3043
3044 /* Set the global state. */
3045 gpdeskInputDesktop = pdesk;
3046
3047 /* Show the new desktop window */
3049
3050 TRACE("SwitchDesktop gpdeskInputDesktop 0x%p\n", gpdeskInputDesktop);
3051 ObDereferenceObject(pdesk);
3052
3053 Ret = TRUE;
3054
3055Exit:
3056 TRACE("Leave NtUserSwitchDesktop, ret=%i\n", Ret);
3057 UserLeave();
3058 return Ret;
3059}
ULONG NTAPI PsGetCurrentProcessSessionId(VOID)
Definition: process.c:1133
#define WS_VISIBLE
Definition: pedump.c:620
struct _WINSTATION_OBJECT * rpwinstaParent
Definition: desktop.h:11
struct _DESKTOP * ActiveDesktop
Definition: winsta.h:42
NTSTATUS FASTCALL IntHideDesktop(PDESKTOP Desktop)
Definition: desktop.c:1652
NTSTATUS FASTCALL co_IntShowDesktop(PDESKTOP Desktop, ULONG Width, ULONG Height, BOOL bRedraw)
Definition: desktop.c:1634
#define SM_CYSCREEN
Definition: winuser.h:963
#define SM_CXSCREEN
Definition: winuser.h:962

Referenced by SwitchDesktop().

◆ NtUserSystemParametersInfo()

BOOL NTAPI NtUserSystemParametersInfo ( UINT  uiAction,
UINT  uiParam,
PVOID  pvParam,
UINT  fWinIni 
)

Definition at line 2168 of file sysparams.c.

2173{
2174 BOOL bResult;
2175
2176 TRACE("Enter NtUserSystemParametersInfo(%u)\n", uiAction);
2178
2179 // FIXME: Get rid of the flags and only use this from um. kernel can access data directly.
2180 /* Set UM memory protection flag */
2181 fWinIni |= SPIF_PROTECT;
2182
2183 /* Call internal function */
2184 bResult = UserSystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
2185
2186 TRACE("Leave NtUserSystemParametersInfo, returning %d\n", bResult);
2187 UserLeave();
2188
2189 return bResult;
2190}
#define SPIF_PROTECT
Definition: sysparams.h:13
BOOL FASTCALL UserSystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
Definition: sysparams.c:2105

Referenced by DrawFocusRect(), RealSystemParametersInfoA(), RealSystemParametersInfoW(), SetDoubleClickTime(), START_TEST(), Test_NtUserSystemParametersInfo_fWinIni(), Test_NtUserSystemParametersInfo_Params(), Test_SPI_SETACCESSTIMEOUT(), Test_SPI_SETBEEP(), Test_SPI_SETBORDER(), Test_SPI_SETDESKWALLPAPER(), Test_SPI_SETFASTTASKSWITCH(), Test_SPI_SETICONMETRICS(), Test_SPI_SETICONTITLELOGFONT(), Test_SPI_SETMENUANIMATION(), Test_SPI_SETMINIMIZEDMETRICS(), Test_SPI_SETMOUSE(), Test_SPI_SETMOUSEBUTTONSWAP(), Test_SPI_SETNONCLIENTMETRICS(), Test_SPI_SETSTICKYKEYS(), Test_SPI_SETWORKAREA(), and Test_UserPref().

◆ NtUserTestForInteractiveUser()

DWORD NTAPI NtUserTestForInteractiveUser ( DWORD  dwUnknown1)

Definition at line 851 of file ntstubs.c.

853{
854 STUB;
855 return 0;
856}

◆ NtUserThunkedMenuInfo()

BOOL NTAPI NtUserThunkedMenuInfo ( HMENU  hMenu,
LPCMENUINFO  lpcmi 
)

Definition at line 6535 of file menu.c.

6538{
6539 PMENU Menu;
6540 BOOL Ret = FALSE;
6541
6542 TRACE("Enter NtUserThunkedMenuInfo\n");
6544
6545 Menu = UserGetMenuObject(hMenu);
6546 if (Menu)
6547 {
6548 Ret = UserMenuInfo(Menu, (PROSMENUINFO)lpcmi, TRUE);
6549 }
6550
6551 TRACE("Leave NtUserThunkedMenuInfo, ret=%i\n", Ret);
6552 UserLeave();
6553 return Ret;
6554}
BOOL FASTCALL UserMenuInfo(PMENU Menu, PROSMENUINFO UnsafeMenuInfo, BOOL SetOrGet)
Definition: menu.c:5194

Referenced by SetMenuInfo().

◆ NtUserThunkedMenuItemInfo()

BOOL NTAPI NtUserThunkedMenuItemInfo ( HMENU  hMenu,
UINT  uItem,
BOOL  fByPosition,
BOOL  bInsert,
LPMENUITEMINFOW  lpmii,
PUNICODE_STRING  lpszCaption 
)

Definition at line 6560 of file menu.c.

6567{
6568 PMENU Menu;
6570 UNICODE_STRING lstrCaption;
6571 BOOL Ret = FALSE;
6572
6573 TRACE("Enter NtUserThunkedMenuItemInfo\n");
6575
6576 /* lpszCaption may be NULL, check for it and call RtlInitUnicodeString()
6577 if bInsert == TRUE call UserInsertMenuItem() else UserSetMenuItemInfo() */
6578
6579 RtlInitEmptyUnicodeString(&lstrCaption, NULL, 0);
6580
6581 if (!(Menu = UserGetMenuObject(hMenu)))
6582 {
6583 goto Cleanup; // Return FALSE
6584 }
6585
6586 /* Check if we got a Caption */
6587 if (lpszCaption && lpszCaption->Buffer)
6588 {
6589 /* Copy the string to kernel mode */
6590 Status = ProbeAndCaptureUnicodeString( &lstrCaption,
6591 UserMode,
6592 lpszCaption);
6593 if (!NT_SUCCESS(Status))
6594 {
6595 ERR("Failed to capture MenuItem Caption (status 0x%08x)\n",Status);
6597 goto Cleanup; // Return FALSE
6598 }
6599 }
6600
6601 if (bInsert)
6602 {
6603 Ret = UserInsertMenuItem(Menu, uItem, fByPosition, lpmii, &lstrCaption);
6604 goto Cleanup;
6605 }
6606
6607 Ret = UserMenuItemInfo(Menu, uItem, fByPosition, (PROSMENUITEMINFO)lpmii, TRUE, &lstrCaption);
6608
6609Cleanup:
6610 if (lstrCaption.Buffer)
6611 {
6613 }
6614
6615 TRACE("Leave NtUserThunkedMenuItemInfo, ret=%i\n", Ret);
6616 UserLeave();
6617 return Ret;
6618}
static BOOL bInsert
Definition: cmdinput.c:121
DWORD FASTCALL UserInsertMenuItem(PMENU Menu, UINT uItem, BOOL fByPosition, LPCMENUITEMINFOW UnsafeItemInfo, PUNICODE_STRING lpstr)
Definition: menu.c:4951
BOOL FASTCALL UserMenuItemInfo(PMENU Menu, UINT Item, BOOL ByPosition, PROSMENUITEMINFO UnsafeItemInfo, BOOL SetOrGet, PUNICODE_STRING lpstr)
Definition: menu.c:5120

Referenced by AppendMenuA(), AppendMenuW(), CheckMenuRadioItem(), InsertMenuA(), InsertMenuItemA(), InsertMenuItemW(), InsertMenuW(), ModifyMenuA(), ModifyMenuW(), SetMenuItemInfoA(), and SetMenuItemInfoW().

◆ NtUserToUnicodeEx()

INT NTAPI NtUserToUnicodeEx ( UINT  wVirtKey,
UINT  wScanCode,
PBYTE  lpKeyState,
LPWSTR  pwszBuff,
int  cchBuff,
UINT  wFlags,
HKL  dwhkl 
)

◆ NtUserTrackMouseEvent()

BOOL NTAPI NtUserTrackMouseEvent ( LPTRACKMOUSEEVENT  lpEventTrack)

Definition at line 482 of file mouse.c.

484{
485 TRACKMOUSEEVENT SafeTME;
486 BOOL bRet = FALSE;
487
488 TRACE("Enter NtUserTrackMouseEvent\n");
489
491 {
492 ProbeForRead(lpEventTrack, sizeof(TRACKMOUSEEVENT), 1);
493 RtlCopyMemory(&SafeTME, lpEventTrack, sizeof(TRACKMOUSEEVENT));
494 }
496 {
498 _SEH2_YIELD(return FALSE);
499 }
500 _SEH2_END;
501
502 if (SafeTME.cbSize != sizeof(TRACKMOUSEEVENT))
503 {
505 return FALSE;
506 }
507
509 {
511 return FALSE;
512 }
513
515
516 if (SafeTME.dwFlags & TME_QUERY)
517 {
518 bRet = IntQueryTrackMouseEvent(&SafeTME);
520 {
521 ProbeForWrite(lpEventTrack, sizeof(TRACKMOUSEEVENT), 1);
522 RtlCopyMemory(lpEventTrack, &SafeTME, sizeof(TRACKMOUSEEVENT));
523 }
525 {
527 bRet = FALSE;
528 }
529 _SEH2_END;
530 }
531 else
532 {
533 bRet = IntTrackMouseEvent(&SafeTME);
534 }
535
536 TRACE("Leave NtUserTrackMouseEvent, ret=%i\n", bRet);
537 UserLeave();
538 return bRet;
539}
#define TME_CANCEL
Definition: commctrl.h:4989
#define TME_LEAVE
Definition: commctrl.h:4986
#define TME_NONCLIENT
Definition: commctrl.h:4987
#define TME_QUERY
Definition: commctrl.h:4988
#define TME_HOVER
Definition: commctrl.h:4985
BOOL FASTCALL IntTrackMouseEvent(LPTRACKMOUSEEVENT lpEventTrack)
Definition: mouse.c:410
BOOL FASTCALL IntQueryTrackMouseEvent(LPTRACKMOUSEEVENT lpEventTrack)
Definition: mouse.c:375

◆ NtUserTrackPopupMenuEx()

BOOL NTAPI NtUserTrackPopupMenuEx ( HMENU  hmenu,
UINT  fuFlags,
int  x,
int  y,
HWND  hwnd,
LPTPMPARAMS  lptpm 
)

Definition at line 6624 of file menu.c.

6631{
6632 PMENU menu;
6633 PWND pWnd;
6634 TPMPARAMS tpm;
6635 BOOL Ret = FALSE;
6637
6638 TRACE("Enter NtUserTrackPopupMenuEx\n");
6640 /* Parameter check */
6641 if (!(menu = UserGetMenuObject( hMenu )))
6642 {
6643 ERR("TPME : Invalid Menu handle.\n");
6645 goto Exit;
6646 }
6647
6648 if (!(pWnd = UserGetWindowObject(hWnd)))
6649 {
6650 ERR("TPME : Invalid Window handle.\n");
6651 goto Exit;
6652 }
6653
6654 if (lptpm)
6655 {
6656 _SEH2_TRY
6657 {
6658 ProbeForRead(lptpm, sizeof(TPMPARAMS), sizeof(ULONG));
6659 tpm = *lptpm;
6660 }
6662 {
6663 _SEH2_YIELD(goto Exit);
6664 }
6665 _SEH2_END
6666 }
6667 UserRefObjectCo(pWnd, &Ref);
6668 Ret = IntTrackPopupMenuEx(menu, fuFlags, x, y, pWnd, lptpm ? &tpm : NULL);
6669 UserDerefObjectCo(pWnd);
6670
6671Exit:
6672 TRACE("Leave NtUserTrackPopupMenuEx, ret=%i\n",Ret);
6673 UserLeave();
6674 return Ret;
6675}
BOOL WINAPI IntTrackPopupMenuEx(PMENU menu, UINT wFlags, int x, int y, PWND pWnd, LPTPMPARAMS lpTpm)
Definition: menu.c:4577

Referenced by TrackPopupMenu().

◆ NtUserTranslateAccelerator()

int NTAPI NtUserTranslateAccelerator ( HWND  Window,
HACCEL  Table,
LPMSG  Message 
)

Definition at line 367 of file accelerator.c.

371{
372 PWND Window = NULL;
373 PACCELERATOR_TABLE Accel = NULL;
374 ULONG i;
375 MSG Message;
376 USER_REFERENCE_ENTRY AccelRef, WindowRef;
377 int Ret = 0;
378
379 TRACE("NtUserTranslateAccelerator(hWnd %p, hAccel %p, Message %p)\n",
380 hWnd, hAccel, pUnsafeMessage);
382
383 if (hWnd == NULL)
384 {
385 goto Cleanup; // Return 0
386 }
387
389 {
390 ProbeForRead(pUnsafeMessage, sizeof(MSG), 4);
391 RtlCopyMemory(&Message, pUnsafeMessage, sizeof(MSG));
392 }
394 {
396 _SEH2_YIELD(goto Cleanup); // Return 0
397 }
398 _SEH2_END;
399
400 if ((Message.message != WM_KEYDOWN) &&
401 (Message.message != WM_SYSKEYDOWN) &&
402 (Message.message != WM_SYSCHAR) &&
403 (Message.message != WM_CHAR))
404 {
405 goto Cleanup; // Return 0
406 }
407
408 Accel = UserGetAccelObject(hAccel);
409 if (!Accel)
410 {
411 goto Cleanup; // Return 0
412 }
413
414 UserRefObjectCo(Accel, &AccelRef);
415
417 if (!Window)
418 {
419 goto Cleanup; // Return 0
420 }
421
422 UserRefObjectCo(Window, &WindowRef);
423
424 /* FIXME: Associate AcceleratorTable with the current thread */
425
426 for (i = 0; i < Accel->Count; i++)
427 {
429 {
430 Ret = 1;
431 break;
432 }
433
434 /* Undocumented feature... */
435 if (Accel->Table[i].fVirt & FVIRT_TBL_END)
436 break;
437 }
438
439Cleanup:
441 if (Accel) UserDerefObjectCo(Accel);
442
443 TRACE("NtUserTranslateAccelerator returns %d\n", Ret);
444 UserLeave();
445 return Ret;
446}
#define FVIRT_TBL_END
Definition: accelerator.c:16
static BOOLEAN FASTCALL co_IntTranslateAccelerator(PWND Window, CONST MSG *pMsg, CONST ACCEL *pAccel)
Definition: accelerator.c:44
#define WM_SYSCHAR
Definition: winuser.h:1724
#define WM_CHAR
Definition: winuser.h:1720
#define WM_SYSKEYDOWN
Definition: winuser.h:1722

Referenced by TranslateAcceleratorW().

◆ NtUserTranslateMessage()

BOOL NTAPI NtUserTranslateMessage ( LPMSG  lpMsg,
UINT  flags 
)

Definition at line 2503 of file message.c.

2504{
2505 MSG SafeMsg;
2506 BOOL Ret;
2507 PWND pWnd;
2508
2509 _SEH2_TRY
2510 {
2511 ProbeForRead(lpMsg, sizeof(MSG), 1);
2512 RtlCopyMemory(&SafeMsg, lpMsg, sizeof(MSG));
2513 }
2515 {
2517 _SEH2_YIELD(return FALSE);
2518 }
2519 _SEH2_END;
2520
2522 pWnd = UserGetWindowObject(SafeMsg.hwnd);
2523 if (pWnd) // Must have a window!
2524 {
2525 Ret = IntTranslateKbdMessage(&SafeMsg, flags);
2526 }
2527 else
2528 {
2529 TRACE("No Window for Translate. hwnd 0x%p Msg %u\n", SafeMsg.hwnd, SafeMsg.message);
2530 Ret = FALSE;
2531 }
2532 UserLeave();
2533
2534 return Ret;
2535}
BOOL FASTCALL IntTranslateKbdMessage(LPMSG lpMsg, UINT flags)
Definition: keyboard.c:1276

Referenced by TranslateMessageEx().

◆ NtUserUnhookWindowsHookEx()

BOOL NTAPI NtUserUnhookWindowsHookEx ( HHOOK  Hook)

Definition at line 1691 of file hook.c.

1692{
1693 PHOOK HookObj;
1694 BOOL Ret = FALSE;
1695
1696 TRACE("Enter NtUserUnhookWindowsHookEx\n");
1698
1699 if (!(HookObj = IntGetHookObject(Hook)))
1700 {
1701 ERR("Invalid handle passed to NtUserUnhookWindowsHookEx\n");
1702 /* SetLastNtError(Status); */
1703 goto Exit; // Return FALSE
1704 }
1705
1706 ASSERT(Hook == UserHMGetHandle(HookObj));
1707
1708 IntRemoveHook(HookObj);
1709
1710 UserDereferenceObject(HookObj);
1711
1712 Ret = TRUE;
1713
1714Exit:
1715 TRACE("Leave NtUserUnhookWindowsHookEx, ret=%i\n", Ret);
1716 UserLeave();
1717 return Ret;
1718}
PHOOK FASTCALL IntGetHookObject(HHOOK hHook)
Definition: hook.c:937

◆ NtUserUnhookWinEvent()

BOOL NTAPI NtUserUnhookWinEvent ( HWINEVENTHOOK  hWinEventHook)

Definition at line 413 of file event.c.

415{
416 PEVENTHOOK pEH;
417 BOOL Ret = FALSE;
418
420
422 if (pEH)
423 {
424 Ret = IntRemoveEvent(pEH);
425 }
426
427 UserLeave();
428 return Ret;
429}
struct tagEVENTHOOK * PEVENTHOOK
BOOLEAN IntRemoveEvent(PVOID Object)
Definition: event.c:126

◆ NtUserUnloadKeyboardLayout()

BOOL NTAPI NtUserUnloadKeyboardLayout ( HKL  hKl)

Definition at line 1251 of file kbdlayout.c.

1253{
1254 BOOL ret;
1255 PWINSTATION_OBJECT pWinSta;
1256
1258
1260 ret = IntUnloadKeyboardLayout(pWinSta, hKl);
1261
1262 UserLeave();
1263 return ret;
1264}
static BOOL APIENTRY IntUnloadKeyboardLayout(_Inout_ PWINSTATION_OBJECT pWinSta, _In_ HKL hKL)
Definition: kbdlayout.c:852

Referenced by UnloadKeyboardLayout().

◆ NtUserUnlockWindowStation()

BOOL NTAPI NtUserUnlockWindowStation ( HWINSTA  hWindowStation)

Definition at line 1585 of file winsta.c.

1586{
1589 BOOL Ret;
1590
1591 TRACE("About to set process window station with handle (%p)\n",
1592 hWindowStation);
1593
1595 {
1596 ERR("Unauthorized process attempted to unlock the window station!\n");
1598 return FALSE;
1599 }
1600
1601 Status = IntValidateWindowStationHandle(hWindowStation,
1602 UserMode,
1603 0,
1604 &Object,
1605 NULL);
1606 if (!NT_SUCCESS(Status))
1607 {
1608 TRACE("Validation of window station handle (%p) failed\n",
1609 hWindowStation);
1611 return FALSE;
1612 }
1613
1614 Ret = (Object->Flags & WSS_LOCKED) == WSS_LOCKED;
1615 Object->Flags &= ~WSS_LOCKED;
1616
1618 return Ret;
1619}

Referenced by UnlockWindowStation().

◆ NtUserUnregisterClass()

BOOL NTAPI NtUserUnregisterClass ( PUNICODE_STRING  ClassNameOrAtom,
HINSTANCE  hInstance,
PCLSMENUNAME  pClassMenuName 
)

Referenced by START_TEST().

◆ NtUserUnregisterHotKey()

BOOL NTAPI NtUserUnregisterHotKey ( HWND  hWnd,
int  id 
)

Definition at line 591 of file hotkey.c.

592{
593 PHOT_KEY pHotKey = gphkFirst, phkNext, *pLink = &gphkFirst;
594 BOOL bRet = FALSE;
595 PWND pWnd = NULL;
596
597 TRACE("Enter NtUserUnregisterHotKey\n");
599
600 /* Fail if given window is invalid */
601 if (hWnd && !(pWnd = UserGetWindowObject(hWnd)))
602 goto cleanup;
603
604 while (pHotKey)
605 {
606 /* Save next ptr for later use */
607 phkNext = pHotKey->pNext;
608
609 /* Should we delete this hotkey? */
610 if (pHotKey->pWnd == pWnd && pHotKey->id == id)
611 {
612 /* Update next ptr for previous hotkey and free memory */
613 *pLink = phkNext;
615
616 bRet = TRUE;
617 }
618 else /* This hotkey will stay, use its next ptr */
619 pLink = &pHotKey->pNext;
620
621 /* Move to the next entry */
622 pHotKey = phkNext;
623 }
624
625cleanup:
626 TRACE("Leave NtUserUnregisterHotKey, ret=%i\n", bRet);
627 UserLeave();
628 return bRet;
629}

◆ NtUserUnregisterUserApiHook()

BOOL NTAPI NtUserUnregisterUserApiHook ( VOID  )

Definition at line 1768 of file hook.c.

1769{
1770 BOOL ret;
1771
1774 UserLeave();
1775
1776 return ret;
1777}
BOOL FASTCALL UserUnregisterUserApiHook(VOID)
Definition: hook.c:206

Referenced by UnregisterUserApiHook().

◆ NtUserUpdateInputContext()

BOOL NTAPI NtUserUpdateInputContext ( HIMC  hIMC,
DWORD  dwType,
DWORD_PTR  dwValue 
)

Definition at line 1762 of file ime.c.

1766{
1767 PIMC pIMC;
1768 BOOL ret = FALSE;
1769
1771
1772 if (!IS_IMM_MODE())
1773 {
1774 ERR("!IS_IMM_MODE()\n");
1775 goto Quit;
1776 }
1777
1779 if (!pIMC)
1780 goto Quit;
1781
1782 ret = UserUpdateInputContext(pIMC, dwType, dwValue);
1783
1784Quit:
1785 UserLeave();
1786 return ret;
1787}
BOOL FASTCALL UserUpdateInputContext(PIMC pIMC, DWORD dwType, DWORD_PTR dwValue)
Definition: ime.c:1729

Referenced by ImmLockClientImc(), and User32SetImeWindowOfImc().

◆ NtUserUpdateInstance()

DWORD NTAPI NtUserUpdateInstance ( DWORD  Unknown0,
DWORD  Unknown1,
DWORD  Unknown2 
)

Definition at line 335 of file ntstubs.c.

339{
340 STUB
341
342 return 0;
343}

◆ NtUserUpdateLayeredWindow()

BOOL NTAPI NtUserUpdateLayeredWindow ( HWND  hwnd,
HDC  hdcDst,
POINT pptDst,
SIZE psize,
HDC  hdcSrc,
POINT pptSrc,
COLORREF  crKey,
BLENDFUNCTION pblend,
DWORD  dwFlags,
RECT prcDirty 
)

Definition at line 341 of file layered.c.

352{
353 UPDATELAYEREDWINDOWINFO info;
354 POINT Dst, Src;
355 SIZE Size;
356 RECT Dirty;
357 BLENDFUNCTION blend = { AC_SRC_OVER, 0, 255, 0 };
358 PWND pWnd;
359 BOOL Ret = FALSE;
360
361 TRACE("Enter NtUserUpdateLayeredWindow\n");
363
364 if (!(pWnd = UserGetWindowObject(hwnd)))
365 {
366 goto Exit;
367 }
368
370 {
371 if (pptDst)
372 {
373 ProbeForRead(pptDst, sizeof(POINT), 1);
374 Dst = *pptDst;
375 }
376 if (pptSrc)
377 {
378 ProbeForRead(pptSrc, sizeof(POINT), 1);
379 Src = *pptSrc;
380 }
381 ProbeForRead(psize, sizeof(SIZE), 1);
382 Size = *psize;
383 if (pblend)
384 {
385 ProbeForRead(pblend, sizeof(BLENDFUNCTION), 1);
386 blend = *pblend;
387 }
388 if (prcDirty)
389 {
390 ProbeForRead(prcDirty, sizeof(RECT), 1);
391 Dirty = *prcDirty;
392 }
393 }
395 {
397 _SEH2_YIELD(goto Exit);
398 }
399 _SEH2_END;
400
401 if ( GetLayeredStatus(pWnd) ||
403 !(pWnd->ExStyle & WS_EX_LAYERED) )
404 {
405 ERR("Layered Window Invalid Parameters\n");
407 goto Exit;
408 }
409
410 info.cbSize = sizeof(info);
411 info.hdcDst = hdcDst;
412 info.pptDst = pptDst? &Dst : NULL;
413 info.psize = &Size;
414 info.hdcSrc = hdcSrc;
415 info.pptSrc = pptSrc ? &Src : NULL;
416 info.crKey = crKey;
417 info.pblend = &blend;
418 info.dwFlags = dwFlags;
419 info.prcDirty = prcDirty ? &Dirty : NULL;
420 Ret = IntUpdateLayeredWindowI( pWnd, &info );
421Exit:
422 TRACE("Leave NtUserUpdateLayeredWindow, ret=%i\n", Ret);
423 UserLeave();
424 return Ret;
425}
BOOL FASTCALL IntUpdateLayeredWindowI(PWND pWnd, UPDATELAYEREDWINDOWINFO *info)
Definition: layered.c:101
BOOL FASTCALL GetLayeredStatus(PWND pWnd)
Definition: layered.c:23
#define Dst
Definition: mesh.h:153
_Must_inspect_result_ _Out_ LPSIZE psize
Definition: ntgdi.h:1569
#define AC_SRC_OVER
Definition: wingdi.h:1369
#define ULW_ALPHA
Definition: winuser.h:2788
#define ULW_OPAQUE
Definition: winuser.h:2789
#define ULW_COLORKEY
Definition: winuser.h:2787
#define ULW_EX_NORESIZE
Definition: winuser.h:2790
static HDC hdcSrc
Definition: xlate.c:32
static HDC hdcDst
Definition: xlate.c:32

Referenced by UpdateLayeredWindow(), and UpdateLayeredWindowIndirect().

◆ NtUserUpdatePerUserSystemParameters()

BOOL NTAPI NtUserUpdatePerUserSystemParameters ( DWORD  dwReserved,
BOOL  bEnable 
)

Definition at line 375 of file sysparams.c.

378{
379 BOOL bResult;
380
381 TRACE("Enter NtUserUpdatePerUserSystemParameters\n");
383
385 if(bEnable)
387 else
389 bResult = TRUE;
390
391 TRACE("Leave NtUserUpdatePerUserSystemParameters, returning %d\n", bResult);
392 UserLeave();
393
394 return bResult;
395}
static const WCHAR * KEY_DESKTOP
Definition: sysparams.c:61
BOOL g_PaintDesktopVersion
Definition: sysparams.c:19
static VOID SpiUpdatePerUserSystemParameters(VOID)
Definition: sysparams.c:232
static INT SpiLoadDWord(PCWSTR pwszKey, PCWSTR pwszValue, INT iValue)
Definition: sysparams.c:108
static const WCHAR * VAL_PAINTDESKVER
Definition: sysparams.c:75
_In_ BOOL bEnable
Definition: winddi.h:3426

Referenced by START_TEST(), UpdatePerUserSystemParameters(), and UserInitialize().

◆ NtUserUserHandleGrantAccess()

BOOL NTAPI NtUserUserHandleGrantAccess ( IN HANDLE  hUserHandle,
IN HANDLE  hJob,
IN BOOL  bGrant 
)

Definition at line 347 of file ntstubs.c.

351{
352 STUB
353
354 return 0;
355}

◆ NtUserValidateHandleSecure()

BOOL NTAPI NtUserValidateHandleSecure ( HANDLE  hHdl)

Definition at line 792 of file object.c.

794{
795 UINT uType;
796 PPROCESSINFO ppi;
798 BOOL Ret = FALSE;
799
801
803 {
805 goto Exit; // Return FALSE
806 }
807 uType = entry->type;
808 switch (uType)
809 {
810 case TYPE_WINDOW:
812 ppi = ((PTHREADINFO)entry->pi)->ppi;
813 break;
814 case TYPE_MENU:
815 case TYPE_ACCELTABLE:
816 case TYPE_CURSOR:
817 case TYPE_HOOK:
818 case TYPE_CALLPROC:
820 ppi = entry->pi;
821 break;
822 default:
823 ppi = NULL;
824 break;
825 }
826
827 if (!ppi)
828 goto Exit; // Return FALSE
829
830 // Same process job returns TRUE.
831 if (gptiCurrent->ppi->pW32Job == ppi->pW32Job) Ret = TRUE;
832
833Exit:
834 UserLeave();
835 return Ret;
836}
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
uint32_t entry
Definition: isohybrid.c:63
PVOID pW32Job
Definition: win32.h:276
Definition: ntuser.h:17
PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:341

Referenced by ValidateHandleNoErr().

◆ NtUserValidateRect()

BOOL NTAPI NtUserValidateRect ( HWND  hWnd,
CONST RECT lpRect 
)

Referenced by ValidateRect().

◆ NtUserValidateTimerCallback()

BOOL APIENTRY NtUserValidateTimerCallback ( LPARAM  lParam)

Definition at line 707 of file timer.c.

709{
710 BOOL Ret = FALSE;
711
713
715
716 UserLeave();
717 return Ret;
718}
BOOL FASTCALL ValidateTimerCallback(PTHREADINFO pti, LPARAM lParam)
Definition: timer.c:155

Referenced by DispatchMessageA(), and DispatchMessageW().

◆ NtUserVkKeyScanEx()

DWORD NTAPI NtUserVkKeyScanEx ( WCHAR  wChar,
HKL  KeyboardLayout,
BOOL  bUsehHK 
)

Definition at line 1709 of file keyboard.c.

1713{
1714 PKBDTABLES pKbdTbl;
1715 PVK_TO_WCHAR_TABLE pVkToWchTbl;
1716 PVK_TO_WCHARS10 pVkToWch;
1717 PKL pKl = NULL;
1718 DWORD i, dwModBits = 0, dwModNumber = 0, Ret = (DWORD)-1;
1719
1720 TRACE("NtUserVkKeyScanEx() wch %u, KbdLayout 0x%p\n", wch, dwhkl);
1722
1723 if (bUsehKL)
1724 {
1725 // Use given keyboard layout
1726 if (dwhkl)
1727 pKl = UserHklToKbl(dwhkl);
1728 }
1729 else
1730 {
1731 // Use thread keyboard layout
1732 pKl = ((PTHREADINFO)PsGetCurrentThreadWin32Thread())->KeyboardLayout;
1733 }
1734
1735 if (!pKl)
1736 goto Exit;
1737
1738 pKbdTbl = pKl->spkf->pKbdTbl;
1739
1740 // Interate through all VkToWchar tables while pVkToWchars is not NULL
1741 for (i = 0; pKbdTbl->pVkToWcharTable[i].pVkToWchars; i++)
1742 {
1743 pVkToWchTbl = &pKbdTbl->pVkToWcharTable[i];
1744 pVkToWch = (PVK_TO_WCHARS10)(pVkToWchTbl->pVkToWchars);
1745
1746 // Interate through all virtual keys
1747 while (pVkToWch->VirtualKey)
1748 {
1749 for (dwModNumber = 0; dwModNumber < pVkToWchTbl->nModifications; dwModNumber++)
1750 {
1751 if (pVkToWch->wch[dwModNumber] == wch)
1752 {
1753 dwModBits = pKbdTbl->pCharModifiers->ModNumber[dwModNumber];
1754 TRACE("i %lu wC %04x: dwModBits %08x dwModNumber %08x MaxModBits %08x\n",
1755 i, wch, dwModBits, dwModNumber, pKbdTbl->pCharModifiers->wMaxModBits);
1756 Ret = (dwModBits << 8) | (pVkToWch->VirtualKey & 0xFF);
1757 goto Exit;
1758 }
1759 }
1760 pVkToWch = (PVK_TO_WCHARS10)(((BYTE *)pVkToWch) + pVkToWchTbl->cbSize);
1761 }
1762 }
1763Exit:
1764 UserLeave();
1765 return Ret;
1766}
PMODIFIERS pCharModifiers
Definition: kbd.h:96
PVK_TO_WCHAR_TABLE pVkToWcharTable
Definition: kbd.h:97
WORD wMaxModBits
Definition: kbd.h:28
BYTE ModNumber[]
Definition: kbd.h:29
BYTE cbSize
Definition: kbd.h:53
PVK_TO_WCHARS1 pVkToWchars
Definition: kbd.h:51
BYTE nModifications
Definition: kbd.h:52

Referenced by VkKeyScanExA(), VkKeyScanExW(), and VkKeyScanW().

◆ NtUserWaitForInputIdle()

DWORD NTAPI NtUserWaitForInputIdle ( IN HANDLE  hProcess,
IN DWORD  dwMilliseconds,
IN BOOL  bSharedWow 
)

Definition at line 3116 of file message.c.

3119{
3121 PPROCESSINFO W32Process;
3122 PTHREADINFO pti;
3124 HANDLE Handles[3];
3127
3129
3133 UserMode,
3134 (PVOID*)&Process,
3135 NULL);
3136
3137 if (!NT_SUCCESS(Status))
3138 {
3139 UserLeave();
3141 return WAIT_FAILED;
3142 }
3143
3145
3146 W32Process = (PPROCESSINFO)Process->Win32Process;
3147
3149 !W32Process ||
3150 pti->ppi == W32Process)
3151 {
3153 UserLeave();
3155 return WAIT_FAILED;
3156 }
3157
3158 Handles[0] = Process;
3159 Handles[1] = W32Process->InputIdleEvent;
3160 Handles[2] = pti->pEventQueueServer; // IntMsqSetWakeMask returns hEventQueueClient
3161
3162 if (!Handles[1])
3163 {
3165 UserLeave();
3166 return STATUS_SUCCESS; /* no event to wait on */
3167 }
3168
3169 if (dwMilliseconds != INFINITE)
3170 Timeout.QuadPart = (LONGLONG) dwMilliseconds * (LONGLONG) -10000;
3171
3173 W32Process->W32PF_flags |= W32PF_WAITFORINPUTIDLE;
3174 for (pti = W32Process->ptiList; pti; pti = pti->ptiSibling)
3175 {
3177 pti->pClientInfo->dwTIFlags = pti->TIF_flags;
3178 }
3180
3181 TRACE("WFII: ppi %p\n", W32Process);
3182 TRACE("WFII: waiting for %p\n", Handles[1] );
3183
3184 /*
3185 * We must add a refcount to our current PROCESSINFO,
3186 * because anything could happen (including process death) we're leaving win32k
3187 */
3188 IntReferenceProcessInfo(W32Process);
3189
3190 do
3191 {
3192 UserLeave();
3194 Handles,
3195 WaitAny,
3197 UserMode,
3198 FALSE,
3199 dwMilliseconds == INFINITE ? NULL : &Timeout,
3200 NULL);
3202
3203 if (!NT_SUCCESS(Status))
3204 {
3207 goto WaitExit;
3208 }
3209
3210 switch (Status)
3211 {
3212 case STATUS_WAIT_0:
3213 goto WaitExit;
3214
3215 case STATUS_WAIT_2:
3216 {
3217 MSG Msg;
3218 co_IntGetPeekMessage( &Msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE, FALSE);
3219 ERR("WFII: WAIT 2\n");
3220 }
3221 break;
3222
3223 case STATUS_TIMEOUT:
3224 ERR("WFII: timeout\n");
3225 case WAIT_FAILED:
3226 goto WaitExit;
3227
3228 default:
3229 ERR("WFII: finished\n");
3231 goto WaitExit;
3232 }
3233 }
3234 while (TRUE);
3235
3236WaitExit:
3238 for (pti = W32Process->ptiList; pti; pti = pti->ptiSibling)
3239 {
3240 pti->TIF_flags &= ~TIF_WAITFORINPUTIDLE;
3241 pti->pClientInfo->dwTIFlags = pti->TIF_flags;
3242 }
3243 W32Process->W32PF_flags &= ~W32PF_WAITFORINPUTIDLE;
3245
3246 IntDereferenceProcessInfo(W32Process);
3248 UserLeave();
3249 return Status;
3250}
#define STATUS_TIMEOUT
Definition: d3dkmdt.h:49
#define TIF_WAITFORINPUTIDLE
Definition: ntuser.h:277
if(dx< 0)
Definition: linetemp.h:194
@ WaitAny
NTSTATUS NTAPI KeWaitForMultipleObjects(IN ULONG Count, IN PVOID Object[], IN WAIT_TYPE WaitType, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL, OUT PKWAIT_BLOCK WaitBlockArray OPTIONAL)
Definition: wait.c:586
BOOLEAN NTAPI PsGetProcessExitProcessCalled(PEPROCESS Process)
Definition: process.c:1043
#define STATUS_WAIT_0
Definition: ntstatus.h:237
#define STATUS_WAIT_2
Definition: ntstatus.h:72
static ULONG Timeout
Definition: ping.c:61
PKEVENT pEventQueueServer
Definition: win32.h:125
int64_t LONGLONG
Definition: typedefs.h:68
#define IntReferenceProcessInfo(ppi)
Definition: win32.h:182
#define W32PF_WAITFORINPUTIDLE
Definition: win32.h:22
#define IntDereferenceProcessInfo(ppi)
Definition: win32.h:187
#define INFINITE
Definition: message.c:3111
#define WAIT_FAILED
Definition: message.c:3112
@ UserRequest
Definition: ketypes.h:421

Referenced by WaitForInputIdle().

◆ NtUserWaitForMsgAndEvent()

DWORD NTAPI NtUserWaitForMsgAndEvent ( DWORD  Unknown0)

Definition at line 359 of file ntstubs.c.

361{
362 STUB
363
364 return 0;
365}

◆ NtUserWaitMessage()

BOOL NTAPI NtUserWaitMessage ( VOID  )

Definition at line 2333 of file message.c.

2334{
2335 BOOL ret;
2336
2338 TRACE("NtUserWaitMessage Enter\n");
2339 ret = co_IntWaitMessage(NULL, 0, 0);
2340 TRACE("NtUserWaitMessage Leave\n");
2341 UserLeave();
2342
2343 return ret;
2344}

Referenced by WaitMessage().

◆ NtUserWin32PoolAllocationStats()

DWORD NTAPI NtUserWin32PoolAllocationStats ( DWORD  Unknown0,
DWORD  Unknown1,
DWORD  Unknown2,
DWORD  Unknown3,
DWORD  Unknown4,
DWORD  Unknown5 
)

Definition at line 369 of file ntstubs.c.

376{
377 STUB
378
379 return 0;
380}

◆ NtUserWindowFromPoint()

HWND NTAPI NtUserWindowFromPoint ( LONG  X,
LONG  Y 
)

Definition at line 3857 of file winpos.c.

3858{
3859 POINT pt;
3860 HWND Ret = NULL;
3862 USHORT hittest;
3864
3865 TRACE("Enter NtUserWindowFromPoint\n");
3867
3869 {
3870 //PTHREADINFO pti;
3871
3872 pt.x = X;
3873 pt.y = Y;
3874
3875 // Hmm... Threads live on desktops thus we have a reference on the desktop and indirectly the desktop window.
3876 // It is possible this referencing is useless, though it should not hurt...
3878
3879 //pti = PsGetCurrentThreadWin32Thread();
3881 if (Window)
3882 {
3883 Ret = UserHMGetHandle(Window);
3884 }
3885
3887 }
3888
3889 TRACE("Leave NtUserWindowFromPoint, ret=%p\n", Ret);
3890 UserLeave();
3891 return Ret;
3892}
#define X(b, s)
PWND APIENTRY co_WinPosWindowFromPoint(IN PWND ScopeWin, IN POINT *WinPoint, IN OUT USHORT *HitTest, IN BOOL Ignore)
Definition: winpos.c:2961
Implementation of the Explorer desktop window.
Definition: desktop.h:52

Referenced by WindowFromPoint().

◆ NtUserYieldTask()

DWORD NTAPI NtUserYieldTask ( VOID  )

Definition at line 384 of file ntstubs.c.

385{
386 STUB
387
388 return 0;
389}

◆ RtlGetExpWinVer()

ULONG RtlGetExpWinVer ( _In_ PVOID  BaseAddress)

Definition at line 20 of file image.c.

21{
22 ULONG dwMajorVersion = 3, dwMinorVersion = 10; /* Set default to Windows 3.10 (WINVER_WIN31) */
23 PIMAGE_NT_HEADERS pNTHeader;
24 ULONG_PTR AlignedAddress = (ULONG_PTR)BaseAddress;
25
26 TRACE("(%p)\n", BaseAddress);
27
28 /* Remove the magic flag for non-mapped images */
29 if (AlignedAddress & 1)
30 AlignedAddress = (AlignedAddress & ~1);
31
32 if (AlignedAddress && !LOWORD(AlignedAddress))
33 {
34 pNTHeader = RtlImageNtHeader((PVOID)AlignedAddress);
35 if (pNTHeader)
36 {
37 dwMajorVersion = pNTHeader->OptionalHeader.MajorSubsystemVersion;
38 if (dwMajorVersion == 1)
39 dwMajorVersion = 3;
40 else
41 dwMinorVersion = pNTHeader->OptionalHeader.MinorSubsystemVersion;
42 }
43 }
44
45 return MAKEWORD(dwMinorVersion, dwMajorVersion);
46}
#define RtlImageNtHeader
Definition: compat.h:806
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
IMAGE_OPTIONAL_HEADER32 OptionalHeader
Definition: ntddk_ex.h:184
#define MAKEWORD(a, b)
Definition: typedefs.h:248

Referenced by InitThreadCallback(), and User32CreateWindowEx().

◆ RtlInitLargeAnsiString()

VOID NTAPI RtlInitLargeAnsiString ( IN OUT  PLARGE_ANSI_STRING,
IN  PCSZ,
IN  INT 
)

Definition at line 17 of file rtlstr.c.

21{
22 USHORT DestSize;
23
24 if (SourceString)
25 {
26 DestSize = (USHORT)strlen(SourceString);
27 DestinationString->Length = DestSize;
28 DestinationString->MaximumLength = DestSize + sizeof(CHAR);
29 }
30 else
31 {
34 }
35
37 DestinationString->bAnsi = TRUE;
38}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define CHAR(Char)
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
Definition: rtlfuncs.h:1949
_Out_ _Inout_ POEM_STRING DestinationString
Definition: rtlfuncs.h:1948
unsigned short Length
Definition: sprintf.c:451
void * Buffer
Definition: sprintf.c:453
unsigned short MaximumLength
Definition: sprintf.c:452

Referenced by DefSetText(), and RtlInitLargeString().

◆ RtlInitLargeUnicodeString()

VOID NTAPI RtlInitLargeUnicodeString ( IN OUT  PLARGE_UNICODE_STRING,
IN  PCWSTR,
IN  INT 
)

Definition at line 42 of file rtlstr.c.

46{
47 USHORT DestSize;
48
49 if (SourceString)
50 {
51 DestSize = (USHORT)wcslen(SourceString) * sizeof(WCHAR);
52 DestinationString->Length = DestSize;
53 DestinationString->MaximumLength = DestSize + sizeof(WCHAR);
54 }
55 else
56 {
59 }
60
62 DestinationString->bAnsi = FALSE;
63}
uint16_t * PWSTR
Definition: typedefs.h:56

Referenced by co_IntCreateDefaultImeWindow(), DefSetText(), and RtlInitLargeString().

◆ RtlLargeStringToUnicodeString()

BOOL NTAPI RtlLargeStringToUnicodeString ( PUNICODE_STRING  DestinationString,
PLARGE_STRING  SourceString 
)

Definition at line 67 of file rtlstr.c.

70{
72
73 /* Check parameters */
74 if (!DestinationString || !SourceString) return FALSE;
75
76 /* Check if size if ok */
77 // We can't do this atm and truncate the string instead.
78 //if (SourceString->Length > 0xffff) return FALSE;
79
81
82 if (SourceString->bAnsi)
83 {
86 }
87 else
88 {
90 }
91}
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
@ AnsiString
Definition: dnslib.h:19
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
char * LPSTR
Definition: xmlstorage.h:182

Referenced by NtUserDefSetText().

Variable Documentation

◆ bInternal

◆ IconInfo

◆ lpInstName

Definition at line 2295 of file ntuser.h.

◆ lpResName

Definition at line 2296 of file ntuser.h.

Referenced by _Success_().

◆ pbpp