mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:03:00 +00:00
[win32k]
- Remove some unneeded and misleading debug prints when parsing debug channels - Switch NtUser to the new debug system svn path=/trunk/; revision=53354
This commit is contained in:
parent
68612f0ea5
commit
297cb8918d
42 changed files with 1023 additions and 1068 deletions
|
@ -280,7 +280,7 @@ VOID APIENTRY MsqRemoveWindowMessagesFromQueue(PVOID pWindow); /* F*(&$ headers,
|
||||||
do { \
|
do { \
|
||||||
if(InterlockedDecrement(&(MsgQueue)->References) == 0) \
|
if(InterlockedDecrement(&(MsgQueue)->References) == 0) \
|
||||||
{ \
|
{ \
|
||||||
DPRINT("Free message queue 0x%x\n", (MsgQueue)); \
|
TRACE("Free message queue 0x%x\n", (MsgQueue)); \
|
||||||
if ((MsgQueue)->NewMessages != NULL) \
|
if ((MsgQueue)->NewMessages != NULL) \
|
||||||
ObDereferenceObject((MsgQueue)->NewMessages); \
|
ObDereferenceObject((MsgQueue)->NewMessages); \
|
||||||
ExFreePoolWithTag((MsgQueue), USERTAG_Q); \
|
ExFreePoolWithTag((MsgQueue), USERTAG_Q); \
|
||||||
|
|
|
@ -6,7 +6,7 @@ PMENU_OBJECT FASTCALL UserGetMenuObject(HMENU hMenu);
|
||||||
{ \
|
{ \
|
||||||
LONG ref = ((PHEAD)_obj_)->cLockObj;\
|
LONG ref = ((PHEAD)_obj_)->cLockObj;\
|
||||||
if (!(ref >= 1)){ \
|
if (!(ref >= 1)){ \
|
||||||
DPRINT1("ASSERT: obj 0x%x, refs %i\n", _obj_, ref); \
|
ERR_CH(UserObj, "ASSERT: obj 0x%x, refs %i\n", _obj_, ref); \
|
||||||
ASSERT(FALSE); \
|
ASSERT(FALSE); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ PMENU_OBJECT FASTCALL UserGetMenuObject(HMENU hMenu);
|
||||||
BOOL gotit=FALSE; \
|
BOOL gotit=FALSE; \
|
||||||
LONG ref = ((PHEAD)_obj_)->cLockObj;\
|
LONG ref = ((PHEAD)_obj_)->cLockObj;\
|
||||||
if (!(ref >= 1)){ \
|
if (!(ref >= 1)){ \
|
||||||
DPRINT1("obj 0x%x, refs %i\n", _obj_, ref); \
|
ERR_CH(UserObj, "obj 0x%x, refs %i\n", _obj_, ref); \
|
||||||
ASSERT(FALSE); \
|
ASSERT(FALSE); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
@ -33,7 +33,7 @@ PMENU_OBJECT FASTCALL UserGetMenuObject(HMENU hMenu);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DUMP_REFS(obj) DPRINT1("obj 0x%x, refs %i\n",obj, ((PHEAD)obj)->cLockObj)
|
#define DUMP_REFS(obj) TRACE_CH(UserObj,"obj 0x%x, refs %i\n",obj, ((PHEAD)obj)->cLockObj)
|
||||||
|
|
||||||
PWND FASTCALL IntGetWindowObject(HWND hWnd);
|
PWND FASTCALL IntGetWindowObject(HWND hWnd);
|
||||||
|
|
||||||
|
|
|
@ -74,13 +74,16 @@
|
||||||
DbgChGdiText,
|
DbgChGdiText,
|
||||||
DbgChGdiXFormObj,
|
DbgChGdiXFormObj,
|
||||||
DbgChUserAccel,
|
DbgChUserAccel,
|
||||||
DbgChUserCalproc,
|
DbgChUserCallback,
|
||||||
|
DbgChUserCallProc,
|
||||||
DbgChUserCaret,
|
DbgChUserCaret,
|
||||||
DbgChUserClass,
|
DbgChUserClass,
|
||||||
DbgChUserClipbrd,
|
DbgChUserClipbrd,
|
||||||
DbgChUserCsr,
|
DbgChUserCsr,
|
||||||
DbgChUserDce,
|
DbgChUserDce,
|
||||||
|
DbgChUserDefwnd,
|
||||||
DbgChUserDesktop,
|
DbgChUserDesktop,
|
||||||
|
DbgChUserDisplay,
|
||||||
DbgChUserEvent,
|
DbgChUserEvent,
|
||||||
DbgChUserFocus,
|
DbgChUserFocus,
|
||||||
DbgChUserHook,
|
DbgChUserHook,
|
||||||
|
@ -91,20 +94,21 @@
|
||||||
DbgChUserKbdLayout,
|
DbgChUserKbdLayout,
|
||||||
DbgChUserMenu,
|
DbgChUserMenu,
|
||||||
DbgChUserMetric,
|
DbgChUserMetric,
|
||||||
|
DbgChUserMisc,
|
||||||
DbgChUserMonitor,
|
DbgChUserMonitor,
|
||||||
DbgChUserMsgGet,
|
DbgChUserMsg,
|
||||||
DbgChUserMsgQ,
|
DbgChUserMsgQ,
|
||||||
DbgChUserMsgSend,
|
|
||||||
DbgChUserObj,
|
DbgChUserObj,
|
||||||
|
DbgChUserPainting,
|
||||||
DbgChUserProcess,
|
DbgChUserProcess,
|
||||||
DbgChUserProp,
|
DbgChUserProp,
|
||||||
DbgChUserScrollbar,
|
DbgChUserScrollbar,
|
||||||
DbgChUserSysparam,
|
DbgChUserSysparams,
|
||||||
DbgChUserThread,
|
DbgChUserThread,
|
||||||
DbgChUserTimer,
|
DbgChUserTimer,
|
||||||
DbgChUserWinsta,
|
DbgChUserWinsta,
|
||||||
DbgChUserWnd,
|
DbgChUserWnd,
|
||||||
DbgChUserWndpos,
|
DbgChUserWinpos,
|
||||||
DbgChCount
|
DbgChCount
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -116,9 +120,7 @@
|
||||||
|
|
||||||
#define MAX_LEVEL ERR_LEVEL | FIXME_LEVEL | WARN_LEVEL | TRACE_LEVEL
|
#define MAX_LEVEL ERR_LEVEL | FIXME_LEVEL | WARN_LEVEL | TRACE_LEVEL
|
||||||
|
|
||||||
/* the following assert is needed to make sure that the
|
#define DBG_GET_PPI ((PPROCESSINFO)PsGetCurrentProcessWin32Process())
|
||||||
debugging routines are not used before we get a ppi*/
|
|
||||||
#define DBG_GET_PPI (ASSERT(PsGetCurrentProcessWin32Process()), (PPROCESSINFO)PsGetCurrentProcessWin32Process())
|
|
||||||
#define DBG_DEFAULT_CHANNEL(x) static int DbgDefaultChannel = DbgCh##x;
|
#define DBG_DEFAULT_CHANNEL(x) static int DbgDefaultChannel = DbgCh##x;
|
||||||
|
|
||||||
#define DBG_ENABLE_CHANNEL(ppi,ch,level) ((ppi)->DbgChannelLevel[ch] |= level)
|
#define DBG_ENABLE_CHANNEL(ppi,ch,level) ((ppi)->DbgChannelLevel[ch] |= level)
|
||||||
|
@ -126,24 +128,26 @@
|
||||||
#define DBG_IS_CHANNEL_ENABLED(ppi,ch,level) ((ppi)->DbgChannelLevel[ch] & level)
|
#define DBG_IS_CHANNEL_ENABLED(ppi,ch,level) ((ppi)->DbgChannelLevel[ch] & level)
|
||||||
|
|
||||||
#define DBG_PRINT(ppi,ch,level,fmt, ...) do { \
|
#define DBG_PRINT(ppi,ch,level,fmt, ...) do { \
|
||||||
if(DBG_IS_CHANNEL_ENABLED(ppi,ch,level)) \
|
if((level == ERR_LEVEL) || (ppi && DBG_IS_CHANNEL_ENABLED(ppi,ch,level))) \
|
||||||
DbgPrint("(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__); \
|
DbgPrint("(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__); \
|
||||||
}while(0);
|
}while(0);
|
||||||
|
|
||||||
#define ERR(fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgDefaultChannel, ERR_LEVEL,"err: " fmt, __VA_ARGS__)
|
#define ERR(fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgDefaultChannel, ERR_LEVEL,"err: " fmt, ##__VA_ARGS__)
|
||||||
#define FIXME(fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgDefaultChannel, FIXME_LEVEL,"fixme: " fmt, __VA_ARGS__)
|
#define FIXME(fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgDefaultChannel, FIXME_LEVEL,"fixme: " fmt, ##__VA_ARGS__)
|
||||||
#define WARN(fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgDefaultChannel, WARN_LEVEL,"warn: " fmt, __VA_ARGS__)
|
#define WARN(fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgDefaultChannel, WARN_LEVEL,"warn: " fmt, ##__VA_ARGS__)
|
||||||
#define TRACE(fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgDefaultChannel, TRACE_LEVEL,"trace: " fmt, __VA_ARGS__)
|
#define TRACE(fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgDefaultChannel, TRACE_LEVEL,"trace: " fmt, ##__VA_ARGS__)
|
||||||
|
|
||||||
#define ERR_CH(ch,fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgCh##ch, ERR_LEVEL, "err: " fmt, __VA_ARGS__)
|
#define ERR_CH(ch,fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgCh##ch, ERR_LEVEL, "err: " fmt, ##__VA_ARGS__)
|
||||||
#define FIXME_CH(ch,fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgCh##ch, FIXME_LEVEL, "fixme: " fmt, __VA_ARGS__)
|
#define FIXME_CH(ch,fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgCh##ch, FIXME_LEVEL, "fixme: " fmt, ##__VA_ARGS__)
|
||||||
#define WARN_CH(ch,fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgCh##ch, WARN_LEVEL, "warn: " fmt, __VA_ARGS__)
|
#define WARN_CH(ch,fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgCh##ch, WARN_LEVEL, "warn: " fmt, ##__VA_ARGS__)
|
||||||
#define TRACE_CH(ch,fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgCh##ch, TRACE_LEVEL, "trace: " fmt, __VA_ARGS__)
|
#define TRACE_CH(ch,fmt, ...) DBG_PRINT(DBG_GET_PPI, DbgCh##ch, TRACE_LEVEL, "trace: " fmt, ##__VA_ARGS__)
|
||||||
|
|
||||||
#define ERR_PPI(ppi,ch,fmt, ...) DBG_PRINT(ppi, DbgCh##ch, ERR_LEVEL,"err: " fmt, __VA_ARGS__)
|
#define ERR_PPI(ppi,ch,fmt, ...) DBG_PRINT(ppi, DbgCh##ch, ERR_LEVEL,"err: " fmt, ##__VA_ARGS__)
|
||||||
#define FIXME_PPI(ppi,ch,fmt, ...) DBG_PRINT(ppi, DbgCh##ch, FIXME_LEVEL,"fixme: " fmt, __VA_ARGS__)
|
#define FIXME_PPI(ppi,ch,fmt, ...) DBG_PRINT(ppi, DbgCh##ch, FIXME_LEVEL,"fixme: " fmt, ##__VA_ARGS__)
|
||||||
#define WARN_PPI(ppi,ch,fmt, ...) DBG_PRINT(ppi, DbgCh##ch, WARN_LEVEL,"warn: " fmt, __VA_ARGS__)
|
#define WARN_PPI(ppi,ch,fmt, ...) DBG_PRINT(ppi, DbgCh##ch, WARN_LEVEL,"warn: " fmt, ##__VA_ARGS__)
|
||||||
#define TRACE_PPI(ppi,ch,fmt, ...) DBG_PRINT(ppi, DbgCh##ch, TRACE_LEVEL,"trace: " fmt, __VA_ARGS__)
|
#define TRACE_PPI(ppi,ch,fmt, ...) DBG_PRINT(ppi, DbgCh##ch, TRACE_LEVEL,"trace: " fmt, ##__VA_ARGS__)
|
||||||
|
|
||||||
|
#define STUB DbgPrint("WARNING: %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define DBG_GET_PPI
|
#define DBG_GET_PPI
|
||||||
|
@ -169,6 +173,8 @@
|
||||||
#define FIXME_PPI(ppi,ch,fmt, ...)
|
#define FIXME_PPI(ppi,ch,fmt, ...)
|
||||||
#define WARN_PPI(ppi,ch,fmt, ...)
|
#define WARN_PPI(ppi,ch,fmt, ...)
|
||||||
#define TRACE_PPI(ppi,ch,fmt, ...)
|
#define TRACE_PPI(ppi,ch,fmt, ...)
|
||||||
|
|
||||||
|
#define UNIMPLEMENTED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
BOOL DbgInitDebugChannels();
|
BOOL DbgInitDebugChannels();
|
||||||
|
|
|
@ -32,8 +32,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserAccel);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
UINT FASTCALL IntFindSubMenu(HMENU *hMenu, HMENU hSubTarget );
|
UINT FASTCALL IntFindSubMenu(HMENU *hMenu, HMENU hSubTarget );
|
||||||
HMENU FASTCALL IntGetSubMenu( HMENU hMenu, int nPos);
|
HMENU FASTCALL IntGetSubMenu( HMENU hMenu, int nPos);
|
||||||
|
@ -98,7 +97,7 @@ co_IntTranslateAccelerator(
|
||||||
|
|
||||||
hWnd = Window->head.h;
|
hWnd = Window->head.h;
|
||||||
|
|
||||||
DPRINT("IntTranslateAccelerator(hwnd %x, message %x, wParam %x, lParam %x, fVirt %d, key %x, cmd %x)\n",
|
TRACE("IntTranslateAccelerator(hwnd %x, message %x, wParam %x, lParam %x, fVirt %d, key %x, cmd %x)\n",
|
||||||
Window->head.h, message, wParam, lParam, fVirt, key, cmd);
|
Window->head.h, message, wParam, lParam, fVirt, key, cmd);
|
||||||
|
|
||||||
if (wParam != key)
|
if (wParam != key)
|
||||||
|
@ -106,20 +105,20 @@ co_IntTranslateAccelerator(
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("NtUserGetKeyState(VK_CONTROL) = 0x%x\n",UserGetKeyState(VK_CONTROL));
|
TRACE("NtUserGetKeyState(VK_CONTROL) = 0x%x\n",UserGetKeyState(VK_CONTROL));
|
||||||
DPRINT("NtUserGetKeyState(VK_MENU) = 0x%x\n",UserGetKeyState(VK_MENU));
|
TRACE("NtUserGetKeyState(VK_MENU) = 0x%x\n",UserGetKeyState(VK_MENU));
|
||||||
DPRINT("NtUserGetKeyState(VK_SHIFT) = 0x%x\n",UserGetKeyState(VK_SHIFT));
|
TRACE("NtUserGetKeyState(VK_SHIFT) = 0x%x\n",UserGetKeyState(VK_SHIFT));
|
||||||
|
|
||||||
if (UserGetKeyState(VK_CONTROL) & 0x8000) mask |= FCONTROL;
|
if (UserGetKeyState(VK_CONTROL) & 0x8000) mask |= FCONTROL;
|
||||||
if (UserGetKeyState(VK_MENU) & 0x8000) mask |= FALT;
|
if (UserGetKeyState(VK_MENU) & 0x8000) mask |= FALT;
|
||||||
if (UserGetKeyState(VK_SHIFT) & 0x8000) mask |= FSHIFT;
|
if (UserGetKeyState(VK_SHIFT) & 0x8000) mask |= FSHIFT;
|
||||||
DPRINT("Mask 0x%x\n",mask);
|
TRACE("Mask 0x%x\n",mask);
|
||||||
|
|
||||||
if (message == WM_CHAR || message == WM_SYSCHAR)
|
if (message == WM_CHAR || message == WM_SYSCHAR)
|
||||||
{
|
{
|
||||||
if ( !(fVirt & FVIRTKEY) && (mask & FALT) == (fVirt & FALT) )
|
if ( !(fVirt & FVIRTKEY) && (mask & FALT) == (fVirt & FALT) )
|
||||||
{
|
{
|
||||||
DPRINT("found accel for WM_CHAR: ('%c')\n", LOWORD(wParam) & 0xff);
|
TRACE("found accel for WM_CHAR: ('%c')\n", LOWORD(wParam) & 0xff);
|
||||||
goto found;
|
goto found;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,11 +126,11 @@ co_IntTranslateAccelerator(
|
||||||
{
|
{
|
||||||
if (fVirt & FVIRTKEY)
|
if (fVirt & FVIRTKEY)
|
||||||
{
|
{
|
||||||
DPRINT("found accel for virt_key %04x (scan %04x)\n",
|
TRACE("found accel for virt_key %04x (scan %04x)\n",
|
||||||
wParam, 0xff & HIWORD(lParam));
|
wParam, 0xff & HIWORD(lParam));
|
||||||
|
|
||||||
if (mask == (fVirt & (FSHIFT | FCONTROL | FALT))) goto found;
|
if (mask == (fVirt & (FSHIFT | FCONTROL | FALT))) goto found;
|
||||||
DPRINT("but incorrect SHIFT/CTRL/ALT-state mask %x fVirt %x\n",mask,fVirt);
|
TRACE("but incorrect SHIFT/CTRL/ALT-state mask %x fVirt %x\n",mask,fVirt);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -139,14 +138,14 @@ co_IntTranslateAccelerator(
|
||||||
{
|
{
|
||||||
if ((fVirt & FALT) && (lParam & 0x20000000))
|
if ((fVirt & FALT) && (lParam & 0x20000000))
|
||||||
{ /* ^^ ALT pressed */
|
{ /* ^^ ALT pressed */
|
||||||
DPRINT("found accel for Alt-%c\n", LOWORD(wParam) & 0xff);
|
TRACE("found accel for Alt-%c\n", LOWORD(wParam) & 0xff);
|
||||||
goto found;
|
goto found;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("IntTranslateAccelerator(hwnd %x, message %x, wParam %x, lParam %x, fVirt %d, key %x, cmd %x) = FALSE\n",
|
TRACE("IntTranslateAccelerator(hwnd %x, message %x, wParam %x, lParam %x, fVirt %d, key %x, cmd %x) = FALSE\n",
|
||||||
Window->head.h, message, wParam, lParam, fVirt, key, cmd);
|
Window->head.h, message, wParam, lParam, fVirt, key, cmd);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -191,7 +190,7 @@ found:
|
||||||
if (hSubMenu != hSysMenu)
|
if (hSubMenu != hSysMenu)
|
||||||
{
|
{
|
||||||
nPos = IntFindSubMenu(&hSysMenu, hSubMenu);
|
nPos = IntFindSubMenu(&hSysMenu, hSubMenu);
|
||||||
DPRINT("hSysMenu = %p, hSubMenu = %p, nPos = %d\n", hSysMenu, hSubMenu, nPos);
|
TRACE("hSysMenu = %p, hSubMenu = %p, nPos = %d\n", hSysMenu, hSubMenu, nPos);
|
||||||
co_IntSendMessage(hWnd, WM_INITMENUPOPUP, (WPARAM)hSubMenu, MAKELPARAM(nPos, TRUE));
|
co_IntSendMessage(hWnd, WM_INITMENUPOPUP, (WPARAM)hSubMenu, MAKELPARAM(nPos, TRUE));
|
||||||
}
|
}
|
||||||
uSysStat = IntGetMenuState(IntGetSubMenu(hSysMenu, 0), cmd, MF_BYCOMMAND);
|
uSysStat = IntGetMenuState(IntGetSubMenu(hSysMenu, 0), cmd, MF_BYCOMMAND);
|
||||||
|
@ -222,7 +221,7 @@ found:
|
||||||
if (hSubMenu != hMenu)
|
if (hSubMenu != hMenu)
|
||||||
{
|
{
|
||||||
nPos = IntFindSubMenu(&hMenu, hSubMenu);
|
nPos = IntFindSubMenu(&hMenu, hSubMenu);
|
||||||
DPRINT("hMenu = %p, hSubMenu = %p, nPos = %d\n", hMenu, hSubMenu, nPos);
|
TRACE("hMenu = %p, hSubMenu = %p, nPos = %d\n", hMenu, hSubMenu, nPos);
|
||||||
co_IntSendMessage(hWnd, WM_INITMENUPOPUP, (WPARAM)hSubMenu, MAKELPARAM(nPos, FALSE));
|
co_IntSendMessage(hWnd, WM_INITMENUPOPUP, (WPARAM)hSubMenu, MAKELPARAM(nPos, FALSE));
|
||||||
}
|
}
|
||||||
uStat = IntGetMenuState(hMenu, cmd, MF_BYCOMMAND);
|
uStat = IntGetMenuState(hMenu, cmd, MF_BYCOMMAND);
|
||||||
|
@ -264,12 +263,12 @@ found:
|
||||||
|
|
||||||
if (mesg == WM_COMMAND)
|
if (mesg == WM_COMMAND)
|
||||||
{
|
{
|
||||||
DPRINT(", sending WM_COMMAND, wParam=%0x\n", 0x10000 | cmd);
|
TRACE(", sending WM_COMMAND, wParam=%0x\n", 0x10000 | cmd);
|
||||||
co_IntSendMessage(Window->head.h, mesg, 0x10000 | cmd, 0L);
|
co_IntSendMessage(Window->head.h, mesg, 0x10000 | cmd, 0L);
|
||||||
}
|
}
|
||||||
else if (mesg == WM_SYSCOMMAND)
|
else if (mesg == WM_SYSCOMMAND)
|
||||||
{
|
{
|
||||||
DPRINT(", sending WM_SYSCOMMAND, wParam=%0x\n", cmd);
|
TRACE(", sending WM_SYSCOMMAND, wParam=%0x\n", cmd);
|
||||||
co_IntSendMessage(Window->head.h, mesg, cmd, 0x00010000L);
|
co_IntSendMessage(Window->head.h, mesg, cmd, 0x00010000L);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -283,14 +282,14 @@ found:
|
||||||
* #5: it's a menu option, but window is iconic
|
* #5: it's a menu option, but window is iconic
|
||||||
* #6: it's a menu option, but disabled
|
* #6: it's a menu option, but disabled
|
||||||
*/
|
*/
|
||||||
DPRINT1(", but won't send WM_{SYS}COMMAND, reason is #%d\n", mesg);
|
ERR(", but won't send WM_{SYS}COMMAND, reason is #%d\n", mesg);
|
||||||
if (mesg == 0)
|
if (mesg == 0)
|
||||||
{
|
{
|
||||||
DPRINT1(" unknown reason - please report!");
|
ERR(" unknown reason - please report!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("IntTranslateAccelerator(hWnd %x, message %x, wParam %x, lParam %x, fVirt %d, key %x, cmd %x) = TRUE\n",
|
TRACE("IntTranslateAccelerator(hWnd %x, message %x, wParam %x, lParam %x, fVirt %d, key %x, cmd %x) = TRUE\n",
|
||||||
Window->head.h, message, wParam, lParam, fVirt, key, cmd);
|
Window->head.h, message, wParam, lParam, fVirt, key, cmd);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -312,7 +311,7 @@ NtUserCopyAcceleratorTable(
|
||||||
BOOL Done = FALSE;
|
BOOL Done = FALSE;
|
||||||
DECLARE_RETURN(int);
|
DECLARE_RETURN(int);
|
||||||
|
|
||||||
DPRINT("Enter NtUserCopyAcceleratorTable\n");
|
TRACE("Enter NtUserCopyAcceleratorTable\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
Accel = UserGetAccelObject(hAccel);
|
Accel = UserGetAccelObject(hAccel);
|
||||||
|
@ -346,7 +345,7 @@ NtUserCopyAcceleratorTable(
|
||||||
RETURN(Ret);
|
RETURN(Ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserCopyAcceleratorTable, ret=%i\n",_ret_);
|
TRACE("Leave NtUserCopyAcceleratorTable, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -362,7 +361,7 @@ NtUserCreateAcceleratorTable(
|
||||||
INT Index;
|
INT Index;
|
||||||
DECLARE_RETURN(HACCEL);
|
DECLARE_RETURN(HACCEL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserCreateAcceleratorTable(Entries %p, EntriesCount %d)\n",
|
TRACE("Enter NtUserCreateAcceleratorTable(Entries %p, EntriesCount %d)\n",
|
||||||
Entries, EntriesCount);
|
Entries, EntriesCount);
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
|
@ -420,7 +419,7 @@ NtUserCreateAcceleratorTable(
|
||||||
RETURN(hAccel);
|
RETURN(hAccel);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserCreateAcceleratorTable(Entries %p, EntriesCount %d) = %x\n",
|
TRACE("Leave NtUserCreateAcceleratorTable(Entries %p, EntriesCount %d) = %x\n",
|
||||||
Entries, EntriesCount,_ret_);
|
Entries, EntriesCount,_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
|
@ -439,7 +438,7 @@ NtUserDestroyAcceleratorTable(
|
||||||
FIXME: Destroy only tables created using CreateAcceleratorTable.
|
FIXME: Destroy only tables created using CreateAcceleratorTable.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DPRINT("NtUserDestroyAcceleratorTable(Table %x)\n", hAccel);
|
TRACE("NtUserDestroyAcceleratorTable(Table %x)\n", hAccel);
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Accel = UserGetAccelObject(hAccel)))
|
if (!(Accel = UserGetAccelObject(hAccel)))
|
||||||
|
@ -458,7 +457,7 @@ NtUserDestroyAcceleratorTable(
|
||||||
RETURN( TRUE);
|
RETURN( TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserDestroyAcceleratorTable(Table %x) = %i\n", hAccel,_ret_);
|
TRACE("Leave NtUserDestroyAcceleratorTable(Table %x) = %i\n", hAccel,_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -476,7 +475,7 @@ NtUserTranslateAccelerator(
|
||||||
USER_REFERENCE_ENTRY AccelRef, WindowRef;
|
USER_REFERENCE_ENTRY AccelRef, WindowRef;
|
||||||
DECLARE_RETURN(int);
|
DECLARE_RETURN(int);
|
||||||
|
|
||||||
DPRINT("NtUserTranslateAccelerator(hWnd %x, Table %x, Message %p)\n",
|
TRACE("NtUserTranslateAccelerator(hWnd %x, Table %x, Message %p)\n",
|
||||||
hWnd, hAccel, Message);
|
hWnd, hAccel, Message);
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
|
@ -517,7 +516,7 @@ NtUserTranslateAccelerator(
|
||||||
Accel->Table[i].fVirt, Accel->Table[i].key,
|
Accel->Table[i].fVirt, Accel->Table[i].key,
|
||||||
Accel->Table[i].cmd))
|
Accel->Table[i].cmd))
|
||||||
{
|
{
|
||||||
DPRINT("NtUserTranslateAccelerator(hWnd %x, Table %x, Message %p) = %i end\n",
|
TRACE("NtUserTranslateAccelerator(hWnd %x, Table %x, Message %p) = %i end\n",
|
||||||
hWnd, hAccel, Message, 1);
|
hWnd, hAccel, Message, 1);
|
||||||
RETURN( 1);
|
RETURN( 1);
|
||||||
}
|
}
|
||||||
|
@ -533,7 +532,7 @@ CLEANUP:
|
||||||
if (Window) UserDerefObjectCo(Window);
|
if (Window) UserDerefObjectCo(Window);
|
||||||
if (Accel) UserDerefObjectCo(Accel);
|
if (Accel) UserDerefObjectCo(Accel);
|
||||||
|
|
||||||
DPRINT("NtUserTranslateAccelerator(hWnd %x, Table %x, Message %p) = %i end\n",
|
TRACE("NtUserTranslateAccelerator(hWnd %x, Table %x, Message %p) = %i end\n",
|
||||||
hWnd, hAccel, Message, 0);
|
hWnd, hAccel, Message, 0);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserCallback);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
/* CALLBACK MEMORY MANAGEMENT ************************************************/
|
/* CALLBACK MEMORY MANAGEMENT ************************************************/
|
||||||
|
|
||||||
|
@ -181,7 +180,7 @@ co_IntCallWindowProc(WNDPROC Proc,
|
||||||
Arguments = IntCbAllocateMemory(ArgumentLength);
|
Arguments = IntCbAllocateMemory(ArgumentLength);
|
||||||
if (NULL == Arguments)
|
if (NULL == Arguments)
|
||||||
{
|
{
|
||||||
DPRINT1("Unable to allocate buffer for window proc callback\n");
|
ERR("Unable to allocate buffer for window proc callback\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
RtlMoveMemory((PVOID) ((char *) Arguments + sizeof(WINDOWPROC_CALLBACK_ARGUMENTS)),
|
RtlMoveMemory((PVOID) ((char *) Arguments + sizeof(WINDOWPROC_CALLBACK_ARGUMENTS)),
|
||||||
|
@ -343,7 +342,7 @@ co_IntCallHookProc(INT HookId,
|
||||||
pti = PsGetCurrentThreadWin32Thread();
|
pti = PsGetCurrentThreadWin32Thread();
|
||||||
if (pti->TIF_flags & TIF_INCLEANUP)
|
if (pti->TIF_flags & TIF_INCLEANUP)
|
||||||
{
|
{
|
||||||
DPRINT1("Thread is in cleanup and trying to call hook %d\n", Code);
|
ERR("Thread is in cleanup and trying to call hook %d\n", Code);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,17 +351,17 @@ co_IntCallHookProc(INT HookId,
|
||||||
switch(HookId)
|
switch(HookId)
|
||||||
{
|
{
|
||||||
case WH_CBT:
|
case WH_CBT:
|
||||||
DPRINT("WH_CBT: Code %d\n", Code);
|
TRACE("WH_CBT: Code %d\n", Code);
|
||||||
switch(Code)
|
switch(Code)
|
||||||
{
|
{
|
||||||
case HCBT_CREATEWND:
|
case HCBT_CREATEWND:
|
||||||
pWnd = UserGetWindowObject((HWND) wParam);
|
pWnd = UserGetWindowObject((HWND) wParam);
|
||||||
if (!pWnd)
|
if (!pWnd)
|
||||||
{
|
{
|
||||||
DPRINT1("WH_CBT HCBT_CREATEWND wParam bad hWnd!\n");
|
ERR("WH_CBT HCBT_CREATEWND wParam bad hWnd!\n");
|
||||||
goto Fault_Exit;
|
goto Fault_Exit;
|
||||||
}
|
}
|
||||||
DPRINT("HCBT_CREATEWND AnsiCreator %s, AnsiHook %s\n", pWnd->state & WNDS_ANSICREATOR ? "True" : "False", Ansi ? "True" : "False");
|
TRACE("HCBT_CREATEWND AnsiCreator %s, AnsiHook %s\n", pWnd->state & WNDS_ANSICREATOR ? "True" : "False", Ansi ? "True" : "False");
|
||||||
// Due to KsStudio.exe, just pass the callers original pointers
|
// Due to KsStudio.exe, just pass the callers original pointers
|
||||||
// except class which point to kernel space if not an atom.
|
// except class which point to kernel space if not an atom.
|
||||||
// Found by, Olaf Siejka
|
// Found by, Olaf Siejka
|
||||||
|
@ -389,7 +388,7 @@ co_IntCallHookProc(INT HookId,
|
||||||
case HCBT_QS:
|
case HCBT_QS:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DPRINT1("Trying to call unsupported CBT hook %d\n", Code);
|
ERR("Trying to call unsupported CBT hook %d\n", Code);
|
||||||
goto Fault_Exit;
|
goto Fault_Exit;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -418,14 +417,14 @@ co_IntCallHookProc(INT HookId,
|
||||||
case WH_SHELL:
|
case WH_SHELL:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DPRINT1("Trying to call unsupported window hook %d\n", HookId);
|
ERR("Trying to call unsupported window hook %d\n", HookId);
|
||||||
goto Fault_Exit;
|
goto Fault_Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
Argument = IntCbAllocateMemory(ArgumentLength);
|
Argument = IntCbAllocateMemory(ArgumentLength);
|
||||||
if (NULL == Argument)
|
if (NULL == Argument)
|
||||||
{
|
{
|
||||||
DPRINT1("HookProc callback failed: out of memory\n");
|
ERR("HookProc callback failed: out of memory\n");
|
||||||
goto Fault_Exit;
|
goto Fault_Exit;
|
||||||
}
|
}
|
||||||
Common = (PHOOKPROC_CALLBACK_ARGUMENTS) Argument;
|
Common = (PHOOKPROC_CALLBACK_ARGUMENTS) Argument;
|
||||||
|
@ -527,12 +526,12 @@ co_IntCallHookProc(INT HookId,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("ERROR: Hook ResultPointer 0x%x ResultLength %d\n",ResultPointer,ResultLength);
|
ERR("ERROR: Hook ResultPointer 0x%x ResultLength %d\n",ResultPointer,ResultLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failure to make Callback! Status 0x%x",Status);
|
ERR("Failure to make Callback! Status 0x%x",Status);
|
||||||
goto Fault_Exit;
|
goto Fault_Exit;
|
||||||
}
|
}
|
||||||
/* Support write backs... SEH is in UserCallNextHookEx. */
|
/* Support write backs... SEH is in UserCallNextHookEx. */
|
||||||
|
@ -566,7 +565,7 @@ co_IntCallHookProc(INT HookId,
|
||||||
Fault_Exit:
|
Fault_Exit:
|
||||||
if (Hit)
|
if (Hit)
|
||||||
{
|
{
|
||||||
DPRINT1("Exception CallHookProc HookId %d Code %d\n",HookId,Code);
|
ERR("Exception CallHookProc HookId %d Code %d\n",HookId,Code);
|
||||||
}
|
}
|
||||||
if (Argument) IntCbFreeMemory(Argument);
|
if (Argument) IntCbFreeMemory(Argument);
|
||||||
|
|
||||||
|
@ -598,7 +597,7 @@ co_IntCallEventProc(HWINEVENTHOOK hook,
|
||||||
Argument = IntCbAllocateMemory(ArgumentLength);
|
Argument = IntCbAllocateMemory(ArgumentLength);
|
||||||
if (NULL == Argument)
|
if (NULL == Argument)
|
||||||
{
|
{
|
||||||
DPRINT1("EventProc callback failed: out of memory\n");
|
ERR("EventProc callback failed: out of memory\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Common = (PEVENTPROC_CALLBACK_ARGUMENTS) Argument;
|
Common = (PEVENTPROC_CALLBACK_ARGUMENTS) Argument;
|
||||||
|
@ -655,7 +654,7 @@ co_IntCallLoadMenu( HINSTANCE hModule,
|
||||||
Argument = IntCbAllocateMemory(ArgumentLength);
|
Argument = IntCbAllocateMemory(ArgumentLength);
|
||||||
if (NULL == Argument)
|
if (NULL == Argument)
|
||||||
{
|
{
|
||||||
DPRINT1("LoadMenu callback failed: out of memory\n");
|
ERR("LoadMenu callback failed: out of memory\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Common = (PLOADMENU_CALLBACK_ARGUMENTS) Argument;
|
Common = (PLOADMENU_CALLBACK_ARGUMENTS) Argument;
|
||||||
|
|
|
@ -13,8 +13,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserCaret);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
/* DEFINES *****************************************************************/
|
/* DEFINES *****************************************************************/
|
||||||
|
|
||||||
|
@ -336,7 +335,7 @@ NtUserCreateCaret(
|
||||||
PUSER_MESSAGE_QUEUE ThreadQueue;
|
PUSER_MESSAGE_QUEUE ThreadQueue;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserCreateCaret\n");
|
TRACE("Enter NtUserCreateCaret\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Window = UserGetWindowObject(hWnd)))
|
if(!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -385,7 +384,7 @@ NtUserCreateCaret(
|
||||||
RETURN(TRUE);
|
RETURN(TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserCreateCaret, ret=%i\n",_ret_);
|
TRACE("Leave NtUserCreateCaret, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -396,13 +395,13 @@ NtUserGetCaretBlinkTime(VOID)
|
||||||
{
|
{
|
||||||
DECLARE_RETURN(UINT);
|
DECLARE_RETURN(UINT);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetCaretBlinkTime\n");
|
TRACE("Enter NtUserGetCaretBlinkTime\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
RETURN(IntGetCaretBlinkTime());
|
RETURN(IntGetCaretBlinkTime());
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetCaretBlinkTime, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetCaretBlinkTime, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -417,7 +416,7 @@ NtUserGetCaretPos(
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetCaretPos\n");
|
TRACE("Enter NtUserGetCaretPos\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
pti = PsGetCurrentThreadWin32Thread();
|
pti = PsGetCurrentThreadWin32Thread();
|
||||||
|
@ -433,7 +432,7 @@ NtUserGetCaretPos(
|
||||||
RETURN(TRUE);
|
RETURN(TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetCaretPos, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetCaretPos, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -447,7 +446,7 @@ NtUserShowCaret(HWND hWnd OPTIONAL)
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
|
||||||
DPRINT("Enter NtUserShowCaret\n");
|
TRACE("Enter NtUserShowCaret\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(hWnd && !(Window = UserGetWindowObject(hWnd)))
|
if(hWnd && !(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -464,7 +463,7 @@ NtUserShowCaret(HWND hWnd OPTIONAL)
|
||||||
RETURN(ret);
|
RETURN(ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserShowCaret, ret=%i\n",_ret_);
|
TRACE("Leave NtUserShowCaret, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -478,7 +477,7 @@ NtUserHideCaret(HWND hWnd OPTIONAL)
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
|
||||||
DPRINT("Enter NtUserHideCaret\n");
|
TRACE("Enter NtUserHideCaret\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(hWnd && !(Window = UserGetWindowObject(hWnd)))
|
if(hWnd && !(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -495,7 +494,7 @@ NtUserHideCaret(HWND hWnd OPTIONAL)
|
||||||
RETURN(ret);
|
RETURN(ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserHideCaret, ret=%i\n",_ret_);
|
TRACE("Leave NtUserHideCaret, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserClass);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
REGISTER_SYSCLASS DefaultServerClasses[] =
|
REGISTER_SYSCLASS DefaultServerClasses[] =
|
||||||
{
|
{
|
||||||
|
@ -507,7 +506,7 @@ IntGetClassForDesktop(IN OUT PCLS BaseClass,
|
||||||
/* simply clone the class */
|
/* simply clone the class */
|
||||||
RtlCopyMemory( Class, BaseClass, ClassSize);
|
RtlCopyMemory( Class, BaseClass, ClassSize);
|
||||||
|
|
||||||
DPRINT("Clone Class 0x%x hM 0x%x\n %S\n",Class, Class->hModule, Class->lpszClientUnicodeMenuName);
|
TRACE("Clone Class 0x%x hM 0x%x\n %S\n",Class, Class->hModule, Class->lpszClientUnicodeMenuName);
|
||||||
|
|
||||||
/* restore module address if default user class Ref: Bug 4778 */
|
/* restore module address if default user class Ref: Bug 4778 */
|
||||||
if ( Class->hModule != hModClient &&
|
if ( Class->hModule != hModClient &&
|
||||||
|
@ -515,7 +514,7 @@ IntGetClassForDesktop(IN OUT PCLS BaseClass,
|
||||||
Class->fnid >= FNID_BUTTON )
|
Class->fnid >= FNID_BUTTON )
|
||||||
{
|
{
|
||||||
Class->hModule = hModClient;
|
Class->hModule = hModClient;
|
||||||
DPRINT("Clone Class 0x%x Reset hM 0x%x\n",Class, Class->hModule);
|
TRACE("Clone Class 0x%x Reset hM 0x%x\n",Class, Class->hModule);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update some pointers and link the class */
|
/* update some pointers and link the class */
|
||||||
|
@ -633,7 +632,7 @@ IntDereferenceClass(IN OUT PCLS Class,
|
||||||
{
|
{
|
||||||
ASSERT(Class->pclsBase == Class);
|
ASSERT(Class->pclsBase == Class);
|
||||||
|
|
||||||
DPRINT("IntDereferenceClass 0x%x\n", Class);
|
TRACE("IntDereferenceClass 0x%x\n", Class);
|
||||||
/* check if there are clones of the class on other desktops,
|
/* check if there are clones of the class on other desktops,
|
||||||
link the first clone in if possible. If there are no clones
|
link the first clone in if possible. If there are no clones
|
||||||
then leave the class on the desktop heap. It will get moved
|
then leave the class on the desktop heap. It will get moved
|
||||||
|
@ -671,7 +670,7 @@ IntDereferenceClass(IN OUT PCLS Class,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT("IntDereferenceClass1 0x%x\n", Class);
|
TRACE("IntDereferenceClass1 0x%x\n", Class);
|
||||||
|
|
||||||
/* locate the cloned class and unlink it */
|
/* locate the cloned class and unlink it */
|
||||||
PrevLink = &BaseClass->pclsClone;
|
PrevLink = &BaseClass->pclsClone;
|
||||||
|
@ -828,7 +827,7 @@ IntCheckProcessDesktopClasses(IN PDESKTOP Desktop,
|
||||||
&Ret);
|
&Ret);
|
||||||
if (!Ret)
|
if (!Ret)
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to move process classes from desktop 0x%p to the shared heap!\n", Desktop);
|
ERR("Failed to move process classes from desktop 0x%p to the shared heap!\n", Desktop);
|
||||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -852,13 +851,13 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
|
||||||
PWSTR pszMenuName = NULL;
|
PWSTR pszMenuName = NULL;
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
DPRINT("lpwcx=%p ClassName=%wZ MenuName=%wZ dwFlags=%08x Desktop=%p pi=%p\n",
|
TRACE("lpwcx=%p ClassName=%wZ MenuName=%wZ dwFlags=%08x Desktop=%p pi=%p\n",
|
||||||
lpwcx, ClassName, MenuName, dwFlags, Desktop, pi);
|
lpwcx, ClassName, MenuName, dwFlags, Desktop, pi);
|
||||||
|
|
||||||
if (!IntRegisterClassAtom(ClassName,
|
if (!IntRegisterClassAtom(ClassName,
|
||||||
&Atom))
|
&Atom))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to register class atom!\n");
|
ERR("Failed to register class atom!\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -948,7 +947,7 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
|
||||||
FALSE);
|
FALSE);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to convert unicode menu name to ansi!\n");
|
ERR("Failed to convert unicode menu name to ansi!\n");
|
||||||
|
|
||||||
/* life would've been much prettier if ntoskrnl exported RtlRaiseStatus()... */
|
/* life would've been much prettier if ntoskrnl exported RtlRaiseStatus()... */
|
||||||
_SEH2_LEAVE;
|
_SEH2_LEAVE;
|
||||||
|
@ -1007,7 +1006,7 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed creating the class: 0x%x\n", Status);
|
ERR("Failed creating the class: 0x%x\n", Status);
|
||||||
|
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
|
|
||||||
|
@ -1024,7 +1023,7 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NoMem:
|
NoMem:
|
||||||
DPRINT1("Failed to allocate class on Desktop 0x%p\n", Desktop);
|
ERR("Failed to allocate class on Desktop 0x%p\n", Desktop);
|
||||||
|
|
||||||
if (pszMenuName != NULL)
|
if (pszMenuName != NULL)
|
||||||
UserHeapFree(pszMenuName);
|
UserHeapFree(pszMenuName);
|
||||||
|
@ -1034,6 +1033,9 @@ NoMem:
|
||||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TRACE("Created class 0x%x with name %wZ and proc 0x%x for atom 0x%x and hInstance 0x%x, global %d\n",
|
||||||
|
Class, ClassName, Class->lpfnWndProc, Atom, Class->hModule, Class->Global);
|
||||||
|
|
||||||
return Class;
|
return Class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1159,7 +1161,7 @@ IntGetClassAtom(IN PUNICODE_STRING ClassName,
|
||||||
&pi->pclsPrivateList,
|
&pi->pclsPrivateList,
|
||||||
Link);
|
Link);
|
||||||
if (Class != NULL)
|
if (Class != NULL)
|
||||||
{ DPRINT("Step 1: 0x%x\n",Class );
|
{ TRACE("Step 1: 0x%x\n",Class );
|
||||||
goto FoundClass;
|
goto FoundClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1170,7 +1172,7 @@ IntGetClassAtom(IN PUNICODE_STRING ClassName,
|
||||||
&pi->pclsPublicList,
|
&pi->pclsPublicList,
|
||||||
Link);
|
Link);
|
||||||
if (Class != NULL)
|
if (Class != NULL)
|
||||||
{ DPRINT("Step 2: 0x%x 0x%x\n",Class, Class->hModule);
|
{ TRACE("Step 2: 0x%x 0x%x\n",Class, Class->hModule);
|
||||||
goto FoundClass;
|
goto FoundClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1180,7 +1182,7 @@ IntGetClassAtom(IN PUNICODE_STRING ClassName,
|
||||||
&pi->pclsPrivateList,
|
&pi->pclsPrivateList,
|
||||||
Link);
|
Link);
|
||||||
if (Class != NULL)
|
if (Class != NULL)
|
||||||
{ DPRINT("Step 3: 0x%x\n",Class );
|
{ TRACE("Step 3: 0x%x\n",Class );
|
||||||
goto FoundClass;
|
goto FoundClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1193,7 +1195,7 @@ IntGetClassAtom(IN PUNICODE_STRING ClassName,
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST);
|
EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST);
|
||||||
return (RTL_ATOM)0;
|
return (RTL_ATOM)0;
|
||||||
}else{DPRINT("Step 4: 0x%x\n",Class );}
|
}else{TRACE("Step 4: 0x%x\n",Class );}
|
||||||
|
|
||||||
FoundClass:
|
FoundClass:
|
||||||
*BaseClass = Class;
|
*BaseClass = Class;
|
||||||
|
@ -1218,7 +1220,7 @@ IntGetAndReferenceClass(PUNICODE_STRING ClassName, HINSTANCE hInstance)
|
||||||
|
|
||||||
/* Check the class. */
|
/* Check the class. */
|
||||||
|
|
||||||
DPRINT("Class %wZ\n", ClassName);
|
TRACE("Finding Class %wZ for hInstance 0x%x\n", ClassName, hInstance);
|
||||||
|
|
||||||
ClassAtom = IntGetClassAtom(ClassName,
|
ClassAtom = IntGetClassAtom(ClassName,
|
||||||
hInstance,
|
hInstance,
|
||||||
|
@ -1230,23 +1232,24 @@ IntGetAndReferenceClass(PUNICODE_STRING ClassName, HINSTANCE hInstance)
|
||||||
{
|
{
|
||||||
if (IS_ATOM(ClassName->Buffer))
|
if (IS_ATOM(ClassName->Buffer))
|
||||||
{
|
{
|
||||||
DPRINT1("Class 0x%p not found\n", (DWORD_PTR) ClassName->Buffer);
|
ERR("Class 0x%p not found\n", (DWORD_PTR) ClassName->Buffer);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("Class \"%wZ\" not found\n", ClassName);
|
ERR("Class \"%wZ\" not found\n", ClassName);
|
||||||
}
|
}
|
||||||
|
|
||||||
EngSetLastError(ERROR_CANNOT_FIND_WND_CLASS);
|
EngSetLastError(ERROR_CANNOT_FIND_WND_CLASS);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
DPRINT("ClassAtom %x\n", ClassAtom);
|
|
||||||
|
TRACE("Referencing Class 0x%x with atom 0x%x\n", Class, ClassAtom);
|
||||||
Class = IntReferenceClass(Class,
|
Class = IntReferenceClass(Class,
|
||||||
ClassLink,
|
ClassLink,
|
||||||
pti->rpdesk);
|
pti->rpdesk);
|
||||||
if (Class == NULL)
|
if (Class == NULL)
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to reference window class!\n");
|
ERR("Failed to reference window class!\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1285,7 +1288,7 @@ UserRegisterClass(IN CONST WNDCLASSEXW* lpwcx,
|
||||||
if (Class != NULL && !Class->Global)
|
if (Class != NULL && !Class->Global)
|
||||||
{
|
{
|
||||||
// local class already exists
|
// local class already exists
|
||||||
DPRINT("Local Class 0x%p does already exist!\n", ClassAtom);
|
TRACE("Local Class 0x%p does already exist!\n", ClassAtom);
|
||||||
EngSetLastError(ERROR_CLASS_ALREADY_EXISTS);
|
EngSetLastError(ERROR_CLASS_ALREADY_EXISTS);
|
||||||
return (RTL_ATOM)0;
|
return (RTL_ATOM)0;
|
||||||
}
|
}
|
||||||
|
@ -1299,7 +1302,7 @@ UserRegisterClass(IN CONST WNDCLASSEXW* lpwcx,
|
||||||
|
|
||||||
if (Class != NULL && Class->Global)
|
if (Class != NULL && Class->Global)
|
||||||
{
|
{
|
||||||
DPRINT("Global Class 0x%p does already exist!\n", ClassAtom);
|
TRACE("Global Class 0x%p does already exist!\n", ClassAtom);
|
||||||
EngSetLastError(ERROR_CLASS_ALREADY_EXISTS);
|
EngSetLastError(ERROR_CLASS_ALREADY_EXISTS);
|
||||||
return (RTL_ATOM)0;
|
return (RTL_ATOM)0;
|
||||||
}
|
}
|
||||||
|
@ -1332,7 +1335,7 @@ UserRegisterClass(IN CONST WNDCLASSEXW* lpwcx,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("UserRegisterClass: Yes, that is right, you have no Class!\n");
|
ERR("UserRegisterClass: Yes, that is right, you have no Class!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
|
@ -1350,7 +1353,7 @@ UserUnregisterClass(IN PUNICODE_STRING ClassName,
|
||||||
|
|
||||||
pi = GetW32ProcessInfo();
|
pi = GetW32ProcessInfo();
|
||||||
|
|
||||||
DPRINT("UserUnregisterClass(%wZ, 0x%x)\n", ClassName, hInstance);
|
TRACE("UserUnregisterClass(%wZ, 0x%x)\n", ClassName, hInstance);
|
||||||
|
|
||||||
/* NOTE: Accessing the buffer in ClassName may raise an exception! */
|
/* NOTE: Accessing the buffer in ClassName may raise an exception! */
|
||||||
ClassAtom = IntGetClassAtom(ClassName,
|
ClassAtom = IntGetClassAtom(ClassName,
|
||||||
|
@ -1360,7 +1363,7 @@ UserUnregisterClass(IN PUNICODE_STRING ClassName,
|
||||||
&Link);
|
&Link);
|
||||||
if (ClassAtom == (RTL_ATOM)0)
|
if (ClassAtom == (RTL_ATOM)0)
|
||||||
{
|
{
|
||||||
DPRINT("UserUnregisterClass: No Class found.\n");
|
TRACE("UserUnregisterClass: No Class found.\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1369,7 +1372,7 @@ UserUnregisterClass(IN PUNICODE_STRING ClassName,
|
||||||
if (Class->cWndReferenceCount != 0 ||
|
if (Class->cWndReferenceCount != 0 ||
|
||||||
Class->pclsClone != NULL)
|
Class->pclsClone != NULL)
|
||||||
{
|
{
|
||||||
DPRINT("UserUnregisterClass: Class has a Window. Ct %d : Clone 0x%x\n", Class->cWndReferenceCount, Class->pclsClone);
|
TRACE("UserUnregisterClass: Class has a Window. Ct %d : Clone 0x%x\n", Class->cWndReferenceCount, Class->pclsClone);
|
||||||
EngSetLastError(ERROR_CLASS_HAS_WINDOWS);
|
EngSetLastError(ERROR_CLASS_HAS_WINDOWS);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1382,13 +1385,13 @@ UserUnregisterClass(IN PUNICODE_STRING ClassName,
|
||||||
|
|
||||||
if (NT_SUCCESS(IntDeregisterClassAtom(Class->atomClassName)))
|
if (NT_SUCCESS(IntDeregisterClassAtom(Class->atomClassName)))
|
||||||
{
|
{
|
||||||
DPRINT("Class 0x%x\n", Class);
|
TRACE("Class 0x%x\n", Class);
|
||||||
DPRINT("UserUnregisterClass: Good Exit!\n");
|
TRACE("UserUnregisterClass: Good Exit!\n");
|
||||||
/* finally free the resources */
|
/* finally free the resources */
|
||||||
IntDestroyClass(Class);
|
IntDestroyClass(Class);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
DPRINT1("UserUnregisterClass: Can not deregister Class Atom.\n");
|
ERR("UserUnregisterClass: Can not deregister Class Atom.\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1582,7 +1585,7 @@ IntSetClassMenuName(IN PCLS Class,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to copy class menu name!\n");
|
ERR("Failed to copy class menu name!\n");
|
||||||
UserHeapFree(strBufW);
|
UserHeapFree(strBufW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1633,7 +1636,7 @@ UserSetClassLongPtr(IN PCLS Class,
|
||||||
{
|
{
|
||||||
PULONG_PTR Data;
|
PULONG_PTR Data;
|
||||||
|
|
||||||
DPRINT("SetClassLong(%d, %x)\n", Index, NewLong);
|
TRACE("SetClassLong(%d, %x)\n", Index, NewLong);
|
||||||
|
|
||||||
if (Index + sizeof(ULONG_PTR) < Index ||
|
if (Index + sizeof(ULONG_PTR) < Index ||
|
||||||
Index + sizeof(ULONG_PTR) > Class->cbclsExtra)
|
Index + sizeof(ULONG_PTR) > Class->cbclsExtra)
|
||||||
|
@ -1756,7 +1759,7 @@ UserSetClassLongPtr(IN PCLS Class,
|
||||||
if (!IntSetClassMenuName(Class,
|
if (!IntSetClassMenuName(Class,
|
||||||
Value))
|
Value))
|
||||||
{
|
{
|
||||||
DPRINT1("Setting the class menu name failed!\n");
|
ERR("Setting the class menu name failed!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME - really return NULL? Wine does so... */
|
/* FIXME - really return NULL? Wine does so... */
|
||||||
|
@ -1941,7 +1944,7 @@ UserRegisterSystemClasses(VOID)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("!!! Registering system class failed!\n");
|
ERR("!!! Registering system class failed!\n");
|
||||||
Ret = FALSE;
|
Ret = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1979,14 +1982,14 @@ NtUserRegisterClassExWOW(
|
||||||
|
|
||||||
if (Flags & ~(CSF_ANSIPROC))
|
if (Flags & ~(CSF_ANSIPROC))
|
||||||
{
|
{
|
||||||
DPRINT1("NtUserRegisterClassExWOW Bad Flags!\n");
|
ERR("NtUserRegisterClassExWOW Bad Flags!\n");
|
||||||
EngSetLastError(ERROR_INVALID_FLAGS);
|
EngSetLastError(ERROR_INVALID_FLAGS);
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
DPRINT("NtUserRegisterClassExWOW ClsN %wZ\n",ClassName);
|
TRACE("NtUserRegisterClassExWOW ClsN %wZ\n",ClassName);
|
||||||
|
|
||||||
if ( !(ppi->W32PF_flags & W32PF_CLASSESREGISTERED ))
|
if ( !(ppi->W32PF_flags & W32PF_CLASSESREGISTERED ))
|
||||||
{
|
{
|
||||||
|
@ -1998,7 +2001,7 @@ NtUserRegisterClassExWOW(
|
||||||
/* Probe the parameters and basic parameter checks */
|
/* Probe the parameters and basic parameter checks */
|
||||||
if (ProbeForReadUint(&lpwcx->cbSize) != sizeof(WNDCLASSEXW))
|
if (ProbeForReadUint(&lpwcx->cbSize) != sizeof(WNDCLASSEXW))
|
||||||
{
|
{
|
||||||
DPRINT1("NtUserRegisterClassExWOW Wrong cbSize!\n");
|
ERR("NtUserRegisterClassExWOW Wrong cbSize!\n");
|
||||||
goto InvalidParameter;
|
goto InvalidParameter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2027,7 +2030,7 @@ NtUserRegisterClassExWOW(
|
||||||
CapturedClassInfo.cbWndExtra < 0 ||
|
CapturedClassInfo.cbWndExtra < 0 ||
|
||||||
CapturedClassInfo.hInstance == NULL)
|
CapturedClassInfo.hInstance == NULL)
|
||||||
{
|
{
|
||||||
DPRINT1("NtUserRegisterClassExWOW Invalid Parameter Error!\n");
|
ERR("NtUserRegisterClassExWOW Invalid Parameter Error!\n");
|
||||||
goto InvalidParameter;
|
goto InvalidParameter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2041,7 +2044,7 @@ NtUserRegisterClassExWOW(
|
||||||
{
|
{
|
||||||
if (!IS_ATOM(CapturedName.Buffer))
|
if (!IS_ATOM(CapturedName.Buffer))
|
||||||
{
|
{
|
||||||
DPRINT1("NtUserRegisterClassExWOW ClassName Error!\n");
|
ERR("NtUserRegisterClassExWOW ClassName Error!\n");
|
||||||
goto InvalidParameter;
|
goto InvalidParameter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2055,7 +2058,7 @@ NtUserRegisterClassExWOW(
|
||||||
else if (CapturedMenuName.Buffer != NULL &&
|
else if (CapturedMenuName.Buffer != NULL &&
|
||||||
!IS_INTRESOURCE(CapturedMenuName.Buffer))
|
!IS_INTRESOURCE(CapturedMenuName.Buffer))
|
||||||
{
|
{
|
||||||
DPRINT1("NtUserRegisterClassExWOW MenuName Error!\n");
|
ERR("NtUserRegisterClassExWOW MenuName Error!\n");
|
||||||
InvalidParameter:
|
InvalidParameter:
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
_SEH2_LEAVE;
|
_SEH2_LEAVE;
|
||||||
|
@ -2064,10 +2067,10 @@ InvalidParameter:
|
||||||
if (IsCallProcHandle(lpwcx->lpfnWndProc))
|
if (IsCallProcHandle(lpwcx->lpfnWndProc))
|
||||||
{// Never seen this yet, but I'm sure it's a little haxxy trick!
|
{// Never seen this yet, but I'm sure it's a little haxxy trick!
|
||||||
// If this pops up we know what todo!
|
// If this pops up we know what todo!
|
||||||
DPRINT1("NtUserRegisterClassExWOW WndProc is CallProc!!\n");
|
ERR("NtUserRegisterClassExWOW WndProc is CallProc!!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("NtUserRegisterClassExWOW MnuN %wZ\n",&CapturedMenuName);
|
TRACE("NtUserRegisterClassExWOW MnuN %wZ\n",&CapturedMenuName);
|
||||||
|
|
||||||
/* Register the class */
|
/* Register the class */
|
||||||
Ret = UserRegisterClass(&CapturedClassInfo,
|
Ret = UserRegisterClass(&CapturedClassInfo,
|
||||||
|
@ -2078,14 +2081,14 @@ InvalidParameter:
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
DPRINT1("NtUserRegisterClassExWOW Exception Error!\n");
|
ERR("NtUserRegisterClassExWOW Exception Error!\n");
|
||||||
SetLastNtError(_SEH2_GetExceptionCode());
|
SetLastNtError(_SEH2_GetExceptionCode());
|
||||||
}
|
}
|
||||||
_SEH2_END;
|
_SEH2_END;
|
||||||
/*
|
/*
|
||||||
if (!Ret)
|
if (!Ret)
|
||||||
{
|
{
|
||||||
DPRINT1("NtUserRegisterClassExWOW Null Return!\n");
|
ERR("NtUserRegisterClassExWOW Null Return!\n");
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
UserLeave();
|
UserLeave();
|
||||||
|
@ -2266,9 +2269,13 @@ NtUserGetClassInfo(
|
||||||
CapturedClassName = ProbeForReadUnicodeString(ClassName);
|
CapturedClassName = ProbeForReadUnicodeString(ClassName);
|
||||||
|
|
||||||
if (CapturedClassName.Length == 0)
|
if (CapturedClassName.Length == 0)
|
||||||
DPRINT("hInst %p atom %04X lpWndClassEx %p Ansi %d\n", hInstance, CapturedClassName.Buffer, lpWndClassEx, Ansi);
|
{
|
||||||
|
TRACE("hInst %p atom %04X lpWndClassEx %p Ansi %d\n", hInstance, CapturedClassName.Buffer, lpWndClassEx, Ansi);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
DPRINT("hInst %p class %wZ lpWndClassEx %p Ansi %d\n", hInstance, &CapturedClassName, lpWndClassEx, Ansi);
|
{
|
||||||
|
TRACE("hInst %p class %wZ lpWndClassEx %p Ansi %d\n", hInstance, &CapturedClassName, lpWndClassEx, Ansi);
|
||||||
|
}
|
||||||
|
|
||||||
if (CapturedClassName.Length & 1)
|
if (CapturedClassName.Length & 1)
|
||||||
{
|
{
|
||||||
|
@ -2296,7 +2303,7 @@ NtUserGetClassInfo(
|
||||||
{
|
{
|
||||||
if (!IS_ATOM(CapturedClassName.Buffer))
|
if (!IS_ATOM(CapturedClassName.Buffer))
|
||||||
{
|
{
|
||||||
DPRINT1("NtUserGetClassInfo() got ClassName instead of Atom!\n");
|
ERR("NtUserGetClassInfo() got ClassName instead of Atom!\n");
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
Ret = FALSE;
|
Ret = FALSE;
|
||||||
_SEH2_LEAVE;
|
_SEH2_LEAVE;
|
||||||
|
@ -2323,7 +2330,7 @@ NtUserGetClassInfo(
|
||||||
|
|
||||||
if (Ret)
|
if (Ret)
|
||||||
{
|
{
|
||||||
DPRINT("GetClassInfo(%wZ, 0x%x)\n", ClassName, hInstance);
|
TRACE("GetClassInfo(%wZ, 0x%x)\n", SafeClassName, hInstance);
|
||||||
ClassAtom = IntGetClassAtom( &SafeClassName,
|
ClassAtom = IntGetClassAtom( &SafeClassName,
|
||||||
hInstance,
|
hInstance,
|
||||||
ppi,
|
ppi,
|
||||||
|
@ -2460,7 +2467,7 @@ NtUserGetWOWClass(HINSTANCE hInstance,
|
||||||
{
|
{
|
||||||
if (!IS_ATOM(ClassName->Buffer))
|
if (!IS_ATOM(ClassName->Buffer))
|
||||||
{
|
{
|
||||||
DPRINT1("NtUserGetWOWClass() got ClassName instead of Atom!\n");
|
ERR("NtUserGetWOWClass() got ClassName instead of Atom!\n");
|
||||||
Hit = TRUE;
|
Hit = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserClipbrd);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#define DATA_DELAYED_RENDER 0
|
#define DATA_DELAYED_RENDER 0
|
||||||
#define DATA_SYNTHESIZED_RENDER -1
|
#define DATA_SYNTHESIZED_RENDER -1
|
||||||
|
@ -60,7 +59,7 @@ VOID FASTCALL printChain(VOID)
|
||||||
PCLIPBOARDCHAINELEMENT wce2 = WindowsChain;
|
PCLIPBOARDCHAINELEMENT wce2 = WindowsChain;
|
||||||
while (wce2)
|
while (wce2)
|
||||||
{
|
{
|
||||||
DPRINT1("chain: %p\n", wce2->window->head.h);
|
ERR("chain: %p\n", wce2->window->head.h);
|
||||||
wce2 = wce2->next;
|
wce2 = wce2->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -496,7 +495,7 @@ NtUserCloseClipboard(VOID)
|
||||||
/* commented because it makes a crash in co_MsqSendMessage
|
/* commented because it makes a crash in co_MsqSendMessage
|
||||||
ASSERT(WindowsChain->window);
|
ASSERT(WindowsChain->window);
|
||||||
ASSERT(WindowsChain->window->hSelf);
|
ASSERT(WindowsChain->window->hSelf);
|
||||||
DPRINT1("Clipboard: sending WM_DRAWCLIPBOARD to %p\n", WindowsChain->window->hSelf);
|
ERR("Clipboard: sending WM_DRAWCLIPBOARD to %p\n", WindowsChain->window->hSelf);
|
||||||
co_IntSendMessage(WindowsChain->window->hSelf, WM_DRAWCLIPBOARD, 0, 0);
|
co_IntSendMessage(WindowsChain->window->hSelf, WM_DRAWCLIPBOARD, 0, 0);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
@ -550,7 +549,7 @@ NtUserChangeClipboardChain(HWND hWndRemove, HWND hWndNewNext)
|
||||||
|
|
||||||
/* WindowsChain->window may be NULL */
|
/* WindowsChain->window may be NULL */
|
||||||
LPARAM lparam = WindowsChain->window == NULL ? 0 : (LPARAM)WindowsChain->window->head.h;
|
LPARAM lparam = WindowsChain->window == NULL ? 0 : (LPARAM)WindowsChain->window->head.h;
|
||||||
DPRINT1("Message: WM_CHANGECBCHAIN to %p", WindowsChain->window->head.h);
|
ERR("Message: WM_CHANGECBCHAIN to %p", WindowsChain->window->head.h);
|
||||||
co_IntSendMessage(WindowsChain->window->head.h, WM_CHANGECBCHAIN, (WPARAM)hWndRemove, lparam);
|
co_IntSendMessage(WindowsChain->window->head.h, WM_CHANGECBCHAIN, (WPARAM)hWndRemove, lparam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -600,7 +599,7 @@ NtUserEmptyClipboard(VOID)
|
||||||
|
|
||||||
if (ret && ClipboardOwnerWindow)
|
if (ret && ClipboardOwnerWindow)
|
||||||
{
|
{
|
||||||
DPRINT("Clipboard: WM_DESTROYCLIPBOARD to %p", ClipboardOwnerWindow->head.h);
|
TRACE("Clipboard: WM_DESTROYCLIPBOARD to %p", ClipboardOwnerWindow->head.h);
|
||||||
co_IntSendMessageNoWait( ClipboardOwnerWindow->head.h, WM_DESTROYCLIPBOARD, 0, 0);
|
co_IntSendMessageNoWait( ClipboardOwnerWindow->head.h, WM_DESTROYCLIPBOARD, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -920,7 +919,7 @@ NtUserSetClipboardData(UINT uFormat, HANDLE hMem, DWORD size)
|
||||||
hCBData = ExAllocatePoolWithTag(PagedPool, size, USERTAG_CLIPBOARD);
|
hCBData = ExAllocatePoolWithTag(PagedPool, size, USERTAG_CLIPBOARD);
|
||||||
memcpy(hCBData, hMem, size);
|
memcpy(hCBData, hMem, size);
|
||||||
intAddFormatedData(uFormat, hCBData, size);
|
intAddFormatedData(uFormat, hCBData, size);
|
||||||
DPRINT1("Data stored\n");
|
ERR("Data stored\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
sendDrawClipboardMsg = TRUE;
|
sendDrawClipboardMsg = TRUE;
|
||||||
|
@ -1047,7 +1046,7 @@ NtUserSetClipboardData(UINT uFormat, HANDLE hMem, DWORD size)
|
||||||
delayedRender = TRUE;
|
delayedRender = TRUE;
|
||||||
sendDrawClipboardMsg = TRUE;
|
sendDrawClipboardMsg = TRUE;
|
||||||
intAddFormatedData(uFormat, NULL, 0);
|
intAddFormatedData(uFormat, NULL, 0);
|
||||||
DPRINT1("SetClipboardData delayed format: %d\n", uFormat);
|
ERR("SetClipboardData delayed format: %d\n", uFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1183,7 +1182,7 @@ NtUserGetClipboardSequenceNumber(VOID)
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("No WINSTA_ACCESSCLIPBOARD access\n");
|
ERR("No WINSTA_ACCESSCLIPBOARD access\n");
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,8 +38,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserIcon);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
static PAGED_LOOKASIDE_LIST gProcessLookasideList;
|
static PAGED_LOOKASIDE_LIST gProcessLookasideList;
|
||||||
static LIST_ENTRY gCurIconList;
|
static LIST_ENTRY gCurIconList;
|
||||||
|
@ -232,7 +231,7 @@ IntCreateCurIconHandle()
|
||||||
|
|
||||||
if (! ReferenceCurIconByProcess(CurIcon))
|
if (! ReferenceCurIconByProcess(CurIcon))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to add process\n");
|
ERR("Failed to add process\n");
|
||||||
UserDeleteObject(hCurIcon, otCursorIcon);
|
UserDeleteObject(hCurIcon, otCursorIcon);
|
||||||
UserDereferenceObject(CurIcon);
|
UserDereferenceObject(CurIcon);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -259,13 +258,13 @@ IntDestroyCurIconObject(PCURICON_OBJECT CurIcon, BOOL ProcessCleanup)
|
||||||
Current = CONTAINING_RECORD(CurIcon->ProcessList.Flink, CURICON_PROCESS, ListEntry);
|
Current = CONTAINING_RECORD(CurIcon->ProcessList.Flink, CURICON_PROCESS, ListEntry);
|
||||||
if (Current->Process != W32Process)
|
if (Current->Process != W32Process)
|
||||||
{
|
{
|
||||||
DPRINT1("Trying to destroy private icon/cursor of another process\n");
|
ERR("Trying to destroy private icon/cursor of another process\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (! ProcessCleanup)
|
else if (! ProcessCleanup)
|
||||||
{
|
{
|
||||||
DPRINT("Trying to destroy shared icon/cursor\n");
|
TRACE("Trying to destroy shared icon/cursor\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,7 +378,7 @@ NtUserGetIconInfo(
|
||||||
BOOL Ret = FALSE;
|
BOOL Ret = FALSE;
|
||||||
DWORD colorBpp = 0;
|
DWORD colorBpp = 0;
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetIconInfo\n");
|
TRACE("Enter NtUserGetIconInfo\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!IconInfo)
|
if (!IconInfo)
|
||||||
|
@ -437,7 +436,7 @@ NtUserGetIconInfo(
|
||||||
UserDereferenceObject(CurIcon);
|
UserDereferenceObject(CurIcon);
|
||||||
|
|
||||||
leave:
|
leave:
|
||||||
DPRINT("Leave NtUserGetIconInfo, ret=%i\n", Ret);
|
TRACE("Leave NtUserGetIconInfo, ret=%i\n", Ret);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
|
@ -459,7 +458,7 @@ NtUserGetIconSize(
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
BOOL bRet = FALSE;
|
BOOL bRet = FALSE;
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetIconSize\n");
|
TRACE("Enter NtUserGetIconSize\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(CurIcon = UserGetCurIconObject(hCurIcon)))
|
if (!(CurIcon = UserGetCurIconObject(hCurIcon)))
|
||||||
|
@ -488,7 +487,7 @@ NtUserGetIconSize(
|
||||||
UserDereferenceObject(CurIcon);
|
UserDereferenceObject(CurIcon);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
DPRINT("Leave NtUserGetIconSize, ret=%i\n", bRet);
|
TRACE("Leave NtUserGetIconSize, ret=%i\n", bRet);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
@ -509,7 +508,7 @@ NtUserGetCursorInfo(
|
||||||
BOOL Ret = FALSE;
|
BOOL Ret = FALSE;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetCursorInfo\n");
|
TRACE("Enter NtUserGetCursorInfo\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
CurInfo = IntGetSysCursorInfo();
|
CurInfo = IntGetSysCursorInfo();
|
||||||
|
@ -547,7 +546,7 @@ NtUserGetCursorInfo(
|
||||||
RETURN(Ret);
|
RETURN(Ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetCursorInfo, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetCursorInfo, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -635,7 +634,7 @@ NtUserDestroyCursor(
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserDestroyCursorIcon\n");
|
TRACE("Enter NtUserDestroyCursorIcon\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(CurIcon = UserGetCurIconObject(hCurIcon)))
|
if (!(CurIcon = UserGetCurIconObject(hCurIcon)))
|
||||||
|
@ -649,7 +648,7 @@ NtUserDestroyCursor(
|
||||||
RETURN(ret);
|
RETURN(ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserDestroyCursorIcon, ret=%i\n",_ret_);
|
TRACE("Leave NtUserDestroyCursorIcon, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -670,7 +669,7 @@ NtUserFindExistingCursorIcon(
|
||||||
HANDLE Ret = (HANDLE)0;
|
HANDLE Ret = (HANDLE)0;
|
||||||
DECLARE_RETURN(HICON);
|
DECLARE_RETURN(HICON);
|
||||||
|
|
||||||
DPRINT("Enter NtUserFindExistingCursorIcon\n");
|
TRACE("Enter NtUserFindExistingCursorIcon\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
CurIcon = IntFindExistingCurIconObject(hModule, hRsrc, cx, cy);
|
CurIcon = IntFindExistingCurIconObject(hModule, hRsrc, cx, cy);
|
||||||
|
@ -686,7 +685,7 @@ NtUserFindExistingCursorIcon(
|
||||||
RETURN((HANDLE)0);
|
RETURN((HANDLE)0);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserFindExistingCursorIcon, ret=%i\n",_ret_);
|
TRACE("Leave NtUserFindExistingCursorIcon, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -706,7 +705,7 @@ NtUserGetClipCursor(
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetClipCursor\n");
|
TRACE("Enter NtUserGetClipCursor\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!lpRect)
|
if (!lpRect)
|
||||||
|
@ -735,7 +734,7 @@ NtUserGetClipCursor(
|
||||||
RETURN(TRUE);
|
RETURN(TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetClipCursor, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetClipCursor, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -752,7 +751,7 @@ NtUserSetCursor(
|
||||||
PCURICON_OBJECT pcurOld, pcurNew;
|
PCURICON_OBJECT pcurOld, pcurNew;
|
||||||
HCURSOR hOldCursor = NULL;
|
HCURSOR hOldCursor = NULL;
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetCursor\n");
|
TRACE("Enter NtUserSetCursor\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (hCursor)
|
if (hCursor)
|
||||||
|
@ -798,7 +797,7 @@ NtUserSetCursorContents(
|
||||||
BOOL Ret = FALSE;
|
BOOL Ret = FALSE;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetCursorContents\n");
|
TRACE("Enter NtUserSetCursorContents\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(CurIcon = UserGetCurIconObject(hCurIcon)))
|
if (!(CurIcon = UserGetCurIconObject(hCurIcon)))
|
||||||
|
@ -864,7 +863,7 @@ done:
|
||||||
RETURN(Ret);
|
RETURN(Ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetCursorContents, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetCursorContents, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -888,7 +887,7 @@ NtUserSetCursorIconData(
|
||||||
BOOL Ret = FALSE;
|
BOOL Ret = FALSE;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetCursorIconData\n");
|
TRACE("Enter NtUserSetCursorIconData\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(CurIcon = UserGetCurIconObject(Handle)))
|
if (!(CurIcon = UserGetCurIconObject(Handle)))
|
||||||
|
@ -947,7 +946,7 @@ NtUserSetCursorIconData(
|
||||||
RETURN(Ret);
|
RETURN(Ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetCursorIconData, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetCursorIconData, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -968,7 +967,7 @@ NtUserSetCursorIconData(
|
||||||
BOOL Ret = FALSE;
|
BOOL Ret = FALSE;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetCursorIconData\n");
|
TRACE("Enter NtUserSetCursorIconData\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(CurIcon = UserGetCurIconObject(hCurIcon)))
|
if (!(CurIcon = UserGetCurIconObject(hCurIcon)))
|
||||||
|
@ -1030,7 +1029,7 @@ done:
|
||||||
|
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetCursorIconData, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetCursorIconData, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1066,7 +1065,7 @@ UserDrawIconEx(
|
||||||
hbmColor = pIcon->IconInfo.hbmColor;
|
hbmColor = pIcon->IconInfo.hbmColor;
|
||||||
|
|
||||||
if (istepIfAniCur)
|
if (istepIfAniCur)
|
||||||
DPRINT1("NtUserDrawIconEx: istepIfAniCur is not supported!\n");
|
ERR("NtUserDrawIconEx: istepIfAniCur is not supported!\n");
|
||||||
|
|
||||||
if (!hbmMask || !GreGetObject(hbmMask, sizeof(BITMAP), (PVOID)&bm))
|
if (!hbmMask || !GreGetObject(hbmMask, sizeof(BITMAP), (PVOID)&bm))
|
||||||
{
|
{
|
||||||
|
@ -1080,7 +1079,7 @@ UserDrawIconEx(
|
||||||
|
|
||||||
if(!(hMemDC = NtGdiCreateCompatibleDC(hDc)))
|
if(!(hMemDC = NtGdiCreateCompatibleDC(hDc)))
|
||||||
{
|
{
|
||||||
DPRINT1("NtGdiCreateCompatibleDC failed!\n");
|
ERR("NtGdiCreateCompatibleDC failed!\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1133,14 +1132,14 @@ UserDrawIconEx(
|
||||||
hDestDC = NtGdiCreateCompatibleDC(hDc);
|
hDestDC = NtGdiCreateCompatibleDC(hDc);
|
||||||
if(!hDestDC)
|
if(!hDestDC)
|
||||||
{
|
{
|
||||||
DPRINT1("NtGdiCreateCompatibleDC failed!\n");
|
ERR("NtGdiCreateCompatibleDC failed!\n");
|
||||||
Ret = FALSE;
|
Ret = FALSE;
|
||||||
goto Cleanup ;
|
goto Cleanup ;
|
||||||
}
|
}
|
||||||
hOffBmp = NtGdiCreateCompatibleBitmap(hDc, cxWidth, cyHeight);
|
hOffBmp = NtGdiCreateCompatibleBitmap(hDc, cxWidth, cyHeight);
|
||||||
if(!hOffBmp)
|
if(!hOffBmp)
|
||||||
{
|
{
|
||||||
DPRINT1("NtGdiCreateCompatibleBitmap failed!\n");
|
ERR("NtGdiCreateCompatibleBitmap failed!\n");
|
||||||
goto Cleanup ;
|
goto Cleanup ;
|
||||||
}
|
}
|
||||||
hOldOffBmp = NtGdiSelectBitmap(hDestDC, hOffBmp);
|
hOldOffBmp = NtGdiSelectBitmap(hDestDC, hOffBmp);
|
||||||
|
@ -1166,14 +1165,14 @@ UserDrawIconEx(
|
||||||
hMemBmp = BITMAP_CopyBitmap(hbmColor);
|
hMemBmp = BITMAP_CopyBitmap(hbmColor);
|
||||||
if(!hMemBmp)
|
if(!hMemBmp)
|
||||||
{
|
{
|
||||||
DPRINT1("BITMAP_CopyBitmap failed!");
|
ERR("BITMAP_CopyBitmap failed!");
|
||||||
goto CleanupAlpha;
|
goto CleanupAlpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
psurf = SURFACE_ShareLockSurface(hMemBmp);
|
psurf = SURFACE_ShareLockSurface(hMemBmp);
|
||||||
if(!psurf)
|
if(!psurf)
|
||||||
{
|
{
|
||||||
DPRINT1("SURFACE_LockSurface failed!\n");
|
ERR("SURFACE_LockSurface failed!\n");
|
||||||
goto CleanupAlpha;
|
goto CleanupAlpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1318,12 +1317,12 @@ NtUserDrawIconEx(
|
||||||
PCURICON_OBJECT pIcon;
|
PCURICON_OBJECT pIcon;
|
||||||
BOOL Ret;
|
BOOL Ret;
|
||||||
|
|
||||||
DPRINT("Enter NtUserDrawIconEx\n");
|
TRACE("Enter NtUserDrawIconEx\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(pIcon = UserGetCurIconObject(hIcon)))
|
if (!(pIcon = UserGetCurIconObject(hIcon)))
|
||||||
{
|
{
|
||||||
DPRINT1("UserGetCurIconObject() failed!\n");
|
ERR("UserGetCurIconObject() failed!\n");
|
||||||
UserLeave();
|
UserLeave();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserDefwnd);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
// Client Shutdown messages
|
// Client Shutdown messages
|
||||||
#define MCS_SHUTDOWNTIMERS 1
|
#define MCS_SHUTDOWNTIMERS 1
|
||||||
|
@ -114,7 +113,7 @@ DefWndHandleSysCommand(PWND pWnd, WPARAM wParam, LPARAM lParam)
|
||||||
switch (wParam & 0xfff0)
|
switch (wParam & 0xfff0)
|
||||||
{
|
{
|
||||||
case SC_SCREENSAVE:
|
case SC_SCREENSAVE:
|
||||||
DPRINT1("Screensaver Called!\n");
|
ERR("Screensaver Called!\n");
|
||||||
UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_START_SCREENSAVE, 0); // always lParam 0 == not Secure
|
UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_START_SCREENSAVE, 0); // always lParam 0 == not Secure
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -145,7 +144,7 @@ IntDefWindowProc(
|
||||||
{
|
{
|
||||||
case WM_SYSCOMMAND:
|
case WM_SYSCOMMAND:
|
||||||
{
|
{
|
||||||
DPRINT1("hwnd %p WM_SYSCOMMAND %lx %lx\n", Wnd->head.h, wParam, lParam );
|
ERR("hwnd %p WM_SYSCOMMAND %lx %lx\n", Wnd->head.h, wParam, lParam );
|
||||||
lResult = DefWndHandleSysCommand(Wnd, wParam, lParam);
|
lResult = DefWndHandleSysCommand(Wnd, wParam, lParam);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserDesktop);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
static
|
static
|
||||||
VOID
|
VOID
|
||||||
|
@ -157,7 +156,7 @@ IntDesktopObjectDelete(PWIN32_DELETEMETHOD_PARAMETERS Parameters)
|
||||||
{
|
{
|
||||||
PDESKTOP Desktop = (PDESKTOP)Parameters->Object;
|
PDESKTOP Desktop = (PDESKTOP)Parameters->Object;
|
||||||
|
|
||||||
DPRINT("Deleting desktop (0x%X)\n", Desktop);
|
TRACE("Deleting desktop (0x%X)\n", Desktop);
|
||||||
|
|
||||||
/* Remove the desktop from the window station's list of associcated desktops */
|
/* Remove the desktop from the window station's list of associcated desktops */
|
||||||
RemoveEntryList(&Desktop->ListEntry);
|
RemoveEntryList(&Desktop->ListEntry);
|
||||||
|
@ -362,7 +361,7 @@ IntParseDesktopPath(PEPROCESS Process,
|
||||||
if(!NT_SUCCESS(Status))
|
if(!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
DPRINT("Failed to reference window station %wZ PID: %d!\n", &WinSta, PsGetCurrentProcessId());
|
TRACE("Failed to reference window station %wZ PID: %d!\n", &WinSta, PsGetCurrentProcessId());
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -399,7 +398,7 @@ IntParseDesktopPath(PEPROCESS Process,
|
||||||
NtClose(*hWinSta);
|
NtClose(*hWinSta);
|
||||||
*hWinSta = NULL;
|
*hWinSta = NULL;
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
DPRINT("Failed to reference desktop %wZ PID: %d!\n", &Desktop, PsGetCurrentProcessId());
|
TRACE("Failed to reference desktop %wZ PID: %d!\n", &Desktop, PsGetCurrentProcessId());
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -473,13 +472,13 @@ IntGetDesktopObjectHandle(PDESKTOP DesktopObject)
|
||||||
if(!NT_SUCCESS(Status))
|
if(!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* unable to create a handle */
|
/* unable to create a handle */
|
||||||
DPRINT1("Unable to create a desktop handle\n");
|
ERR("Unable to create a desktop handle\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("Got handle: %lx\n", Ret);
|
ERR("Got handle: %lx\n", Ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
|
@ -491,7 +490,7 @@ IntGetFocusMessageQueue(VOID)
|
||||||
PDESKTOP pdo = IntGetActiveDesktop();
|
PDESKTOP pdo = IntGetActiveDesktop();
|
||||||
if (!pdo)
|
if (!pdo)
|
||||||
{
|
{
|
||||||
DPRINT("No active desktop\n");
|
TRACE("No active desktop\n");
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
return (PUSER_MESSAGE_QUEUE)pdo->ActiveMessageQueue;
|
return (PUSER_MESSAGE_QUEUE)pdo->ActiveMessageQueue;
|
||||||
|
@ -504,14 +503,14 @@ IntSetFocusMessageQueue(PUSER_MESSAGE_QUEUE NewQueue)
|
||||||
PDESKTOP pdo = IntGetActiveDesktop();
|
PDESKTOP pdo = IntGetActiveDesktop();
|
||||||
if (!pdo)
|
if (!pdo)
|
||||||
{
|
{
|
||||||
DPRINT("No active desktop\n");
|
TRACE("No active desktop\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(NewQueue != NULL)
|
if(NewQueue != NULL)
|
||||||
{
|
{
|
||||||
if(NewQueue->Desktop != NULL)
|
if(NewQueue->Desktop != NULL)
|
||||||
{
|
{
|
||||||
DPRINT("Message Queue already attached to another desktop!\n");
|
TRACE("Message Queue already attached to another desktop!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
IntReferenceMessageQueue(NewQueue);
|
IntReferenceMessageQueue(NewQueue);
|
||||||
|
@ -530,7 +529,7 @@ HWND FASTCALL IntGetDesktopWindow(VOID)
|
||||||
PDESKTOP pdo = IntGetActiveDesktop();
|
PDESKTOP pdo = IntGetActiveDesktop();
|
||||||
if (!pdo)
|
if (!pdo)
|
||||||
{
|
{
|
||||||
DPRINT("No active desktop\n");
|
TRACE("No active desktop\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return pdo->DesktopWindow;
|
return pdo->DesktopWindow;
|
||||||
|
@ -542,7 +541,7 @@ PWND FASTCALL UserGetDesktopWindow(VOID)
|
||||||
|
|
||||||
if (!pdo)
|
if (!pdo)
|
||||||
{
|
{
|
||||||
DPRINT("No active desktop\n");
|
TRACE("No active desktop\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -555,7 +554,7 @@ HWND FASTCALL IntGetMessageWindow(VOID)
|
||||||
|
|
||||||
if (!pdo)
|
if (!pdo)
|
||||||
{
|
{
|
||||||
DPRINT("No active desktop\n");
|
TRACE("No active desktop\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return pdo->spwndMessage->head.h;
|
return pdo->spwndMessage->head.h;
|
||||||
|
@ -567,7 +566,7 @@ HWND FASTCALL IntGetCurrentThreadDesktopWindow(VOID)
|
||||||
PDESKTOP pdo = pti->rpdesk;
|
PDESKTOP pdo = pti->rpdesk;
|
||||||
if (NULL == pdo)
|
if (NULL == pdo)
|
||||||
{
|
{
|
||||||
DPRINT1("Thread doesn't have a desktop\n");
|
ERR("Thread doesn't have a desktop\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return pdo->DesktopWindow;
|
return pdo->DesktopWindow;
|
||||||
|
@ -592,13 +591,13 @@ BOOL FASTCALL IntDesktopUpdatePerUserSettings(BOOL bEnable)
|
||||||
QueryTable, NULL, NULL);
|
QueryTable, NULL, NULL);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("RtlQueryRegistryValues failed for PaintDesktopVersion (%x)\n",
|
TRACE("RtlQueryRegistryValues failed for PaintDesktopVersion (%x)\n",
|
||||||
Status);
|
Status);
|
||||||
g_PaintDesktopVersion = FALSE;
|
g_PaintDesktopVersion = FALSE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("PaintDesktopVersion = %d\n", g_PaintDesktopVersion);
|
TRACE("PaintDesktopVersion = %d\n", g_PaintDesktopVersion);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -744,14 +743,14 @@ VOID co_IntShellHookNotify(WPARAM Message, LPARAM lParam)
|
||||||
|
|
||||||
gpsi->uiShellMsg = IntAddAtom(L"SHELLHOOK");
|
gpsi->uiShellMsg = IntAddAtom(L"SHELLHOOK");
|
||||||
|
|
||||||
DPRINT("MsgType = %x\n", gpsi->uiShellMsg);
|
TRACE("MsgType = %x\n", gpsi->uiShellMsg);
|
||||||
if (!gpsi->uiShellMsg)
|
if (!gpsi->uiShellMsg)
|
||||||
DPRINT1("LastError: %x\n", EngGetLastError());
|
ERR("LastError: %x\n", EngGetLastError());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Desktop)
|
if (!Desktop)
|
||||||
{
|
{
|
||||||
DPRINT("IntShellHookNotify: No desktop!\n");
|
TRACE("IntShellHookNotify: No desktop!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -762,7 +761,7 @@ VOID co_IntShellHookNotify(WPARAM Message, LPARAM lParam)
|
||||||
|
|
||||||
for (; *cursor; cursor++)
|
for (; *cursor; cursor++)
|
||||||
{
|
{
|
||||||
DPRINT("Sending notify\n");
|
TRACE("Sending notify\n");
|
||||||
co_IntPostOrSendMessage(*cursor,
|
co_IntPostOrSendMessage(*cursor,
|
||||||
gpsi->uiShellMsg,
|
gpsi->uiShellMsg,
|
||||||
Message,
|
Message,
|
||||||
|
@ -788,7 +787,7 @@ BOOL IntRegisterShellHookWindow(HWND hWnd)
|
||||||
PDESKTOP Desktop = pti->rpdesk;
|
PDESKTOP Desktop = pti->rpdesk;
|
||||||
PSHELL_HOOK_WINDOW Entry;
|
PSHELL_HOOK_WINDOW Entry;
|
||||||
|
|
||||||
DPRINT("IntRegisterShellHookWindow\n");
|
TRACE("IntRegisterShellHookWindow\n");
|
||||||
|
|
||||||
/* First deregister the window, so we can be sure it's never twice in the
|
/* First deregister the window, so we can be sure it's never twice in the
|
||||||
* list.
|
* list.
|
||||||
|
@ -903,7 +902,7 @@ NtUserCreateDesktop(
|
||||||
PTHREADINFO ptiCurrent;
|
PTHREADINFO ptiCurrent;
|
||||||
DECLARE_RETURN(HDESK);
|
DECLARE_RETURN(HDESK);
|
||||||
|
|
||||||
DPRINT("Enter NtUserCreateDesktop\n");
|
TRACE("Enter NtUserCreateDesktop\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
ptiCurrent = PsGetCurrentThreadWin32Thread();
|
ptiCurrent = PsGetCurrentThreadWin32Thread();
|
||||||
|
@ -919,7 +918,7 @@ NtUserCreateDesktop(
|
||||||
* Try to open already existing desktop
|
* Try to open already existing desktop
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DPRINT("Trying to open desktop (%wZ)\n", &DesktopName);
|
TRACE("Trying to open desktop (%wZ)\n", &DesktopName);
|
||||||
|
|
||||||
Status = ObOpenObjectByName(
|
Status = ObOpenObjectByName(
|
||||||
ObjectAttributes,
|
ObjectAttributes,
|
||||||
|
@ -950,7 +949,7 @@ NtUserCreateDesktop(
|
||||||
|
|
||||||
if (! NT_SUCCESS(Status))
|
if (! NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed reading Object Attributes from user space.\n");
|
ERR("Failed reading Object Attributes from user space.\n");
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
RETURN( NULL);
|
RETURN( NULL);
|
||||||
}
|
}
|
||||||
|
@ -971,7 +970,7 @@ NtUserCreateDesktop(
|
||||||
if (DesktopObject->pheapDesktop == NULL)
|
if (DesktopObject->pheapDesktop == NULL)
|
||||||
{
|
{
|
||||||
ObDereferenceObject(DesktopObject);
|
ObDereferenceObject(DesktopObject);
|
||||||
DPRINT1("Failed to create desktop heap!\n");
|
ERR("Failed to create desktop heap!\n");
|
||||||
RETURN(NULL);
|
RETURN(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -984,7 +983,7 @@ NtUserCreateDesktop(
|
||||||
if (DesktopObject->pDeskInfo == NULL)
|
if (DesktopObject->pDeskInfo == NULL)
|
||||||
{
|
{
|
||||||
ObDereferenceObject(DesktopObject);
|
ObDereferenceObject(DesktopObject);
|
||||||
DPRINT1("Failed to create the DESKTOP structure!\n");
|
ERR("Failed to create the DESKTOP structure!\n");
|
||||||
RETURN(NULL);
|
RETURN(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1010,7 +1009,7 @@ NtUserCreateDesktop(
|
||||||
#if 0
|
#if 0
|
||||||
if (! NT_SUCCESS(Status))
|
if (! NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to create desktop handle\n");
|
ERR("Failed to create desktop handle\n");
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
RETURN( NULL);
|
RETURN( NULL);
|
||||||
}
|
}
|
||||||
|
@ -1031,7 +1030,7 @@ NtUserCreateDesktop(
|
||||||
(HANDLE*)&Request.Data.CreateDesktopRequest.DesktopHandle);
|
(HANDLE*)&Request.Data.CreateDesktopRequest.DesktopHandle);
|
||||||
if (! NT_SUCCESS(Status))
|
if (! NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to create desktop handle for CSRSS\n");
|
ERR("Failed to create desktop handle for CSRSS\n");
|
||||||
ZwClose(Desktop);
|
ZwClose(Desktop);
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
RETURN( NULL);
|
RETURN( NULL);
|
||||||
|
@ -1041,7 +1040,7 @@ NtUserCreateDesktop(
|
||||||
if (! NT_SUCCESS(Status))
|
if (! NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
CsrCloseHandle(Request.Data.CreateDesktopRequest.DesktopHandle);
|
CsrCloseHandle(Request.Data.CreateDesktopRequest.DesktopHandle);
|
||||||
DPRINT1("Failed to notify CSRSS about new desktop\n");
|
ERR("Failed to notify CSRSS about new desktop\n");
|
||||||
ZwClose(Desktop);
|
ZwClose(Desktop);
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
RETURN( NULL);
|
RETURN( NULL);
|
||||||
|
@ -1067,7 +1066,7 @@ NtUserCreateDesktop(
|
||||||
pWndDesktop = co_UserCreateWindowEx(&Cs, &ClassName, &WindowName);
|
pWndDesktop = co_UserCreateWindowEx(&Cs, &ClassName, &WindowName);
|
||||||
if (!pWnd)
|
if (!pWnd)
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to create Desktop window handle\n");
|
ERR("Failed to create Desktop window handle\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1095,7 +1094,7 @@ NtUserCreateDesktop(
|
||||||
pWnd = co_UserCreateWindowEx(&Cs, &ClassName, &WindowName);
|
pWnd = co_UserCreateWindowEx(&Cs, &ClassName, &WindowName);
|
||||||
if (!pWnd)
|
if (!pWnd)
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to create Message window handle\n");
|
ERR("Failed to create Message window handle\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1118,7 +1117,7 @@ CLEANUP:
|
||||||
ExFreePoolWithTag(DesktopName.Buffer, TAG_STRING);
|
ExFreePoolWithTag(DesktopName.Buffer, TAG_STRING);
|
||||||
}
|
}
|
||||||
if (!NoHooks && ptiCurrent) ptiCurrent->TIF_flags &= ~TIF_DISABLEHOOKS;
|
if (!NoHooks && ptiCurrent) ptiCurrent->TIF_flags &= ~TIF_DISABLEHOOKS;
|
||||||
DPRINT("Leave NtUserCreateDesktop, ret=%i\n",_ret_);
|
TRACE("Leave NtUserCreateDesktop, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1205,10 +1204,10 @@ NtUserOpenInputDesktop(
|
||||||
HDESK Desktop;
|
HDESK Desktop;
|
||||||
DECLARE_RETURN(HDESK);
|
DECLARE_RETURN(HDESK);
|
||||||
|
|
||||||
DPRINT("Enter NtUserOpenInputDesktop\n");
|
TRACE("Enter NtUserOpenInputDesktop\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
DPRINT("About to open input desktop\n");
|
TRACE("About to open input desktop\n");
|
||||||
|
|
||||||
/* Get a pointer to the desktop object */
|
/* Get a pointer to the desktop object */
|
||||||
|
|
||||||
|
@ -1220,7 +1219,7 @@ NtUserOpenInputDesktop(
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Validation of input desktop handle (0x%X) failed\n", InputDesktop);
|
TRACE("Validation of input desktop handle (0x%X) failed\n", InputDesktop);
|
||||||
RETURN((HDESK)0);
|
RETURN((HDESK)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1239,7 +1238,7 @@ NtUserOpenInputDesktop(
|
||||||
|
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Successfully opened input desktop\n");
|
TRACE("Successfully opened input desktop\n");
|
||||||
RETURN((HDESK)Desktop);
|
RETURN((HDESK)Desktop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1247,7 +1246,7 @@ NtUserOpenInputDesktop(
|
||||||
RETURN((HDESK)0);
|
RETURN((HDESK)0);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserOpenInputDesktop, ret=%i\n",_ret_);
|
TRACE("Leave NtUserOpenInputDesktop, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1281,10 +1280,10 @@ NtUserCloseDesktop(HDESK hDesktop)
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserCloseDesktop\n");
|
TRACE("Enter NtUserCloseDesktop\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
DPRINT("About to close desktop handle (0x%X)\n", hDesktop);
|
TRACE("About to close desktop handle (0x%X)\n", hDesktop);
|
||||||
|
|
||||||
Status = IntValidateDesktopHandle(
|
Status = IntValidateDesktopHandle(
|
||||||
hDesktop,
|
hDesktop,
|
||||||
|
@ -1294,13 +1293,13 @@ NtUserCloseDesktop(HDESK hDesktop)
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Validation of desktop handle (0x%X) failed\n", hDesktop);
|
TRACE("Validation of desktop handle (0x%X) failed\n", hDesktop);
|
||||||
RETURN(FALSE);
|
RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ObDereferenceObject(Object);
|
ObDereferenceObject(Object);
|
||||||
|
|
||||||
DPRINT("Closing desktop handle (0x%X)\n", hDesktop);
|
TRACE("Closing desktop handle (0x%X)\n", hDesktop);
|
||||||
|
|
||||||
Status = ZwClose(hDesktop);
|
Status = ZwClose(hDesktop);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
@ -1312,7 +1311,7 @@ NtUserCloseDesktop(HDESK hDesktop)
|
||||||
RETURN(TRUE);
|
RETURN(TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserCloseDesktop, ret=%i\n",_ret_);
|
TRACE("Leave NtUserCloseDesktop, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1353,7 +1352,7 @@ NtUserPaintDesktop(HDC hDC)
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
DPRINT("Enter NtUserPaintDesktop\n");
|
TRACE("Enter NtUserPaintDesktop\n");
|
||||||
|
|
||||||
GdiGetClipBox(hDC, &Rect);
|
GdiGetClipBox(hDC, &Rect);
|
||||||
|
|
||||||
|
@ -1549,7 +1548,7 @@ NtUserPaintDesktop(HDC hDC)
|
||||||
RETURN(TRUE);
|
RETURN(TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserPaintDesktop, ret=%i\n",_ret_);
|
TRACE("Leave NtUserPaintDesktop, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1579,9 +1578,9 @@ NtUserSwitchDesktop(HDESK hDesktop)
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
DPRINT("Enter NtUserSwitchDesktop\n");
|
TRACE("Enter NtUserSwitchDesktop\n");
|
||||||
|
|
||||||
DPRINT("About to switch desktop (0x%X)\n", hDesktop);
|
TRACE("About to switch desktop (0x%X)\n", hDesktop);
|
||||||
|
|
||||||
Status = IntValidateDesktopHandle(
|
Status = IntValidateDesktopHandle(
|
||||||
hDesktop,
|
hDesktop,
|
||||||
|
@ -1591,7 +1590,7 @@ NtUserSwitchDesktop(HDESK hDesktop)
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Validation of desktop handle (0x%X) failed\n", hDesktop);
|
TRACE("Validation of desktop handle (0x%X) failed\n", hDesktop);
|
||||||
RETURN(FALSE);
|
RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1603,14 +1602,14 @@ NtUserSwitchDesktop(HDESK hDesktop)
|
||||||
LogonProcess != NULL && LogonProcess != PsGetCurrentProcessWin32Process())
|
LogonProcess != NULL && LogonProcess != PsGetCurrentProcessWin32Process())
|
||||||
{
|
{
|
||||||
ObDereferenceObject(DesktopObject);
|
ObDereferenceObject(DesktopObject);
|
||||||
DPRINT1("Switching desktop 0x%x denied because the work station is locked!\n", hDesktop);
|
ERR("Switching desktop 0x%x denied because the work station is locked!\n", hDesktop);
|
||||||
RETURN(FALSE);
|
RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(DesktopObject->rpwinstaParent != InputWindowStation)
|
if(DesktopObject->rpwinstaParent != InputWindowStation)
|
||||||
{
|
{
|
||||||
ObDereferenceObject(DesktopObject);
|
ObDereferenceObject(DesktopObject);
|
||||||
DPRINT1("Switching desktop 0x%x denied because desktop doesn't belong to the interactive winsta!\n", hDesktop);
|
ERR("Switching desktop 0x%x denied because desktop doesn't belong to the interactive winsta!\n", hDesktop);
|
||||||
RETURN(FALSE);
|
RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1630,7 +1629,7 @@ NtUserSwitchDesktop(HDESK hDesktop)
|
||||||
RETURN(TRUE);
|
RETURN(TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSwitchDesktop, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSwitchDesktop, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1653,7 +1652,7 @@ NtUserGetThreadDesktop(DWORD dwThreadId, DWORD Unknown1)
|
||||||
DECLARE_RETURN(HDESK);
|
DECLARE_RETURN(HDESK);
|
||||||
|
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
DPRINT("Enter NtUserGetThreadDesktop\n");
|
TRACE("Enter NtUserGetThreadDesktop\n");
|
||||||
|
|
||||||
if(!dwThreadId)
|
if(!dwThreadId)
|
||||||
{
|
{
|
||||||
|
@ -1682,7 +1681,7 @@ NtUserGetThreadDesktop(DWORD dwThreadId, DWORD Unknown1)
|
||||||
!(DesktopObject = ((PTHREADINFO)Thread->Tcb.Win32Thread)->rpdesk))
|
!(DesktopObject = ((PTHREADINFO)Thread->Tcb.Win32Thread)->rpdesk))
|
||||||
{
|
{
|
||||||
ObDereferenceObject(Thread);
|
ObDereferenceObject(Thread);
|
||||||
DPRINT1("Desktop information of thread 0x%x broken!?\n", dwThreadId);
|
ERR("Desktop information of thread 0x%x broken!?\n", dwThreadId);
|
||||||
RETURN(NULL);
|
RETURN(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1716,7 +1715,7 @@ NtUserGetThreadDesktop(DWORD dwThreadId, DWORD Unknown1)
|
||||||
RETURN(Ret);
|
RETURN(Ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetThreadDesktop, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetThreadDesktop, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1729,7 +1728,7 @@ IntUnmapDesktopView(IN PDESKTOP DesktopObject)
|
||||||
PW32HEAP_USER_MAPPING HeapMapping, *PrevLink;
|
PW32HEAP_USER_MAPPING HeapMapping, *PrevLink;
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
DPRINT("DO %p\n");
|
TRACE("DO %p\n");
|
||||||
|
|
||||||
CurrentWin32Process = PsGetCurrentProcessWin32Process();
|
CurrentWin32Process = PsGetCurrentProcessWin32Process();
|
||||||
PrevLink = &CurrentWin32Process->HeapMappings.Next;
|
PrevLink = &CurrentWin32Process->HeapMappings.Next;
|
||||||
|
@ -1796,7 +1795,7 @@ IntMapDesktopView(IN PDESKTOP DesktopObject)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we're the first, map the heap */
|
/* we're the first, map the heap */
|
||||||
DPRINT("Noone mapped the desktop heap %p yet, so - map it!\n", DesktopObject->pheapDesktop);
|
TRACE("Noone mapped the desktop heap %p yet, so - map it!\n", DesktopObject->pheapDesktop);
|
||||||
Offset.QuadPart = 0;
|
Offset.QuadPart = 0;
|
||||||
Status = MmMapViewOfSection(DesktopObject->hsectionDesktop,
|
Status = MmMapViewOfSection(DesktopObject->hsectionDesktop,
|
||||||
PsGetCurrentProcess(),
|
PsGetCurrentProcess(),
|
||||||
|
@ -1810,7 +1809,7 @@ IntMapDesktopView(IN PDESKTOP DesktopObject)
|
||||||
PAGE_EXECUTE_READ); /* would prefer PAGE_READONLY, but thanks to RTL heaps... */
|
PAGE_EXECUTE_READ); /* would prefer PAGE_READONLY, but thanks to RTL heaps... */
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to map desktop\n");
|
ERR("Failed to map desktop\n");
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1820,7 +1819,7 @@ IntMapDesktopView(IN PDESKTOP DesktopObject)
|
||||||
{
|
{
|
||||||
MmUnmapViewOfSection(PsGetCurrentProcess(),
|
MmUnmapViewOfSection(PsGetCurrentProcess(),
|
||||||
UserBase);
|
UserBase);
|
||||||
DPRINT1("UserHeapAlloc() failed!\n");
|
ERR("UserHeapAlloc() failed!\n");
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1847,7 +1846,7 @@ IntSetThreadDesktop(IN HDESK hDesktop,
|
||||||
BOOL MapHeap;
|
BOOL MapHeap;
|
||||||
CLIENTTHREADINFO ctiSave;
|
CLIENTTHREADINFO ctiSave;
|
||||||
|
|
||||||
DPRINT("IntSetThreadDesktop() , FOF=%d\n", FreeOnFailure);
|
TRACE("IntSetThreadDesktop() , FOF=%d\n", FreeOnFailure);
|
||||||
MapHeap = (PsGetCurrentProcess() != PsInitialSystemProcess);
|
MapHeap = (PsGetCurrentProcess() != PsInitialSystemProcess);
|
||||||
W32Thread = PsGetCurrentThreadWin32Thread();
|
W32Thread = PsGetCurrentThreadWin32Thread();
|
||||||
|
|
||||||
|
@ -1862,7 +1861,7 @@ IntSetThreadDesktop(IN HDESK hDesktop,
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Validation of desktop handle (0x%X) failed\n", hDesktop);
|
ERR("Validation of desktop handle (0x%X) failed\n", hDesktop);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1877,7 +1876,7 @@ IntSetThreadDesktop(IN HDESK hDesktop,
|
||||||
|
|
||||||
if (!IsListEmpty(&W32Thread->WindowListHead))
|
if (!IsListEmpty(&W32Thread->WindowListHead))
|
||||||
{
|
{
|
||||||
DPRINT1("Attempted to change thread desktop although the thread has windows!\n");
|
ERR("Attempted to change thread desktop although the thread has windows!\n");
|
||||||
EngSetLastError(ERROR_BUSY);
|
EngSetLastError(ERROR_BUSY);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1904,14 +1903,14 @@ IntSetThreadDesktop(IN HDESK hDesktop,
|
||||||
if (W32Thread->pcti && OldDesktop && NtCurrentTeb())
|
if (W32Thread->pcti && OldDesktop && NtCurrentTeb())
|
||||||
{
|
{
|
||||||
RtlCopyMemory(&ctiSave, W32Thread->pcti, sizeof(CLIENTTHREADINFO));
|
RtlCopyMemory(&ctiSave, W32Thread->pcti, sizeof(CLIENTTHREADINFO));
|
||||||
DPRINT("Free ClientThreadInfo\n");
|
TRACE("Free ClientThreadInfo\n");
|
||||||
DesktopHeapFree(OldDesktop, W32Thread->pcti);
|
DesktopHeapFree(OldDesktop, W32Thread->pcti);
|
||||||
W32Thread->pcti = NULL;
|
W32Thread->pcti = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!W32Thread->pcti && DesktopObject && NtCurrentTeb())
|
if (!W32Thread->pcti && DesktopObject && NtCurrentTeb())
|
||||||
{
|
{
|
||||||
DPRINT("Allocate ClientThreadInfo\n");
|
TRACE("Allocate ClientThreadInfo\n");
|
||||||
W32Thread->pcti = DesktopHeapAlloc( DesktopObject,
|
W32Thread->pcti = DesktopHeapAlloc( DesktopObject,
|
||||||
sizeof(CLIENTTHREADINFO));
|
sizeof(CLIENTTHREADINFO));
|
||||||
RtlCopyMemory(W32Thread->pcti, &ctiSave, sizeof(CLIENTTHREADINFO));
|
RtlCopyMemory(W32Thread->pcti, &ctiSave, sizeof(CLIENTTHREADINFO));
|
||||||
|
@ -1932,7 +1931,7 @@ IntSetThreadDesktop(IN HDESK hDesktop,
|
||||||
!IntCheckProcessDesktopClasses(OldDesktop,
|
!IntCheckProcessDesktopClasses(OldDesktop,
|
||||||
FreeOnFailure))
|
FreeOnFailure))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to move process classes to shared heap!\n");
|
ERR("Failed to move process classes to shared heap!\n");
|
||||||
|
|
||||||
/* failed to move desktop classes to the shared heap,
|
/* failed to move desktop classes to the shared heap,
|
||||||
unmap the view and return the error */
|
unmap the view and return the error */
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
|
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserDisplay);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
BOOL InitSysParams();
|
BOOL InitSysParams();
|
||||||
|
|
||||||
|
@ -81,14 +80,14 @@ InitDisplayDriver(
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
DEVMODEW dmDefault;
|
DEVMODEW dmDefault;
|
||||||
|
|
||||||
DPRINT1("InitDisplayDriver(%S, %S);\n",
|
ERR("InitDisplayDriver(%S, %S);\n",
|
||||||
pwszDeviceName, pwszRegKey);
|
pwszDeviceName, pwszRegKey);
|
||||||
|
|
||||||
/* Open the driver's registry key */
|
/* Open the driver's registry key */
|
||||||
Status = RegOpenKey(pwszRegKey, &hkey);
|
Status = RegOpenKey(pwszRegKey, &hkey);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to open registry key: %ls\n", pwszRegKey);
|
ERR("Failed to open registry key: %ls\n", pwszRegKey);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +100,7 @@ InitDisplayDriver(
|
||||||
&cbSize);
|
&cbSize);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Didn't find 'InstalledDisplayDrivers', status = 0x%lx\n", Status);
|
ERR("Didn't find 'InstalledDisplayDrivers', status = 0x%lx\n", Status);
|
||||||
ZwClose(hkey);
|
ZwClose(hkey);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -159,7 +158,7 @@ InitVideo()
|
||||||
ULONG cbValue;
|
ULONG cbValue;
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
|
|
||||||
DPRINT("----------------------------- InitVideo() -------------------------------\n");
|
TRACE("----------------------------- InitVideo() -------------------------------\n");
|
||||||
|
|
||||||
/* Open the key for the boot command line */
|
/* Open the key for the boot command line */
|
||||||
Status = RegOpenKey(L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Control", &hkey);
|
Status = RegOpenKey(L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Control", &hkey);
|
||||||
|
@ -172,7 +171,7 @@ InitVideo()
|
||||||
/* Check if VGA mode is requested. */
|
/* Check if VGA mode is requested. */
|
||||||
if (wcsstr(awcBuffer, L"/BASEVIDEO") != 0)
|
if (wcsstr(awcBuffer, L"/BASEVIDEO") != 0)
|
||||||
{
|
{
|
||||||
DPRINT1("VGA mode requested.\n");
|
ERR("VGA mode requested.\n");
|
||||||
gbBaseVideo = TRUE;
|
gbBaseVideo = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -184,7 +183,7 @@ InitVideo()
|
||||||
Status = RegOpenKey(KEY_VIDEO, &hkey);
|
Status = RegOpenKey(KEY_VIDEO, &hkey);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Could not open device registry key!\n");
|
ERR("Could not open device registry key!\n");
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,16 +193,16 @@ InitVideo()
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
iVGACompatible = _wtoi(&awcDeviceName[13]);
|
iVGACompatible = _wtoi(&awcDeviceName[13]);
|
||||||
DPRINT1("VGA adapter = %ld\n", iVGACompatible);
|
ERR("VGA adapter = %ld\n", iVGACompatible);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the maximum mumber of adapters */
|
/* Get the maximum mumber of adapters */
|
||||||
if (!RegReadDWORD(hkey, L"MaxObjectNumber", &ulMaxObjectNumber))
|
if (!RegReadDWORD(hkey, L"MaxObjectNumber", &ulMaxObjectNumber))
|
||||||
{
|
{
|
||||||
DPRINT1("Could not read MaxObjectNumber, defaulting to 0.\n");
|
ERR("Could not read MaxObjectNumber, defaulting to 0.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Found %ld devices\n", ulMaxObjectNumber);
|
TRACE("Found %ld devices\n", ulMaxObjectNumber);
|
||||||
|
|
||||||
/* Loop through all adapters */
|
/* Loop through all adapters */
|
||||||
for (iDevNum = 0; iDevNum <= ulMaxObjectNumber; iDevNum++)
|
for (iDevNum = 0; iDevNum <= ulMaxObjectNumber; iDevNum++)
|
||||||
|
@ -216,7 +215,7 @@ InitVideo()
|
||||||
Status = RegQueryValue(hkey, awcDeviceName, REG_SZ, awcBuffer, &cbValue);
|
Status = RegQueryValue(hkey, awcDeviceName, REG_SZ, awcBuffer, &cbValue);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("failed to query the registry path:0x%lx\n", Status);
|
ERR("failed to query the registry path:0x%lx\n", Status);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +228,7 @@ InitVideo()
|
||||||
{
|
{
|
||||||
/* Set the VGA device as primary */
|
/* Set the VGA device as primary */
|
||||||
gpVgaGraphicsDevice = pGraphicsDevice;
|
gpVgaGraphicsDevice = pGraphicsDevice;
|
||||||
DPRINT1("gpVgaGraphicsDevice = %p\n", gpVgaGraphicsDevice);
|
ERR("gpVgaGraphicsDevice = %p\n", gpVgaGraphicsDevice);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the first one as primary device */
|
/* Set the first one as primary device */
|
||||||
|
@ -243,7 +242,7 @@ InitVideo()
|
||||||
/* Check if we had any success */
|
/* Check if we had any success */
|
||||||
if (!gpPrimaryGraphicsDevice)
|
if (!gpPrimaryGraphicsDevice)
|
||||||
{
|
{
|
||||||
DPRINT1("No usable display driver was found.\n");
|
ERR("No usable display driver was found.\n");
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,7 +256,7 @@ InitVideo()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("Could not find VGA compatible driver. Trying normal.\n");
|
ERR("Could not find VGA compatible driver. Trying normal.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -284,7 +283,7 @@ UserEnumDisplayDevices(
|
||||||
if (!pGraphicsDevice)
|
if (!pGraphicsDevice)
|
||||||
{
|
{
|
||||||
/* No device found */
|
/* No device found */
|
||||||
DPRINT1("No GRAPHICS_DEVICE found\n");
|
ERR("No GRAPHICS_DEVICE found\n");
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,7 +292,7 @@ UserEnumDisplayDevices(
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* No device found */
|
/* No device found */
|
||||||
DPRINT1("Could not open reg key\n");
|
ERR("Could not open reg key\n");
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,7 +331,7 @@ NtUserEnumDisplayDevices(
|
||||||
DISPLAY_DEVICEW dispdev;
|
DISPLAY_DEVICEW dispdev;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
DPRINT("Enter NtUserEnumDisplayDevices(%wZ, %ld)\n",
|
TRACE("Enter NtUserEnumDisplayDevices(%wZ, %ld)\n",
|
||||||
pustrDevice, iDevNum);
|
pustrDevice, iDevNum);
|
||||||
|
|
||||||
// FIXME: HACK, desk.cpl passes broken crap
|
// FIXME: HACK, desk.cpl passes broken crap
|
||||||
|
@ -404,7 +403,7 @@ NtUserEnumDisplayDevices(
|
||||||
_SEH2_END
|
_SEH2_END
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT1("Leave NtUserEnumDisplayDevices, Status = 0x%lx\n", Status);
|
ERR("Leave NtUserEnumDisplayDevices, Status = 0x%lx\n", Status);
|
||||||
/* Return the result */
|
/* Return the result */
|
||||||
// return Status;
|
// return Status;
|
||||||
return NT_SUCCESS(Status); // FIXME
|
return NT_SUCCESS(Status); // FIXME
|
||||||
|
@ -423,7 +422,7 @@ UserEnumCurrentDisplaySettings(
|
||||||
if (!ppdev)
|
if (!ppdev)
|
||||||
{
|
{
|
||||||
/* No device found */
|
/* No device found */
|
||||||
DPRINT1("No PDEV found!\n");
|
ERR("No PDEV found!\n");
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -445,7 +444,7 @@ UserEnumDisplaySettings(
|
||||||
PDEVMODEENTRY pdmentry;
|
PDEVMODEENTRY pdmentry;
|
||||||
ULONG i, iFoundMode;
|
ULONG i, iFoundMode;
|
||||||
|
|
||||||
DPRINT("Enter UserEnumDisplaySettings('%ls', %ld)\n",
|
TRACE("Enter UserEnumDisplaySettings('%ls', %ld)\n",
|
||||||
pustrDevice ? pustrDevice->Buffer : NULL, iModeNum);
|
pustrDevice ? pustrDevice->Buffer : NULL, iModeNum);
|
||||||
|
|
||||||
/* Ask gdi for the GRAPHICS_DEVICE */
|
/* Ask gdi for the GRAPHICS_DEVICE */
|
||||||
|
@ -454,7 +453,7 @@ UserEnumDisplaySettings(
|
||||||
if (!pGraphicsDevice)
|
if (!pGraphicsDevice)
|
||||||
{
|
{
|
||||||
/* No device found */
|
/* No device found */
|
||||||
DPRINT1("No device found!\n");
|
ERR("No device found!\n");
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -551,7 +550,7 @@ NtUserEnumDisplaySettings(
|
||||||
ULONG cbSize, cbExtra;
|
ULONG cbSize, cbExtra;
|
||||||
DEVMODEW dmReg, *pdm;
|
DEVMODEW dmReg, *pdm;
|
||||||
|
|
||||||
DPRINT("Enter NtUserEnumDisplaySettings(%ls, %ld)\n",
|
TRACE("Enter NtUserEnumDisplaySettings(%ls, %ld)\n",
|
||||||
pustrDevice ? pustrDevice->Buffer : 0, iModeNum);
|
pustrDevice ? pustrDevice->Buffer : 0, iModeNum);
|
||||||
|
|
||||||
if (pustrDevice)
|
if (pustrDevice)
|
||||||
|
@ -658,7 +657,7 @@ UserChangeDisplaySettings(
|
||||||
Status = UserEnumRegistryDisplaySettings(pustrDevice, &dm);
|
Status = UserEnumRegistryDisplaySettings(pustrDevice, &dm);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Could not load registry settings\n");
|
ERR("Could not load registry settings\n");
|
||||||
return DISP_CHANGE_BADPARAM;
|
return DISP_CHANGE_BADPARAM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -670,7 +669,7 @@ UserChangeDisplaySettings(
|
||||||
/* Check params */
|
/* Check params */
|
||||||
if ((dm.dmFields & (DM_PELSWIDTH | DM_PELSHEIGHT)) != (DM_PELSWIDTH | DM_PELSHEIGHT))
|
if ((dm.dmFields & (DM_PELSWIDTH | DM_PELSHEIGHT)) != (DM_PELSWIDTH | DM_PELSHEIGHT))
|
||||||
{
|
{
|
||||||
DPRINT1("devmode doesn't specify the resolution.\n");
|
ERR("devmode doesn't specify the resolution.\n");
|
||||||
return DISP_CHANGE_BADMODE;
|
return DISP_CHANGE_BADMODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -678,7 +677,7 @@ UserChangeDisplaySettings(
|
||||||
ppdev = EngpGetPDEV(pustrDevice);
|
ppdev = EngpGetPDEV(pustrDevice);
|
||||||
if (!ppdev)
|
if (!ppdev)
|
||||||
{
|
{
|
||||||
DPRINT1("failed to get PDEV\n");
|
ERR("failed to get PDEV\n");
|
||||||
return DISP_CHANGE_BADPARAM;
|
return DISP_CHANGE_BADPARAM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -696,7 +695,7 @@ UserChangeDisplaySettings(
|
||||||
pdm = PDEVOBJ_pdmMatchDevMode(ppdev, &dm);
|
pdm = PDEVOBJ_pdmMatchDevMode(ppdev, &dm);
|
||||||
if (!pdm)
|
if (!pdm)
|
||||||
{
|
{
|
||||||
DPRINT1("Could not find a matching DEVMODE\n");
|
ERR("Could not find a matching DEVMODE\n");
|
||||||
lResult = DISP_CHANGE_BADMODE;
|
lResult = DISP_CHANGE_BADMODE;
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
@ -722,7 +721,7 @@ UserChangeDisplaySettings(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("Could not open registry key\n");
|
ERR("Could not open registry key\n");
|
||||||
lResult = DISP_CHANGE_NOTUPDATED;
|
lResult = DISP_CHANGE_NOTUPDATED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -730,7 +729,7 @@ UserChangeDisplaySettings(
|
||||||
/* Check if DEVMODE matches the current mode */
|
/* Check if DEVMODE matches the current mode */
|
||||||
if (pdm == ppdev->pdmwDev && !(flags & CDS_RESET))
|
if (pdm == ppdev->pdmwDev && !(flags & CDS_RESET))
|
||||||
{
|
{
|
||||||
DPRINT1("DEVMODE matches, nothing to do\n");
|
ERR("DEVMODE matches, nothing to do\n");
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -752,7 +751,7 @@ UserChangeDisplaySettings(
|
||||||
/* Check for failure */
|
/* Check for failure */
|
||||||
if (!ulResult)
|
if (!ulResult)
|
||||||
{
|
{
|
||||||
DPRINT1("failed to set mode\n");
|
ERR("failed to set mode\n");
|
||||||
lResult = (lResult == DISP_CHANGE_NOTUPDATED) ?
|
lResult = (lResult == DISP_CHANGE_NOTUPDATED) ?
|
||||||
DISP_CHANGE_FAILED : DISP_CHANGE_RESTART;
|
DISP_CHANGE_FAILED : DISP_CHANGE_RESTART;
|
||||||
|
|
||||||
|
@ -875,7 +874,7 @@ NtUserChangeDisplaySettings(
|
||||||
if (dmLocal.dmDriverExtra > 0)
|
if (dmLocal.dmDriverExtra > 0)
|
||||||
{
|
{
|
||||||
/* FIXME: TODO */
|
/* FIXME: TODO */
|
||||||
DPRINT1("lpDevMode->dmDriverExtra is IGNORED!\n");
|
ERR("lpDevMode->dmDriverExtra is IGNORED!\n");
|
||||||
dmLocal.dmDriverExtra = 0;
|
dmLocal.dmDriverExtra = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserEvent);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
typedef struct _EVENTPACK
|
typedef struct _EVENTPACK
|
||||||
{
|
{
|
||||||
|
@ -62,7 +61,7 @@ FASTCALL
|
||||||
IntSetSrvEventMask( UINT EventMin, UINT EventMax)
|
IntSetSrvEventMask( UINT EventMin, UINT EventMax)
|
||||||
{
|
{
|
||||||
UINT event;
|
UINT event;
|
||||||
DPRINT("SetSrvEventMask 1\n");
|
TRACE("SetSrvEventMask 1\n");
|
||||||
for ( event = EventMin; event <= EventMax; event++)
|
for ( event = EventMin; event <= EventMax; event++)
|
||||||
{
|
{
|
||||||
if ((event >= EVENT_SYSTEM_SOUND && event <= EVENT_SYSTEM_MINIMIZEEND) ||
|
if ((event >= EVENT_SYSTEM_SOUND && event <= EVENT_SYSTEM_MINIMIZEEND) ||
|
||||||
|
@ -90,7 +89,7 @@ IntSetSrvEventMask( UINT EventMin, UINT EventMax)
|
||||||
}
|
}
|
||||||
if (!gpsi->dwInstalledEventHooks)
|
if (!gpsi->dwInstalledEventHooks)
|
||||||
gpsi->dwInstalledEventHooks |= SRV_EVENT_RUNNING; // Set something.
|
gpsi->dwInstalledEventHooks |= SRV_EVENT_RUNNING; // Set something.
|
||||||
DPRINT("SetSrvEventMask 2 : %x\n", gpsi->dwInstalledEventHooks);
|
TRACE("SetSrvEventMask 2 : %x\n", gpsi->dwInstalledEventHooks);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
|
@ -138,7 +137,7 @@ IntRemoveEvent(PEVENTHOOK pEH)
|
||||||
{
|
{
|
||||||
if (pEH)
|
if (pEH)
|
||||||
{
|
{
|
||||||
DPRINT("IntRemoveEvent pEH 0x%x\n",pEH);
|
TRACE("IntRemoveEvent pEH 0x%x\n",pEH);
|
||||||
KeEnterCriticalRegion();
|
KeEnterCriticalRegion();
|
||||||
RemoveEntryList(&pEH->Chain);
|
RemoveEntryList(&pEH->Chain);
|
||||||
GlobalEvents->Counts--;
|
GlobalEvents->Counts--;
|
||||||
|
@ -226,7 +225,7 @@ IntNotifyWinEvent(
|
||||||
PLIST_ENTRY pLE;
|
PLIST_ENTRY pLE;
|
||||||
PTHREADINFO pti, ptiCurrent;
|
PTHREADINFO pti, ptiCurrent;
|
||||||
|
|
||||||
DPRINT("IntNotifyWinEvent GlobalEvents = 0x%x pWnd 0x%x\n",GlobalEvents, pWnd);
|
TRACE("IntNotifyWinEvent GlobalEvents = 0x%x pWnd 0x%x\n",GlobalEvents, pWnd);
|
||||||
|
|
||||||
if (!GlobalEvents || !GlobalEvents->Counts) return;
|
if (!GlobalEvents || !GlobalEvents->Counts) return;
|
||||||
|
|
||||||
|
@ -259,7 +258,7 @@ IntNotifyWinEvent(
|
||||||
// Send message to the thread if pEH is not current.
|
// Send message to the thread if pEH is not current.
|
||||||
if (pEH->head.pti != ptiCurrent)
|
if (pEH->head.pti != ptiCurrent)
|
||||||
{
|
{
|
||||||
DPRINT1("Global Event 0x%x, idObject %d\n", Event, idObject);
|
ERR("Global Event 0x%x, idObject %d\n", Event, idObject);
|
||||||
IntCallLowLevelEvent( pEH,
|
IntCallLowLevelEvent( pEH,
|
||||||
Event,
|
Event,
|
||||||
UserHMGetHandle(pWnd),
|
UserHMGetHandle(pWnd),
|
||||||
|
@ -268,7 +267,7 @@ IntNotifyWinEvent(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("Local Event 0x%x, idObject %d\n", Event, idObject);
|
ERR("Local Event 0x%x, idObject %d\n", Event, idObject);
|
||||||
co_IntCallEventProc( UserHMGetHandle(pEH),
|
co_IntCallEventProc( UserHMGetHandle(pEH),
|
||||||
Event,
|
Event,
|
||||||
UserHMGetHandle(pWnd),
|
UserHMGetHandle(pWnd),
|
||||||
|
@ -336,7 +335,7 @@ NtUserSetWinEventHook(
|
||||||
HANDLE Handle;
|
HANDLE Handle;
|
||||||
PETHREAD Thread = NULL;
|
PETHREAD Thread = NULL;
|
||||||
|
|
||||||
DPRINT("NtUserSetWinEventHook hmod 0x%x, pfn 0x%x\n",hmodWinEventProc, lpfnWinEventProc);
|
TRACE("NtUserSetWinEventHook hmod 0x%x, pfn 0x%x\n",hmodWinEventProc, lpfnWinEventProc);
|
||||||
|
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserFocus);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
HWND FASTCALL
|
HWND FASTCALL
|
||||||
IntGetCaptureWindow(VOID)
|
IntGetCaptureWindow(VOID)
|
||||||
|
@ -112,10 +111,10 @@ co_IntSendActivateMessages(HWND hWndPrev, HWND hWnd, BOOL MouseActivate)
|
||||||
HANDLE OldTID = IntGetWndThreadId(WindowPrev);
|
HANDLE OldTID = IntGetWndThreadId(WindowPrev);
|
||||||
HANDLE NewTID = IntGetWndThreadId(Window);
|
HANDLE NewTID = IntGetWndThreadId(Window);
|
||||||
|
|
||||||
DPRINT("SendActiveMessage Old -> %x, New -> %x\n", OldTID, NewTID);
|
TRACE("SendActiveMessage Old -> %x, New -> %x\n", OldTID, NewTID);
|
||||||
if (Window->style & WS_MINIMIZE)
|
if (Window->style & WS_MINIMIZE)
|
||||||
{
|
{
|
||||||
DPRINT("Widow was minimized\n");
|
TRACE("Widow was minimized\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (OldTID != NewTID)
|
if (OldTID != NewTID)
|
||||||
|
@ -214,18 +213,18 @@ co_IntSetForegroundAndFocusWindow(PWND Wnd, PWND FocusWindow, BOOL MouseActivate
|
||||||
|
|
||||||
ASSERT_REFS_CO(Wnd);
|
ASSERT_REFS_CO(Wnd);
|
||||||
|
|
||||||
DPRINT("IntSetForegroundAndFocusWindow(%x, %x, %s)\n", hWnd, hWndFocus, MouseActivate ? "TRUE" : "FALSE");
|
TRACE("IntSetForegroundAndFocusWindow(%x, %x, %s)\n", hWnd, hWndFocus, MouseActivate ? "TRUE" : "FALSE");
|
||||||
|
|
||||||
if ((Wnd->style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
if ((Wnd->style & (WS_CHILD | WS_POPUP)) == WS_CHILD)
|
||||||
{
|
{
|
||||||
DPRINT("Failed - Child\n");
|
TRACE("Failed - Child\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 == (Wnd->style & WS_VISIBLE) &&
|
if (0 == (Wnd->style & WS_VISIBLE) &&
|
||||||
Wnd->head.pti->pEThread->ThreadsProcess != CsrProcess)
|
Wnd->head.pti->pEThread->ThreadsProcess != CsrProcess)
|
||||||
{
|
{
|
||||||
DPRINT("Failed - Invisible\n");
|
TRACE("Failed - Invisible\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,7 +237,7 @@ co_IntSetForegroundAndFocusWindow(PWND Wnd, PWND FocusWindow, BOOL MouseActivate
|
||||||
|
|
||||||
if (hWndPrev == hWnd)
|
if (hWndPrev == hWnd)
|
||||||
{
|
{
|
||||||
DPRINT("Failed - Same\n");
|
TRACE("Failed - Same\n");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -360,7 +359,7 @@ co_IntSetActiveWindow(PWND Wnd OPTIONAL)
|
||||||
cbt.hWndActive = hWndPrev;
|
cbt.hWndActive = hWndPrev;
|
||||||
if (co_HOOK_CallHooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hWnd, (LPARAM)&cbt))
|
if (co_HOOK_CallHooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hWnd, (LPARAM)&cbt))
|
||||||
{
|
{
|
||||||
DPRINT1("SetActiveWindow WH_CBT Call Hook return!\n");
|
ERR("SetActiveWindow WH_CBT Call Hook return!\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
ThreadQueue->ActiveWindow = hWnd;
|
ThreadQueue->ActiveWindow = hWnd;
|
||||||
|
@ -399,10 +398,11 @@ co_IntSetFocusWindow(PWND Window OPTIONAL)
|
||||||
|
|
||||||
if (co_HOOK_CallHooks( WH_CBT, HCBT_SETFOCUS, (WPARAM)Window->head.h, (LPARAM)hWndPrev))
|
if (co_HOOK_CallHooks( WH_CBT, HCBT_SETFOCUS, (WPARAM)Window->head.h, (LPARAM)hWndPrev))
|
||||||
{
|
{
|
||||||
DPRINT1("SetFocusWindow 1 WH_CBT Call Hook return!\n");
|
ERR("SetFocusWindow 1 WH_CBT Call Hook return!\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
ThreadQueue->FocusWindow = Window->head.h;
|
ThreadQueue->FocusWindow = Window->head.h;
|
||||||
|
TRACE("Focus: %d -> %d\n", hWndPrev, Window->head.h);
|
||||||
|
|
||||||
co_IntSendKillFocusMessages(hWndPrev, Window->head.h);
|
co_IntSendKillFocusMessages(hWndPrev, Window->head.h);
|
||||||
co_IntSendSetFocusMessages(hWndPrev, Window->head.h);
|
co_IntSendSetFocusMessages(hWndPrev, Window->head.h);
|
||||||
|
@ -412,7 +412,7 @@ co_IntSetFocusWindow(PWND Window OPTIONAL)
|
||||||
ThreadQueue->FocusWindow = 0;
|
ThreadQueue->FocusWindow = 0;
|
||||||
if (co_HOOK_CallHooks( WH_CBT, HCBT_SETFOCUS, (WPARAM)0, (LPARAM)hWndPrev))
|
if (co_HOOK_CallHooks( WH_CBT, HCBT_SETFOCUS, (WPARAM)0, (LPARAM)hWndPrev))
|
||||||
{
|
{
|
||||||
DPRINT1("SetFocusWindow 2 WH_CBT Call Hook return!\n");
|
ERR("SetFocusWindow 2 WH_CBT Call Hook return!\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -443,13 +443,13 @@ NtUserGetForegroundWindow(VOID)
|
||||||
{
|
{
|
||||||
DECLARE_RETURN(HWND);
|
DECLARE_RETURN(HWND);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetForegroundWindow\n");
|
TRACE("Enter NtUserGetForegroundWindow\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
RETURN( UserGetForegroundWindow());
|
RETURN( UserGetForegroundWindow());
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetForegroundWindow, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetForegroundWindow, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -472,7 +472,7 @@ NtUserSetActiveWindow(HWND hWnd)
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
DECLARE_RETURN(HWND);
|
DECLARE_RETURN(HWND);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetActiveWindow(%x)\n", hWnd);
|
TRACE("Enter NtUserSetActiveWindow(%x)\n", hWnd);
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (hWnd)
|
if (hWnd)
|
||||||
|
@ -508,7 +508,7 @@ NtUserSetActiveWindow(HWND hWnd)
|
||||||
}
|
}
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetActiveWindow, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetActiveWindow, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -523,14 +523,14 @@ IntGetCapture(VOID)
|
||||||
PUSER_MESSAGE_QUEUE ThreadQueue;
|
PUSER_MESSAGE_QUEUE ThreadQueue;
|
||||||
DECLARE_RETURN(HWND);
|
DECLARE_RETURN(HWND);
|
||||||
|
|
||||||
DPRINT("Enter IntGetCapture\n");
|
TRACE("Enter IntGetCapture\n");
|
||||||
|
|
||||||
pti = PsGetCurrentThreadWin32Thread();
|
pti = PsGetCurrentThreadWin32Thread();
|
||||||
ThreadQueue = pti->MessageQueue;
|
ThreadQueue = pti->MessageQueue;
|
||||||
RETURN( ThreadQueue ? ThreadQueue->CaptureWindow : 0);
|
RETURN( ThreadQueue ? ThreadQueue->CaptureWindow : 0);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave IntGetCapture, ret=%i\n",_ret_);
|
TRACE("Leave IntGetCapture, ret=%i\n",_ret_);
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -626,13 +626,13 @@ NtUserSetCapture(HWND hWnd)
|
||||||
{
|
{
|
||||||
DECLARE_RETURN(HWND);
|
DECLARE_RETURN(HWND);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetCapture(%x)\n", hWnd);
|
TRACE("Enter NtUserSetCapture(%x)\n", hWnd);
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
RETURN( co_UserSetCapture(hWnd));
|
RETURN( co_UserSetCapture(hWnd));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetCapture, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetCapture, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -697,7 +697,7 @@ NtUserSetFocus(HWND hWnd)
|
||||||
DECLARE_RETURN(HWND);
|
DECLARE_RETURN(HWND);
|
||||||
HWND ret;
|
HWND ret;
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetFocus(%x)\n", hWnd);
|
TRACE("Enter NtUserSetFocus(%x)\n", hWnd);
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (hWnd)
|
if (hWnd)
|
||||||
|
@ -719,7 +719,7 @@ NtUserSetFocus(HWND hWnd)
|
||||||
}
|
}
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetFocus, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetFocus, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,9 +35,6 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
/* GLOBALS *******************************************************************/
|
/* GLOBALS *******************************************************************/
|
||||||
|
|
||||||
static LONG NrGuiAppsRunning = 0;
|
static LONG NrGuiAppsRunning = 0;
|
||||||
|
@ -104,8 +101,6 @@ IntUserManualGuiCheck(LONG Check)
|
||||||
{
|
{
|
||||||
PPROCESSINFO W32Data;
|
PPROCESSINFO W32Data;
|
||||||
|
|
||||||
DPRINT("Enter IntUserManualGuiCheck\n");
|
|
||||||
|
|
||||||
W32Data = PsGetCurrentProcessWin32Process();
|
W32Data = PsGetCurrentProcessWin32Process();
|
||||||
if (0 == Check)
|
if (0 == Check)
|
||||||
{
|
{
|
||||||
|
@ -125,9 +120,6 @@ IntUserManualGuiCheck(LONG Check)
|
||||||
RemoveGuiApp(W32Data);
|
RemoveGuiApp(W32Data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Leave IntUserManualGuiCheck\n");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
INIT_FUNCTION
|
INIT_FUNCTION
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserHook);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
typedef struct _HOOKPACK
|
typedef struct _HOOKPACK
|
||||||
{
|
{
|
||||||
|
@ -99,7 +98,7 @@ co_IntCallLowLevelHook(PHOOK Hook,
|
||||||
&uResult);
|
&uResult);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Error Hook Call SendMsg. %d Status: 0x%x\n", Hook->HookId, Status);
|
ERR("Error Hook Call SendMsg. %d Status: 0x%x\n", Hook->HookId, Status);
|
||||||
if (pHP->pHookStructs) ExFreePoolWithTag(pHP->pHookStructs, TAG_HOOK);
|
if (pHP->pHookStructs) ExFreePoolWithTag(pHP->pHookStructs, TAG_HOOK);
|
||||||
ExFreePoolWithTag(pHP, TAG_HOOK);
|
ExFreePoolWithTag(pHP, TAG_HOOK);
|
||||||
}
|
}
|
||||||
|
@ -159,7 +158,7 @@ co_HOOK_CallHookNext( PHOOK Hook,
|
||||||
WPARAM wParam,
|
WPARAM wParam,
|
||||||
LPARAM lParam)
|
LPARAM lParam)
|
||||||
{
|
{
|
||||||
DPRINT("Calling Next HOOK %d\n", Hook->HookId);
|
TRACE("Calling Next HOOK %d\n", Hook->HookId);
|
||||||
|
|
||||||
return co_IntCallHookProc( Hook->HookId,
|
return co_IntCallHookProc( Hook->HookId,
|
||||||
Code,
|
Code,
|
||||||
|
@ -205,7 +204,7 @@ co_IntCallDebugHook(PHOOK Hook,
|
||||||
|
|
||||||
if (BadChk)
|
if (BadChk)
|
||||||
{
|
{
|
||||||
DPRINT1("HOOK WH_DEBUG read from lParam ERROR!\n");
|
ERR("HOOK WH_DEBUG read from lParam ERROR!\n");
|
||||||
return lResult;
|
return lResult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -290,7 +289,7 @@ co_IntCallDebugHook(PHOOK Hook,
|
||||||
|
|
||||||
if (BadChk)
|
if (BadChk)
|
||||||
{
|
{
|
||||||
DPRINT1("HOOK WH_DEBUG read from Debug.lParam ERROR!\n");
|
ERR("HOOK WH_DEBUG read from Debug.lParam ERROR!\n");
|
||||||
ExFreePool(HooklParam);
|
ExFreePool(HooklParam);
|
||||||
return lResult;
|
return lResult;
|
||||||
}
|
}
|
||||||
|
@ -340,7 +339,7 @@ co_UserCallNextHookEx(PHOOK Hook,
|
||||||
|
|
||||||
if (BadChk)
|
if (BadChk)
|
||||||
{
|
{
|
||||||
DPRINT1("HOOK WH_MOUSE read from lParam ERROR!\n");
|
ERR("HOOK WH_MOUSE read from lParam ERROR!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -378,7 +377,7 @@ co_UserCallNextHookEx(PHOOK Hook,
|
||||||
|
|
||||||
if (BadChk)
|
if (BadChk)
|
||||||
{
|
{
|
||||||
DPRINT1("HOOK WH_MOUSE_LL read from lParam ERROR!\n");
|
ERR("HOOK WH_MOUSE_LL read from lParam ERROR!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -413,7 +412,7 @@ co_UserCallNextHookEx(PHOOK Hook,
|
||||||
|
|
||||||
if (BadChk)
|
if (BadChk)
|
||||||
{
|
{
|
||||||
DPRINT1("HOOK WH_KEYBORD_LL read from lParam ERROR!\n");
|
ERR("HOOK WH_KEYBORD_LL read from lParam ERROR!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -450,7 +449,7 @@ co_UserCallNextHookEx(PHOOK Hook,
|
||||||
|
|
||||||
if (BadChk)
|
if (BadChk)
|
||||||
{
|
{
|
||||||
DPRINT1("HOOK WH_XMESSAGEX read from lParam ERROR!\n");
|
ERR("HOOK WH_XMESSAGEX read from lParam ERROR!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -478,7 +477,7 @@ co_UserCallNextHookEx(PHOOK Hook,
|
||||||
|
|
||||||
if (BadChk)
|
if (BadChk)
|
||||||
{
|
{
|
||||||
DPRINT1("HOOK WH_GETMESSAGE write to lParam ERROR!\n");
|
ERR("HOOK WH_GETMESSAGE write to lParam ERROR!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -486,14 +485,14 @@ co_UserCallNextHookEx(PHOOK Hook,
|
||||||
}
|
}
|
||||||
|
|
||||||
case WH_CBT:
|
case WH_CBT:
|
||||||
DPRINT("HOOK WH_CBT!\n");
|
TRACE("HOOK WH_CBT!\n");
|
||||||
switch (Code)
|
switch (Code)
|
||||||
{
|
{
|
||||||
case HCBT_CREATEWND:
|
case HCBT_CREATEWND:
|
||||||
{
|
{
|
||||||
LPCBT_CREATEWNDW pcbtcww = (LPCBT_CREATEWNDW)lParam;
|
LPCBT_CREATEWNDW pcbtcww = (LPCBT_CREATEWNDW)lParam;
|
||||||
|
|
||||||
DPRINT("HOOK HCBT_CREATEWND\n");
|
TRACE("HOOK HCBT_CREATEWND\n");
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
if (Ansi)
|
if (Ansi)
|
||||||
|
@ -543,7 +542,7 @@ co_UserCallNextHookEx(PHOOK Hook,
|
||||||
|
|
||||||
if (BadChk)
|
if (BadChk)
|
||||||
{
|
{
|
||||||
DPRINT1("HOOK HCBT_CREATEWND write ERROR!\n");
|
ERR("HOOK HCBT_CREATEWND write ERROR!\n");
|
||||||
}
|
}
|
||||||
/* The next call handles the structures. */
|
/* The next call handles the structures. */
|
||||||
if (!BadChk && Hook->Proc)
|
if (!BadChk && Hook->Proc)
|
||||||
|
@ -557,7 +556,7 @@ co_UserCallNextHookEx(PHOOK Hook,
|
||||||
{
|
{
|
||||||
RECTL rt;
|
RECTL rt;
|
||||||
|
|
||||||
DPRINT("HOOK HCBT_MOVESIZE\n");
|
TRACE("HOOK HCBT_MOVESIZE\n");
|
||||||
|
|
||||||
if (lParam)
|
if (lParam)
|
||||||
{
|
{
|
||||||
|
@ -579,7 +578,7 @@ co_UserCallNextHookEx(PHOOK Hook,
|
||||||
|
|
||||||
if (BadChk)
|
if (BadChk)
|
||||||
{
|
{
|
||||||
DPRINT1("HOOK HCBT_MOVESIZE read from lParam ERROR!\n");
|
ERR("HOOK HCBT_MOVESIZE read from lParam ERROR!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -594,7 +593,7 @@ co_UserCallNextHookEx(PHOOK Hook,
|
||||||
{
|
{
|
||||||
CBTACTIVATESTRUCT CbAs;
|
CBTACTIVATESTRUCT CbAs;
|
||||||
|
|
||||||
DPRINT("HOOK HCBT_ACTIVATE\n");
|
TRACE("HOOK HCBT_ACTIVATE\n");
|
||||||
if (lParam)
|
if (lParam)
|
||||||
{
|
{
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
|
@ -615,7 +614,7 @@ co_UserCallNextHookEx(PHOOK Hook,
|
||||||
|
|
||||||
if (BadChk)
|
if (BadChk)
|
||||||
{
|
{
|
||||||
DPRINT1("HOOK HCBT_ACTIVATE read from lParam ERROR!\n");
|
ERR("HOOK HCBT_ACTIVATE read from lParam ERROR!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -628,7 +627,7 @@ co_UserCallNextHookEx(PHOOK Hook,
|
||||||
|
|
||||||
/* The rest just use default. */
|
/* The rest just use default. */
|
||||||
default:
|
default:
|
||||||
DPRINT("HOOK HCBT_ %d\n",Code);
|
TRACE("HOOK HCBT_ %d\n",Code);
|
||||||
lResult = co_HOOK_CallHookNext(Hook, Code, wParam, lParam);
|
lResult = co_HOOK_CallHookNext(Hook, Code, wParam, lParam);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -663,7 +662,7 @@ co_UserCallNextHookEx(PHOOK Hook,
|
||||||
|
|
||||||
if (BadChk)
|
if (BadChk)
|
||||||
{
|
{
|
||||||
DPRINT1("HOOK WH_JOURNAL read from lParam ERROR!\n");
|
ERR("HOOK WH_JOURNAL read from lParam ERROR!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -691,7 +690,7 @@ co_UserCallNextHookEx(PHOOK Hook,
|
||||||
|
|
||||||
if (BadChk)
|
if (BadChk)
|
||||||
{
|
{
|
||||||
DPRINT1("HOOK WH_JOURNAL write to lParam ERROR!\n");
|
ERR("HOOK WH_JOURNAL write to lParam ERROR!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -712,7 +711,7 @@ co_UserCallNextHookEx(PHOOK Hook,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DPRINT1("Unsupported HOOK Id -> %d\n",Hook->HookId);
|
ERR("Unsupported HOOK Id -> %d\n",Hook->HookId);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return lResult;
|
return lResult;
|
||||||
|
@ -877,7 +876,7 @@ HOOK_DestroyThreadHooks(PETHREAD Thread)
|
||||||
|
|
||||||
if (!pti || !pdo)
|
if (!pti || !pdo)
|
||||||
{
|
{
|
||||||
DPRINT1("Kill Thread Hooks pti 0x%x pdo 0x%x\n",pti,pdo);
|
ERR("Kill Thread Hooks pti 0x%x pdo 0x%x\n",pti,pdo);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -950,7 +949,7 @@ co_HOOK_CallHooks( INT HookId,
|
||||||
*/
|
*/
|
||||||
if ( !pti || !pdo || (!(HookId == WH_KEYBOARD_LL) && !(HookId == WH_MOUSE_LL)) )
|
if ( !pti || !pdo || (!(HookId == WH_KEYBOARD_LL) && !(HookId == WH_MOUSE_LL)) )
|
||||||
{
|
{
|
||||||
DPRINT("No PDO %d\n", HookId);
|
TRACE("No PDO %d\n", HookId);
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -961,19 +960,19 @@ co_HOOK_CallHooks( INT HookId,
|
||||||
|
|
||||||
if ( pti->TIF_flags & (TIF_INCLEANUP|TIF_DISABLEHOOKS))
|
if ( pti->TIF_flags & (TIF_INCLEANUP|TIF_DISABLEHOOKS))
|
||||||
{
|
{
|
||||||
DPRINT("Hook Thread dead %d\n", HookId);
|
TRACE("Hook Thread dead %d\n", HookId);
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ISITHOOKED(HookId) )
|
if ( ISITHOOKED(HookId) )
|
||||||
{
|
{
|
||||||
DPRINT("Local Hooker %d\n", HookId);
|
TRACE("Local Hooker %d\n", HookId);
|
||||||
Local = TRUE;
|
Local = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( pdo->pDeskInfo->fsHooks & HOOKID_TO_FLAG(HookId) )
|
if ( pdo->pDeskInfo->fsHooks & HOOKID_TO_FLAG(HookId) )
|
||||||
{
|
{
|
||||||
DPRINT("Global Hooker %d\n", HookId);
|
TRACE("Global Hooker %d\n", HookId);
|
||||||
Global = TRUE;
|
Global = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -989,7 +988,7 @@ co_HOOK_CallHooks( INT HookId,
|
||||||
pLastHead = &pti->aphkStart[HOOKID_TO_INDEX(HookId)];
|
pLastHead = &pti->aphkStart[HOOKID_TO_INDEX(HookId)];
|
||||||
if (IsListEmpty(pLastHead))
|
if (IsListEmpty(pLastHead))
|
||||||
{
|
{
|
||||||
DPRINT1("No Local Hook Found!\n");
|
ERR("No Local Hook Found!\n");
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1061,7 +1060,7 @@ co_HOOK_CallHooks( INT HookId,
|
||||||
Hook = (PHOOK)UserGetObject(gHandleTable, pHookHandles[i], otHook);
|
Hook = (PHOOK)UserGetObject(gHandleTable, pHookHandles[i], otHook);
|
||||||
if(!Hook)
|
if(!Hook)
|
||||||
{
|
{
|
||||||
DPRINT1("Invalid hook!\n");
|
ERR("Invalid hook!\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
UserRefObjectCo(Hook, &Ref);
|
UserRefObjectCo(Hook, &Ref);
|
||||||
|
@ -1071,7 +1070,7 @@ co_HOOK_CallHooks( INT HookId,
|
||||||
|
|
||||||
if ( (pti->TIF_flags & TIF_DISABLEHOOKS) || (ptiHook->TIF_flags & TIF_INCLEANUP))
|
if ( (pti->TIF_flags & TIF_DISABLEHOOKS) || (ptiHook->TIF_flags & TIF_INCLEANUP))
|
||||||
{
|
{
|
||||||
DPRINT("Next Hook 0x%x, 0x%x\n", ptiHook->rpdesk, pdo);
|
TRACE("Next Hook 0x%x, 0x%x\n",ptiHook->rpdesk,pdo);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1085,12 +1084,13 @@ co_HOOK_CallHooks( INT HookId,
|
||||||
HookId == WH_KEYBOARD_LL || // 0 | 300
|
HookId == WH_KEYBOARD_LL || // 0 | 300
|
||||||
HookId == WH_MOUSE_LL ) // 0 | 300
|
HookId == WH_MOUSE_LL ) // 0 | 300
|
||||||
{
|
{
|
||||||
DPRINT("\nGlobal Hook posting to another Thread! %d\n", HookId);
|
TRACE("\nGlobal Hook posting to another Thread! %d\n",HookId );
|
||||||
Result = co_IntCallLowLevelHook(Hook, Code, wParam, lParam);
|
Result = co_IntCallLowLevelHook(Hook, Code, wParam, lParam);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ /* Make the direct call. */
|
{ /* Make the direct call. */
|
||||||
|
TRACE("Local Hook calling to Thread! %d\n",HookId );
|
||||||
Result = co_IntCallHookProc( HookId,
|
Result = co_IntCallHookProc( HookId,
|
||||||
Code,
|
Code,
|
||||||
wParam,
|
wParam,
|
||||||
|
@ -1102,7 +1102,7 @@ co_HOOK_CallHooks( INT HookId,
|
||||||
UserDerefObjectCo(Hook);
|
UserDerefObjectCo(Hook);
|
||||||
}
|
}
|
||||||
ExFreePoolWithTag(pHookHandles, TAG_HOOK);
|
ExFreePoolWithTag(pHookHandles, TAG_HOOK);
|
||||||
DPRINT("Ret: Global HookId %d Result 0x%x\n", HookId, Result);
|
TRACE("Ret: Global HookId %d Result 0x%x\n", HookId,Result);
|
||||||
}
|
}
|
||||||
Exit:
|
Exit:
|
||||||
return Result;
|
return Result;
|
||||||
|
@ -1172,7 +1172,7 @@ NtUserCallNextHookEx( int Code,
|
||||||
LRESULT lResult = 0;
|
LRESULT lResult = 0;
|
||||||
DECLARE_RETURN(LRESULT);
|
DECLARE_RETURN(LRESULT);
|
||||||
|
|
||||||
DPRINT("Enter NtUserCallNextHookEx\n");
|
TRACE("Enter NtUserCallNextHookEx\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
pti = GetW32ThreadInfo();
|
pti = GetW32ThreadInfo();
|
||||||
|
@ -1204,7 +1204,7 @@ NtUserCallNextHookEx( int Code,
|
||||||
RETURN( lResult);
|
RETURN( lResult);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserCallNextHookEx, ret=%i\n",_ret_);
|
TRACE("Leave NtUserCallNextHookEx, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1247,7 +1247,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
||||||
PTHREADINFO pti, ptiHook = NULL;
|
PTHREADINFO pti, ptiHook = NULL;
|
||||||
DECLARE_RETURN(HHOOK);
|
DECLARE_RETURN(HHOOK);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetWindowsHookEx\n");
|
TRACE("Enter NtUserSetWindowsHookEx\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
pti = PsGetCurrentThreadWin32Thread();
|
pti = PsGetCurrentThreadWin32Thread();
|
||||||
|
@ -1272,7 +1272,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
||||||
HookId == WH_MOUSE_LL ||
|
HookId == WH_MOUSE_LL ||
|
||||||
HookId == WH_SYSMSGFILTER)
|
HookId == WH_SYSMSGFILTER)
|
||||||
{
|
{
|
||||||
DPRINT1("Local hook installing Global HookId: %d\n",HookId);
|
ERR("Local hook installing Global HookId: %d\n",HookId);
|
||||||
/* these can only be global */
|
/* these can only be global */
|
||||||
EngSetLastError(ERROR_GLOBAL_ONLY_HOOK);
|
EngSetLastError(ERROR_GLOBAL_ONLY_HOOK);
|
||||||
RETURN( NULL);
|
RETURN( NULL);
|
||||||
|
@ -1280,7 +1280,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
||||||
|
|
||||||
if (!NT_SUCCESS(PsLookupThreadByThreadId((HANDLE)(DWORD_PTR) ThreadId, &Thread)))
|
if (!NT_SUCCESS(PsLookupThreadByThreadId((HANDLE)(DWORD_PTR) ThreadId, &Thread)))
|
||||||
{
|
{
|
||||||
DPRINT1("Invalid thread id 0x%x\n", ThreadId);
|
ERR("Invalid thread id 0x%x\n", ThreadId);
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
RETURN( NULL);
|
RETURN( NULL);
|
||||||
}
|
}
|
||||||
|
@ -1291,7 +1291,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
||||||
|
|
||||||
if ( ptiHook->rpdesk != pti->rpdesk) // gptiCurrent->rpdesk)
|
if ( ptiHook->rpdesk != pti->rpdesk) // gptiCurrent->rpdesk)
|
||||||
{
|
{
|
||||||
DPRINT1("Local hook wrong desktop HookId: %d\n",HookId);
|
ERR("Local hook wrong desktop HookId: %d\n",HookId);
|
||||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||||
RETURN( NULL);
|
RETURN( NULL);
|
||||||
}
|
}
|
||||||
|
@ -1308,7 +1308,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
||||||
HookId == WH_FOREGROUNDIDLE ||
|
HookId == WH_FOREGROUNDIDLE ||
|
||||||
HookId == WH_CALLWNDPROCRET) )
|
HookId == WH_CALLWNDPROCRET) )
|
||||||
{
|
{
|
||||||
DPRINT1("Local hook needs hMod HookId: %d\n",HookId);
|
ERR("Local hook needs hMod HookId: %d\n",HookId);
|
||||||
EngSetLastError(ERROR_HOOK_NEEDS_HMOD);
|
EngSetLastError(ERROR_HOOK_NEEDS_HMOD);
|
||||||
RETURN( NULL);
|
RETURN( NULL);
|
||||||
}
|
}
|
||||||
|
@ -1342,7 +1342,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
||||||
HookId == WH_FOREGROUNDIDLE ||
|
HookId == WH_FOREGROUNDIDLE ||
|
||||||
HookId == WH_CALLWNDPROCRET) )
|
HookId == WH_CALLWNDPROCRET) )
|
||||||
{
|
{
|
||||||
DPRINT1("Global hook needs hMod HookId: %d\n",HookId);
|
ERR("Global hook needs hMod HookId: %d\n",HookId);
|
||||||
EngSetLastError(ERROR_HOOK_NEEDS_HMOD);
|
EngSetLastError(ERROR_HOOK_NEEDS_HMOD);
|
||||||
RETURN( NULL);
|
RETURN( NULL);
|
||||||
}
|
}
|
||||||
|
@ -1375,7 +1375,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
||||||
Hook->Proc = HookProc;
|
Hook->Proc = HookProc;
|
||||||
Hook->Ansi = Ansi;
|
Hook->Ansi = Ansi;
|
||||||
|
|
||||||
DPRINT("Set Hook Desk 0x%x DeskInfo 0x%x Handle Desk 0x%x\n", ptiHook->rpdesk, ptiHook->pDeskInfo,Hook->head.rpdesk);
|
TRACE("Set Hook Desk 0x%x DeskInfo 0x%x Handle Desk 0x%x\n",pti->rpdesk, pti->pDeskInfo,Hook->head.rpdesk);
|
||||||
|
|
||||||
if (ThreadId) /* thread-local hook */
|
if (ThreadId) /* thread-local hook */
|
||||||
{
|
{
|
||||||
|
@ -1395,7 +1395,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
DPRINT1("Problem writing to Local ClientInfo!\n");
|
ERR("Problem writing to Local ClientInfo!\n");
|
||||||
}
|
}
|
||||||
_SEH2_END;
|
_SEH2_END;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1409,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
DPRINT1("Problem writing to Remote ClientInfo!\n");
|
ERR("Problem writing to Remote ClientInfo!\n");
|
||||||
}
|
}
|
||||||
_SEH2_END;
|
_SEH2_END;
|
||||||
KeDetachProcess();
|
KeDetachProcess();
|
||||||
|
@ -1470,11 +1470,11 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
|
||||||
else
|
else
|
||||||
Hook->offPfn = 0;
|
Hook->offPfn = 0;
|
||||||
|
|
||||||
DPRINT("Installing: HookId %d Global %s\n", HookId, !ThreadId ? "TRUE" : "FALSE");
|
TRACE("Installing: HookId %d Global %s\n", HookId, !ThreadId ? "TRUE" : "FALSE");
|
||||||
RETURN( Handle);
|
RETURN( Handle);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetWindowsHookEx, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetWindowsHookEx, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1486,12 +1486,12 @@ NtUserUnhookWindowsHookEx(HHOOK Hook)
|
||||||
PHOOK HookObj;
|
PHOOK HookObj;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserUnhookWindowsHookEx\n");
|
TRACE("Enter NtUserUnhookWindowsHookEx\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(HookObj = IntGetHookObject(Hook)))
|
if (!(HookObj = IntGetHookObject(Hook)))
|
||||||
{
|
{
|
||||||
DPRINT1("Invalid handle passed to NtUserUnhookWindowsHookEx\n");
|
ERR("Invalid handle passed to NtUserUnhookWindowsHookEx\n");
|
||||||
/* SetLastNtError(Status); */
|
/* SetLastNtError(Status); */
|
||||||
RETURN( FALSE);
|
RETURN( FALSE);
|
||||||
}
|
}
|
||||||
|
@ -1505,7 +1505,7 @@ NtUserUnhookWindowsHookEx(HHOOK Hook)
|
||||||
RETURN( TRUE);
|
RETURN( TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserUnhookWindowsHookEx, ret=%i\n",_ret_);
|
TRACE("Leave NtUserUnhookWindowsHookEx, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,8 +42,7 @@ windows/threads on destops not belonging to WinSta0 to set hotkeys (recieve noti
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserHotkey);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
/* GLOBALS *******************************************************************/
|
/* GLOBALS *******************************************************************/
|
||||||
|
|
||||||
|
@ -157,7 +156,7 @@ DefWndGetHotKey( HWND hwnd )
|
||||||
{
|
{
|
||||||
PHOT_KEY_ITEM HotKeyItem;
|
PHOT_KEY_ITEM HotKeyItem;
|
||||||
|
|
||||||
DPRINT1("DefWndGetHotKey\n");
|
ERR("DefWndGetHotKey\n");
|
||||||
|
|
||||||
if (IsListEmpty(&gHotkeyList)) return 0;
|
if (IsListEmpty(&gHotkeyList)) return 0;
|
||||||
|
|
||||||
|
@ -181,7 +180,7 @@ DefWndSetHotKey( PWND pWnd, WPARAM wParam )
|
||||||
BOOL HaveSameWnd = FALSE;
|
BOOL HaveSameWnd = FALSE;
|
||||||
INT Ret = 1;
|
INT Ret = 1;
|
||||||
|
|
||||||
DPRINT1("DefWndSetHotKey wParam 0x%x\n", wParam);
|
ERR("DefWndSetHotKey wParam 0x%x\n", wParam);
|
||||||
|
|
||||||
// A hot key cannot be associated with a child window.
|
// A hot key cannot be associated with a child window.
|
||||||
if (pWnd->style & WS_CHILD) return 0;
|
if (pWnd->style & WS_CHILD) return 0;
|
||||||
|
@ -269,7 +268,7 @@ NtUserRegisterHotKey(HWND hWnd,
|
||||||
PETHREAD HotKeyThread;
|
PETHREAD HotKeyThread;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserRegisterHotKey\n");
|
TRACE("Enter NtUserRegisterHotKey\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (hWnd == NULL)
|
if (hWnd == NULL)
|
||||||
|
@ -308,7 +307,7 @@ NtUserRegisterHotKey(HWND hWnd,
|
||||||
RETURN( TRUE);
|
RETURN( TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserRegisterHotKey, ret=%i\n",_ret_);
|
TRACE("Leave NtUserRegisterHotKey, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -321,7 +320,7 @@ NtUserUnregisterHotKey(HWND hWnd, int id)
|
||||||
PWND Window;
|
PWND Window;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserUnregisterHotKey\n");
|
TRACE("Enter NtUserUnregisterHotKey\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Window = UserGetWindowObject(hWnd)))
|
if(!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -343,7 +342,7 @@ NtUserUnregisterHotKey(HWND hWnd, int id)
|
||||||
RETURN( FALSE);
|
RETURN( FALSE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserUnregisterHotKey, ret=%i\n",_ret_);
|
TRACE("Leave NtUserUnregisterHotKey, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,8 +13,7 @@
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
#include <ntddkbd.h>
|
#include <ntddkbd.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserInput);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
extern BYTE gQueueKeyStateTable[];
|
extern BYTE gQueueKeyStateTable[];
|
||||||
extern NTSTATUS Win32kInitWin32Thread(PETHREAD Thread);
|
extern NTSTATUS Win32kInitWin32Thread(PETHREAD Thread);
|
||||||
|
@ -85,14 +84,14 @@ VOID FASTCALL DoTheScreenSaver(VOID)
|
||||||
TO = 1000 * gspv.iScrSaverTimeout;
|
TO = 1000 * gspv.iScrSaverTimeout;
|
||||||
if (Test > TO)
|
if (Test > TO)
|
||||||
{
|
{
|
||||||
DPRINT("Screensaver Message Start! Tick %d Timeout %d \n", Test, gspv.iScrSaverTimeout);
|
TRACE("Screensaver Message Start! Tick %d Timeout %d \n", Test, gspv.iScrSaverTimeout);
|
||||||
|
|
||||||
if (ppiScrnSaver) // We are or we are not the screensaver, prevent reentry...
|
if (ppiScrnSaver) // We are or we are not the screensaver, prevent reentry...
|
||||||
{
|
{
|
||||||
if (!(ppiScrnSaver->W32PF_flags & W32PF_IDLESCREENSAVER))
|
if (!(ppiScrnSaver->W32PF_flags & W32PF_IDLESCREENSAVER))
|
||||||
{
|
{
|
||||||
ppiScrnSaver->W32PF_flags |= W32PF_IDLESCREENSAVER;
|
ppiScrnSaver->W32PF_flags |= W32PF_IDLESCREENSAVER;
|
||||||
DPRINT1("Screensaver is Idle\n");
|
ERR("Screensaver is Idle\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -237,13 +236,13 @@ MouseThreadMain(PVOID StartContext)
|
||||||
Status = Win32kInitWin32Thread(PsGetCurrentThread());
|
Status = Win32kInitWin32Thread(PsGetCurrentThread());
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Win32K: Failed making mouse thread a win32 thread.\n");
|
ERR("Win32K: Failed making mouse thread a win32 thread.\n");
|
||||||
return; //(Status);
|
return; //(Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
ptiMouse = PsGetCurrentThreadWin32Thread();
|
ptiMouse = PsGetCurrentThreadWin32Thread();
|
||||||
ptiMouse->TIF_flags |= TIF_SYSTEMTHREAD;
|
ptiMouse->TIF_flags |= TIF_SYSTEMTHREAD;
|
||||||
DPRINT("Mouse Thread 0x%x \n", ptiMouse);
|
TRACE("Mouse Thread 0x%x \n", ptiMouse);
|
||||||
|
|
||||||
KeSetPriorityThread(&PsGetCurrentThread()->Tcb,
|
KeSetPriorityThread(&PsGetCurrentThread()->Tcb,
|
||||||
LOW_REALTIME_PRIORITY + 3);
|
LOW_REALTIME_PRIORITY + 3);
|
||||||
|
@ -253,13 +252,13 @@ MouseThreadMain(PVOID StartContext)
|
||||||
/*
|
/*
|
||||||
* Wait to start input.
|
* Wait to start input.
|
||||||
*/
|
*/
|
||||||
DPRINT("Mouse Input Thread Waiting for start event\n");
|
TRACE("Mouse Input Thread Waiting for start event\n");
|
||||||
Status = KeWaitForSingleObject(&InputThreadsStart,
|
Status = KeWaitForSingleObject(&InputThreadsStart,
|
||||||
0,
|
0,
|
||||||
KernelMode,
|
KernelMode,
|
||||||
TRUE,
|
TRUE,
|
||||||
NULL);
|
NULL);
|
||||||
DPRINT("Mouse Input Thread Starting...\n");
|
TRACE("Mouse Input Thread Starting...\n");
|
||||||
|
|
||||||
/*FIXME: Does mouse attributes need to be used for anything */
|
/*FIXME: Does mouse attributes need to be used for anything */
|
||||||
Status = NtDeviceIoControlFile(MouseDeviceHandle,
|
Status = NtDeviceIoControlFile(MouseDeviceHandle,
|
||||||
|
@ -272,7 +271,7 @@ MouseThreadMain(PVOID StartContext)
|
||||||
NULL, 0);
|
NULL, 0);
|
||||||
if(!NT_SUCCESS(Status))
|
if(!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Failed to get mouse attributes\n");
|
TRACE("Failed to get mouse attributes\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -301,10 +300,10 @@ MouseThreadMain(PVOID StartContext)
|
||||||
}
|
}
|
||||||
if(!NT_SUCCESS(Status))
|
if(!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Win32K: Failed to read from mouse.\n");
|
ERR("Win32K: Failed to read from mouse.\n");
|
||||||
return; //(Status);
|
return; //(Status);
|
||||||
}
|
}
|
||||||
DPRINT("MouseEvent\n");
|
TRACE("MouseEvent\n");
|
||||||
IntLastInputTick(TRUE);
|
IntLastInputTick(TRUE);
|
||||||
|
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
@ -313,7 +312,7 @@ MouseThreadMain(PVOID StartContext)
|
||||||
|
|
||||||
UserLeave();
|
UserLeave();
|
||||||
}
|
}
|
||||||
DPRINT("Mouse Input Thread Stopped...\n");
|
TRACE("Mouse Input Thread Stopped...\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,7 +468,7 @@ IntKeyboardSendWinKeyMsg()
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(InputWindowStation->ShellWindow)))
|
if (!(Window = UserGetWindowObject(InputWindowStation->ShellWindow)))
|
||||||
{
|
{
|
||||||
DPRINT1("Couldn't find window to send Windows key message!\n");
|
ERR("Couldn't find window to send Windows key message!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -485,7 +484,7 @@ IntKeyboardSendWinKeyMsg()
|
||||||
static VOID APIENTRY
|
static VOID APIENTRY
|
||||||
co_IntKeyboardSendAltKeyMsg()
|
co_IntKeyboardSendAltKeyMsg()
|
||||||
{
|
{
|
||||||
DPRINT1("co_IntKeyboardSendAltKeyMsg\n");
|
ERR("co_IntKeyboardSendAltKeyMsg\n");
|
||||||
// co_MsqPostKeyboardMessage(WM_SYSCOMMAND,SC_KEYMENU,0); // This sends everything into a msg loop!
|
// co_MsqPostKeyboardMessage(WM_SYSCOMMAND,SC_KEYMENU,0); // This sends everything into a msg loop!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -538,13 +537,13 @@ KeyboardThreadMain(PVOID StartContext)
|
||||||
Status = Win32kInitWin32Thread(PsGetCurrentThread());
|
Status = Win32kInitWin32Thread(PsGetCurrentThread());
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Win32K: Failed making keyboard thread a win32 thread.\n");
|
ERR("Win32K: Failed making keyboard thread a win32 thread.\n");
|
||||||
return; //(Status);
|
return; //(Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
ptiKeyboard = PsGetCurrentThreadWin32Thread();
|
ptiKeyboard = PsGetCurrentThreadWin32Thread();
|
||||||
ptiKeyboard->TIF_flags |= TIF_SYSTEMTHREAD;
|
ptiKeyboard->TIF_flags |= TIF_SYSTEMTHREAD;
|
||||||
DPRINT("Keyboard Thread 0x%x \n", ptiKeyboard);
|
TRACE("Keyboard Thread 0x%x \n", ptiKeyboard);
|
||||||
|
|
||||||
KeSetPriorityThread(&PsGetCurrentThread()->Tcb,
|
KeSetPriorityThread(&PsGetCurrentThread()->Tcb,
|
||||||
LOW_REALTIME_PRIORITY + 3);
|
LOW_REALTIME_PRIORITY + 3);
|
||||||
|
@ -557,14 +556,14 @@ KeyboardThreadMain(PVOID StartContext)
|
||||||
/*
|
/*
|
||||||
* Wait to start input.
|
* Wait to start input.
|
||||||
*/
|
*/
|
||||||
DPRINT( "Keyboard Input Thread Waiting for start event\n" );
|
TRACE( "Keyboard Input Thread Waiting for start event\n" );
|
||||||
Status = KeWaitForSingleObject(&InputThreadsStart,
|
Status = KeWaitForSingleObject(&InputThreadsStart,
|
||||||
0,
|
0,
|
||||||
KernelMode,
|
KernelMode,
|
||||||
TRUE,
|
TRUE,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
DPRINT( "Keyboard Input Thread Starting...\n" );
|
TRACE( "Keyboard Input Thread Starting...\n" );
|
||||||
/*
|
/*
|
||||||
* Receive and process keyboard input.
|
* Receive and process keyboard input.
|
||||||
*/
|
*/
|
||||||
|
@ -580,7 +579,7 @@ KeyboardThreadMain(PVOID StartContext)
|
||||||
HWND hWnd;
|
HWND hWnd;
|
||||||
int id;
|
int id;
|
||||||
|
|
||||||
DPRINT("KeyInput @ %08x\n", &KeyInput);
|
TRACE("KeyInput @ %08x\n", &KeyInput);
|
||||||
|
|
||||||
Status = NtReadFile (KeyboardDeviceHandle,
|
Status = NtReadFile (KeyboardDeviceHandle,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -603,11 +602,11 @@ KeyboardThreadMain(PVOID StartContext)
|
||||||
}
|
}
|
||||||
if(!NT_SUCCESS(Status))
|
if(!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Win32K: Failed to read from mouse.\n");
|
ERR("Win32K: Failed to read from mouse.\n");
|
||||||
return; //(Status);
|
return; //(Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("KeyRaw: %s %04x\n",
|
TRACE("KeyRaw: %s %04x\n",
|
||||||
(KeyInput.Flags & KEY_BREAK) ? "up" : "down",
|
(KeyInput.Flags & KEY_BREAK) ? "up" : "down",
|
||||||
KeyInput.MakeCode );
|
KeyInput.MakeCode );
|
||||||
|
|
||||||
|
@ -616,7 +615,7 @@ KeyboardThreadMain(PVOID StartContext)
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Win32K: Failed to read from keyboard.\n");
|
ERR("Win32K: Failed to read from keyboard.\n");
|
||||||
return; //(Status);
|
return; //(Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -687,7 +686,7 @@ KeyboardThreadMain(PVOID StartContext)
|
||||||
sizeof(KEYBOARD_INPUT_DATA),
|
sizeof(KEYBOARD_INPUT_DATA),
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
DPRINT("KeyRaw: %s %04x\n",
|
TRACE("KeyRaw: %s %04x\n",
|
||||||
(NextKeyInput.Flags & KEY_BREAK) ? "up":"down",
|
(NextKeyInput.Flags & KEY_BREAK) ? "up":"down",
|
||||||
NextKeyInput.MakeCode );
|
NextKeyInput.MakeCode );
|
||||||
|
|
||||||
|
@ -853,7 +852,7 @@ KeyboardThreadMain(PVOID StartContext)
|
||||||
{
|
{
|
||||||
if (!(KeyInput.Flags & KEY_BREAK))
|
if (!(KeyInput.Flags & KEY_BREAK))
|
||||||
{
|
{
|
||||||
DPRINT("Hot key pressed (hWnd %lx, id %d)\n", hWnd, id);
|
TRACE("Hot key pressed (hWnd %lx, id %d)\n", hWnd, id);
|
||||||
MsqPostHotKeyMessage (Thread,
|
MsqPostHotKeyMessage (Thread,
|
||||||
hWnd,
|
hWnd,
|
||||||
(WPARAM)id,
|
(WPARAM)id,
|
||||||
|
@ -883,7 +882,7 @@ KeyboardThreadMain(PVOID StartContext)
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyboardEscape:
|
KeyboardEscape:
|
||||||
DPRINT( "KeyboardInput Thread Stopped...\n" );
|
TRACE( "KeyboardInput Thread Stopped...\n" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -916,13 +915,13 @@ RawInputThreadMain(PVOID StartContext)
|
||||||
Status = Win32kInitWin32Thread(PsGetCurrentThread());
|
Status = Win32kInitWin32Thread(PsGetCurrentThread());
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Win32K: Failed making Raw Input thread a win32 thread.\n");
|
ERR("Win32K: Failed making Raw Input thread a win32 thread.\n");
|
||||||
return; //(Status);
|
return; //(Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
ptiRawInput = PsGetCurrentThreadWin32Thread();
|
ptiRawInput = PsGetCurrentThreadWin32Thread();
|
||||||
ptiRawInput->TIF_flags |= TIF_SYSTEMTHREAD;
|
ptiRawInput->TIF_flags |= TIF_SYSTEMTHREAD;
|
||||||
DPRINT("Raw Input Thread 0x%x \n", ptiRawInput);
|
TRACE("Raw Input Thread 0x%x \n", ptiRawInput);
|
||||||
|
|
||||||
KeSetPriorityThread(&PsGetCurrentThread()->Tcb,
|
KeSetPriorityThread(&PsGetCurrentThread()->Tcb,
|
||||||
LOW_REALTIME_PRIORITY + 3);
|
LOW_REALTIME_PRIORITY + 3);
|
||||||
|
@ -936,7 +935,7 @@ RawInputThreadMain(PVOID StartContext)
|
||||||
//
|
//
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
DPRINT( "Raw Input Thread Waiting for start event\n" );
|
TRACE( "Raw Input Thread Waiting for start event\n" );
|
||||||
|
|
||||||
Status = KeWaitForMultipleObjects( 2,
|
Status = KeWaitForMultipleObjects( 2,
|
||||||
Objects,
|
Objects,
|
||||||
|
@ -946,11 +945,11 @@ RawInputThreadMain(PVOID StartContext)
|
||||||
TRUE,
|
TRUE,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
DPRINT( "Raw Input Thread Starting...\n" );
|
TRACE( "Raw Input Thread Starting...\n" );
|
||||||
|
|
||||||
ProcessTimers();
|
ProcessTimers();
|
||||||
}
|
}
|
||||||
DPRINT1("Raw Input Thread Exit!\n");
|
ERR("Raw Input Thread Exit!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
INIT_FUNCTION
|
INIT_FUNCTION
|
||||||
|
@ -965,7 +964,7 @@ InitInputImpl(VOID)
|
||||||
MasterTimer = ExAllocatePoolWithTag(NonPagedPool, sizeof(KTIMER), USERTAG_SYSTEM);
|
MasterTimer = ExAllocatePoolWithTag(NonPagedPool, sizeof(KTIMER), USERTAG_SYSTEM);
|
||||||
if (!MasterTimer)
|
if (!MasterTimer)
|
||||||
{
|
{
|
||||||
DPRINT1("Win32K: Failed making Raw Input thread a win32 thread.\n");
|
ERR("Win32K: Failed making Raw Input thread a win32 thread.\n");
|
||||||
ASSERT(FALSE);
|
ASSERT(FALSE);
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
@ -974,7 +973,7 @@ InitInputImpl(VOID)
|
||||||
/* Initialize the default keyboard layout */
|
/* Initialize the default keyboard layout */
|
||||||
if(!UserInitDefaultKeyboardLayout())
|
if(!UserInitDefaultKeyboardLayout())
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to initialize default keyboard layout!\n");
|
ERR("Failed to initialize default keyboard layout!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = PsCreateSystemThread(&RawInputThreadHandle,
|
Status = PsCreateSystemThread(&RawInputThreadHandle,
|
||||||
|
@ -986,7 +985,7 @@ InitInputImpl(VOID)
|
||||||
NULL);
|
NULL);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Win32K: Failed to create raw thread.\n");
|
ERR("Win32K: Failed to create raw thread.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = PsCreateSystemThread(&KeyboardThreadHandle,
|
Status = PsCreateSystemThread(&KeyboardThreadHandle,
|
||||||
|
@ -998,7 +997,7 @@ InitInputImpl(VOID)
|
||||||
NULL);
|
NULL);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Win32K: Failed to create keyboard thread.\n");
|
ERR("Win32K: Failed to create keyboard thread.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = PsCreateSystemThread(&MouseThreadHandle,
|
Status = PsCreateSystemThread(&MouseThreadHandle,
|
||||||
|
@ -1010,7 +1009,7 @@ InitInputImpl(VOID)
|
||||||
NULL);
|
NULL);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Win32K: Failed to create mouse thread.\n");
|
ERR("Win32K: Failed to create mouse thread.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
InputThreadsRunning = TRUE;
|
InputThreadsRunning = TRUE;
|
||||||
|
@ -1075,13 +1074,13 @@ NtUserBlockInput(
|
||||||
{
|
{
|
||||||
DECLARE_RETURN(BOOLEAN);
|
DECLARE_RETURN(BOOLEAN);
|
||||||
|
|
||||||
DPRINT("Enter NtUserBlockInput\n");
|
TRACE("Enter NtUserBlockInput\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
RETURN( IntBlockInput(PsGetCurrentThreadWin32Thread(), BlockIt));
|
RETURN( IntBlockInput(PsGetCurrentThreadWin32Thread(), BlockIt));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserBlockInput, ret=%i\n",_ret_);
|
TRACE("Leave NtUserBlockInput, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1392,7 +1391,7 @@ IntKeyboardInput(KEYBDINPUT *ki, BOOL Injected)
|
||||||
KbdHookData.dwExtraInfo = ki->dwExtraInfo;
|
KbdHookData.dwExtraInfo = ki->dwExtraInfo;
|
||||||
if (co_HOOK_CallHooks(WH_KEYBOARD_LL, HC_ACTION, Msg.message, (LPARAM) &KbdHookData))
|
if (co_HOOK_CallHooks(WH_KEYBOARD_LL, HC_ACTION, Msg.message, (LPARAM) &KbdHookData))
|
||||||
{
|
{
|
||||||
DPRINT1("Kbd msg %d wParam %d lParam 0x%08x dropped by WH_KEYBOARD_LL hook\n",
|
ERR("Kbd msg %d wParam %d lParam 0x%08x dropped by WH_KEYBOARD_LL hook\n",
|
||||||
Msg.message, vk_hook, Msg.lParam);
|
Msg.message, vk_hook, Msg.lParam);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1400,7 +1399,7 @@ IntKeyboardInput(KEYBDINPUT *ki, BOOL Injected)
|
||||||
|
|
||||||
if (FocusMessageQueue == NULL)
|
if (FocusMessageQueue == NULL)
|
||||||
{
|
{
|
||||||
DPRINT("No focus message queue\n");
|
TRACE("No focus message queue\n");
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1408,7 +1407,7 @@ IntKeyboardInput(KEYBDINPUT *ki, BOOL Injected)
|
||||||
if (FocusMessageQueue->FocusWindow != (HWND)0)
|
if (FocusMessageQueue->FocusWindow != (HWND)0)
|
||||||
{
|
{
|
||||||
Msg.hwnd = FocusMessageQueue->FocusWindow;
|
Msg.hwnd = FocusMessageQueue->FocusWindow;
|
||||||
DPRINT("Msg.hwnd = %x\n", Msg.hwnd);
|
TRACE("Msg.hwnd = %x\n", Msg.hwnd);
|
||||||
|
|
||||||
FocusMessageQueue->Desktop->pDeskInfo->LastInputWasKbd = TRUE;
|
FocusMessageQueue->Desktop->pDeskInfo->LastInputWasKbd = TRUE;
|
||||||
|
|
||||||
|
@ -1418,7 +1417,7 @@ IntKeyboardInput(KEYBDINPUT *ki, BOOL Injected)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT("Invalid focus window handle\n");
|
TRACE("Invalid focus window handle\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1486,7 +1485,7 @@ NtUserSendInput(
|
||||||
UINT cnt;
|
UINT cnt;
|
||||||
DECLARE_RETURN(UINT);
|
DECLARE_RETURN(UINT);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSendInput\n");
|
TRACE("Enter NtUserSendInput\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
W32Thread = PsGetCurrentThreadWin32Thread();
|
W32Thread = PsGetCurrentThreadWin32Thread();
|
||||||
|
@ -1546,7 +1545,7 @@ NtUserSendInput(
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DPRINT1("SendInput(): Invalid input type: 0x%x\n", SafeInput.type);
|
ERR("SendInput(): Invalid input type: 0x%x\n", SafeInput.type);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1556,7 +1555,7 @@ NtUserSendInput(
|
||||||
RETURN( cnt);
|
RETURN( cnt);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSendInput, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSendInput, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1621,7 +1620,7 @@ IntTrackMouseEvent(
|
||||||
lpEventTrack->dwFlags & TME_NONCLIENT ? WM_NCMOUSELEAVE : WM_MOUSELEAVE,
|
lpEventTrack->dwFlags & TME_NONCLIENT ? WM_NCMOUSELEAVE : WM_MOUSELEAVE,
|
||||||
0, 0);
|
0, 0);
|
||||||
}
|
}
|
||||||
DPRINT("IntTrackMouseEvent spwndTrack 0x%x pwnd 0x%x\n", pDesk->spwndTrack,pWnd);
|
TRACE("IntTrackMouseEvent spwndTrack 0x%x pwnd 0x%x\n", pDesk->spwndTrack,pWnd);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1676,7 +1675,7 @@ NtUserTrackMouseEvent(
|
||||||
TRACKMOUSEEVENT saveTME;
|
TRACKMOUSEEVENT saveTME;
|
||||||
BOOL Ret = FALSE;
|
BOOL Ret = FALSE;
|
||||||
|
|
||||||
DPRINT("Enter NtUserTrackMouseEvent\n");
|
TRACE("Enter NtUserTrackMouseEvent\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
|
@ -1724,7 +1723,7 @@ NtUserTrackMouseEvent(
|
||||||
}
|
}
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
DPRINT("Leave NtUserTrackMouseEvent, ret=%i\n",Ret);
|
TRACE("Leave NtUserTrackMouseEvent, ret=%i\n",Ret);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
@ -1746,7 +1745,7 @@ NtUserGetMouseMovePointsEx(
|
||||||
INT Count = -1;
|
INT Count = -1;
|
||||||
DECLARE_RETURN(DWORD);
|
DECLARE_RETURN(DWORD);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetMouseMovePointsEx\n");
|
TRACE("Enter NtUserGetMouseMovePointsEx\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if ((cbSize != sizeof(MOUSEMOVEPOINT)) || (nBufPoints < 0) || (nBufPoints > 64))
|
if ((cbSize != sizeof(MOUSEMOVEPOINT)) || (nBufPoints < 0) || (nBufPoints > 64))
|
||||||
|
@ -1832,7 +1831,7 @@ NtUserGetMouseMovePointsEx(
|
||||||
RETURN( Count);
|
RETURN( Count);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetMouseMovePointsEx, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetMouseMovePointsEx, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserKbdLayout);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
PKBL KBLList = NULL; // Keyboard layout list.
|
PKBL KBLList = NULL; // Keyboard layout list.
|
||||||
|
|
||||||
|
@ -145,22 +144,22 @@ static BOOL UserLoadKbdDll(WCHAR *wsKLID,
|
||||||
|
|
||||||
if(!NT_SUCCESS(Status))
|
if(!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Can't get layout filename for %wZ. (%08lx)\n", klid, Status);
|
TRACE("Can't get layout filename for %wZ. (%08lx)\n", klid, Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Read registry and got %wZ\n", &LayoutFile);
|
TRACE("Read registry and got %wZ\n", &LayoutFile);
|
||||||
RtlInitUnicodeString(&FullLayoutPath, LayoutPathBuffer);
|
RtlInitUnicodeString(&FullLayoutPath, LayoutPathBuffer);
|
||||||
FullLayoutPath.MaximumLength = sizeof(LayoutPathBuffer);
|
FullLayoutPath.MaximumLength = sizeof(LayoutPathBuffer);
|
||||||
RtlAppendUnicodeStringToString(&FullLayoutPath, &LayoutFile);
|
RtlAppendUnicodeStringToString(&FullLayoutPath, &LayoutFile);
|
||||||
DPRINT("Loading Keyboard DLL %wZ\n", &FullLayoutPath);
|
TRACE("Loading Keyboard DLL %wZ\n", &FullLayoutPath);
|
||||||
ExFreePoolWithTag(LayoutFile.Buffer, TAG_STRING);
|
ExFreePoolWithTag(LayoutFile.Buffer, TAG_STRING);
|
||||||
|
|
||||||
*phModule = EngLoadImage(FullLayoutPath.Buffer);
|
*phModule = EngLoadImage(FullLayoutPath.Buffer);
|
||||||
|
|
||||||
if(*phModule)
|
if(*phModule)
|
||||||
{
|
{
|
||||||
DPRINT("Loaded %wZ\n", &FullLayoutPath);
|
TRACE("Loaded %wZ\n", &FullLayoutPath);
|
||||||
|
|
||||||
RtlInitAnsiString( &kbdProcedureName, "KbdLayerDescriptor" );
|
RtlInitAnsiString( &kbdProcedureName, "KbdLayerDescriptor" );
|
||||||
layerDescGetFn = EngFindImageProcAddress(*phModule, "KbdLayerDescriptor");
|
layerDescGetFn = EngFindImageProcAddress(*phModule, "KbdLayerDescriptor");
|
||||||
|
@ -171,19 +170,19 @@ static BOOL UserLoadKbdDll(WCHAR *wsKLID,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("Error: %wZ has no KbdLayerDescriptor()\n", &FullLayoutPath);
|
ERR("Error: %wZ has no KbdLayerDescriptor()\n", &FullLayoutPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!layerDescGetFn || !*pKbdTables)
|
if(!layerDescGetFn || !*pKbdTables)
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to load the keyboard layout.\n");
|
ERR("Failed to load the keyboard layout.\n");
|
||||||
EngUnloadImage(*phModule);
|
EngUnloadImage(*phModule);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to load dll %wZ\n", &FullLayoutPath);
|
ERR("Failed to load dll %wZ\n", &FullLayoutPath);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +199,7 @@ static PKBL UserLoadDllAndCreateKbl(DWORD LocaleId)
|
||||||
|
|
||||||
if(!NewKbl)
|
if(!NewKbl)
|
||||||
{
|
{
|
||||||
DPRINT1("%s: Can't allocate memory!\n", __FUNCTION__);
|
ERR("%s: Can't allocate memory!\n", __FUNCTION__);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +207,7 @@ static PKBL UserLoadDllAndCreateKbl(DWORD LocaleId)
|
||||||
|
|
||||||
if(!UserLoadKbdDll(NewKbl->Name, &NewKbl->hModule, &NewKbl->KBTables))
|
if(!UserLoadKbdDll(NewKbl->Name, &NewKbl->hModule, &NewKbl->KBTables))
|
||||||
{
|
{
|
||||||
DPRINT("%s: failed to load %x dll!\n", __FUNCTION__, LocaleId);
|
TRACE("%s: failed to load %x dll!\n", __FUNCTION__, LocaleId);
|
||||||
ExFreePoolWithTag(NewKbl, USERTAG_KBDLAYOUT);
|
ExFreePoolWithTag(NewKbl, USERTAG_KBDLAYOUT);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -241,21 +240,21 @@ BOOL UserInitDefaultKeyboardLayout()
|
||||||
Status = ZwQueryDefaultLocale(FALSE, &LocaleId);
|
Status = ZwQueryDefaultLocale(FALSE, &LocaleId);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Could not get default locale (%08lx).\n", Status);
|
ERR("Could not get default locale (%08lx).\n", Status);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT("DefaultLocale = %08lx\n", LocaleId);
|
TRACE("DefaultLocale = %08lx\n", LocaleId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!NT_SUCCESS(Status) || !(KBLList = UserLoadDllAndCreateKbl(LocaleId)))
|
if(!NT_SUCCESS(Status) || !(KBLList = UserLoadDllAndCreateKbl(LocaleId)))
|
||||||
{
|
{
|
||||||
DPRINT1("Trying to load US Keyboard Layout.\n");
|
ERR("Trying to load US Keyboard Layout.\n");
|
||||||
LocaleId = 0x409;
|
LocaleId = 0x409;
|
||||||
|
|
||||||
if(!(KBLList = UserLoadDllAndCreateKbl(LocaleId)))
|
if(!(KBLList = UserLoadDllAndCreateKbl(LocaleId)))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to load any Keyboard Layout\n");
|
ERR("Failed to load any Keyboard Layout\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -323,20 +322,19 @@ PKBL W32kGetDefaultKeyLayout(VOID)
|
||||||
ExFreePoolWithTag(LayoutLocaleIdString.Buffer, TAG_STRING);
|
ExFreePoolWithTag(LayoutLocaleIdString.Buffer, TAG_STRING);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DPRINT1("ReadRegistryValue failed! (%08lx).\n", Status);
|
ERR("ReadRegistryValue failed! (%08lx).\n", Status);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DPRINT1("RtlAppendUnicodeToString failed! (%08lx)\n", Status);
|
ERR("RtlAppendUnicodeToString failed! (%08lx)\n", Status);
|
||||||
|
|
||||||
RtlFreeUnicodeString(&CurrentUserPath);
|
RtlFreeUnicodeString(&CurrentUserPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DPRINT1("RtlFormatCurrentUserKeyPath failed! (%08lx)\n", Status);
|
ERR("RtlFormatCurrentUserKeyPath failed! (%08lx)\n", Status);
|
||||||
|
|
||||||
if(!LayoutLocaleId)
|
if(!LayoutLocaleId)
|
||||||
{
|
{
|
||||||
// This block is only reached in case of a failure, so use DPRINT1 here
|
ERR("Assuming default locale for the keyboard layout (0x409 - US)\n");
|
||||||
DPRINT1("Assuming default locale for the keyboard layout (0x409 - US)\n");
|
|
||||||
LayoutLocaleId = 0x409;
|
LayoutLocaleId = 0x409;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,12 +349,12 @@ PKBL W32kGetDefaultKeyLayout(VOID)
|
||||||
pKbl = (PKBL) pKbl->List.Flink;
|
pKbl = (PKBL) pKbl->List.Flink;
|
||||||
} while(pKbl != KBLList);
|
} while(pKbl != KBLList);
|
||||||
|
|
||||||
DPRINT("Loading new default keyboard layout.\n");
|
TRACE("Loading new default keyboard layout.\n");
|
||||||
pKbl = UserLoadDllAndCreateKbl(LayoutLocaleId);
|
pKbl = UserLoadDllAndCreateKbl(LayoutLocaleId);
|
||||||
|
|
||||||
if(!pKbl)
|
if(!pKbl)
|
||||||
{
|
{
|
||||||
DPRINT("Failed to load %x!!! Returning any availableKL.\n", LayoutLocaleId);
|
TRACE("Failed to load %x!!! Returning any availableKL.\n", LayoutLocaleId);
|
||||||
return KBLList;
|
return KBLList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -383,7 +381,7 @@ BOOL UserUnloadKbl(PKBL pKbl)
|
||||||
|
|
||||||
if(pKbl->Flags & KBL_PRELOAD)
|
if(pKbl->Flags & KBL_PRELOAD)
|
||||||
{
|
{
|
||||||
DPRINT1("Attempted to unload preloaded keyboard layout.\n");
|
ERR("Attempted to unload preloaded keyboard layout.\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -654,7 +652,7 @@ NtUserActivateKeyboardLayout(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("%s: Invalid HKL %x!\n", __FUNCTION__, hKl);
|
ERR("%s: Invalid HKL %x!\n", __FUNCTION__, hKl);
|
||||||
}
|
}
|
||||||
|
|
||||||
the_end:
|
the_end:
|
||||||
|
@ -678,7 +676,7 @@ NtUserUnloadKeyboardLayout(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("%s: Invalid HKL %x!\n", __FUNCTION__, hKl);
|
ERR("%s: Invalid HKL %x!\n", __FUNCTION__, hKl);
|
||||||
}
|
}
|
||||||
|
|
||||||
UserLeave();
|
UserLeave();
|
||||||
|
|
|
@ -30,8 +30,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserKbd);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
BYTE gQueueKeyStateTable[256];
|
BYTE gQueueKeyStateTable[256];
|
||||||
|
|
||||||
|
@ -215,7 +214,7 @@ static DWORD ModBits( PKBDTABLES pkKT, PBYTE KeyState )
|
||||||
ModBits |= NUMLOCK_BIT;
|
ModBits |= NUMLOCK_BIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT( "Current Mod Bits: %x\n", ModBits );
|
TRACE( "Current Mod Bits: %x\n", ModBits );
|
||||||
|
|
||||||
return ModBits;
|
return ModBits;
|
||||||
}
|
}
|
||||||
|
@ -236,7 +235,7 @@ static BOOL TryToTranslateChar(WORD wVirtKey,
|
||||||
CapsState = ModBits & ~MOD_BITS_MASK;
|
CapsState = ModBits & ~MOD_BITS_MASK;
|
||||||
ModBits = ModBits & MOD_BITS_MASK;
|
ModBits = ModBits & MOD_BITS_MASK;
|
||||||
|
|
||||||
DPRINT ( "TryToTranslate: %04x %x\n", wVirtKey, ModBits );
|
TRACE ( "TryToTranslate: %04x %x\n", wVirtKey, ModBits );
|
||||||
|
|
||||||
if (ModBits > keyLayout->pCharModifiers->wMaxModBits)
|
if (ModBits > keyLayout->pCharModifiers->wMaxModBits)
|
||||||
{
|
{
|
||||||
|
@ -270,7 +269,7 @@ static BOOL TryToTranslateChar(WORD wVirtKey,
|
||||||
*pbLigature = vkPtr->wch[CapsMod] == WCH_LGTR;
|
*pbLigature = vkPtr->wch[CapsMod] == WCH_LGTR;
|
||||||
*pwcTranslatedChar = vkPtr->wch[CapsMod];
|
*pwcTranslatedChar = vkPtr->wch[CapsMod];
|
||||||
|
|
||||||
DPRINT("%d %04x: CapsMod %08x CapsState %08x Char %04x\n",
|
TRACE("%d %04x: CapsMod %08x CapsState %08x Char %04x\n",
|
||||||
nMod, wVirtKey,
|
nMod, wVirtKey,
|
||||||
CapsMod, CapsState, *pwcTranslatedChar);
|
CapsMod, CapsState, *pwcTranslatedChar);
|
||||||
|
|
||||||
|
@ -279,8 +278,8 @@ static BOOL TryToTranslateChar(WORD wVirtKey,
|
||||||
vkPtr = (PVK_TO_WCHARS10)(((BYTE *)vkPtr) + size_this_entry);
|
vkPtr = (PVK_TO_WCHARS10)(((BYTE *)vkPtr) + size_this_entry);
|
||||||
if( vkPtr->VirtualKey != 0xff )
|
if( vkPtr->VirtualKey != 0xff )
|
||||||
{
|
{
|
||||||
DPRINT( "Found dead key with no trailer in the table.\n" );
|
TRACE( "Found dead key with no trailer in the table.\n" );
|
||||||
DPRINT( "VK: %04x, ADDR: %p\n", wVirtKey, vkPtr );
|
TRACE( "VK: %04x, ADDR: %p\n", wVirtKey, vkPtr );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
*pwcTranslatedChar = vkPtr->wch[CapsMod];
|
*pwcTranslatedChar = vkPtr->wch[CapsMod];
|
||||||
|
@ -319,7 +318,7 @@ ToUnicodeInner(UINT wVirtKey,
|
||||||
{
|
{
|
||||||
if( bLigature )
|
if( bLigature )
|
||||||
{
|
{
|
||||||
DPRINT("Not handling ligature (yet)\n" );
|
TRACE("Not handling ligature (yet)\n" );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -383,13 +382,13 @@ NtUserGetAsyncKeyState(
|
||||||
{
|
{
|
||||||
DECLARE_RETURN(SHORT);
|
DECLARE_RETURN(SHORT);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetAsyncKeyState\n");
|
TRACE("Enter NtUserGetAsyncKeyState\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
RETURN((SHORT)UserGetAsyncKeyState(key));
|
RETURN((SHORT)UserGetAsyncKeyState(key));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetAsyncKeyState, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetAsyncKeyState, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -412,7 +411,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
||||||
pWndMsg = UserGetWindowObject(lpMsg->hwnd);
|
pWndMsg = UserGetWindowObject(lpMsg->hwnd);
|
||||||
if (!pWndMsg) // Must have a window!
|
if (!pWndMsg) // Must have a window!
|
||||||
{
|
{
|
||||||
DPRINT1("No Window for Translate.\n");
|
ERR("No Window for Translate.\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -429,7 +428,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
||||||
/* All messages have to contain the cursor point. */
|
/* All messages have to contain the cursor point. */
|
||||||
NewMsg.pt = gpsi->ptCursor;
|
NewMsg.pt = gpsi->ptCursor;
|
||||||
|
|
||||||
DPRINT("IntTranslateKbdMessage %s\n", lpMsg->message == WM_SYSKEYDOWN ? "WM_SYSKEYDOWN" : "WM_KEYDOWN");
|
TRACE("IntTranslateKbdMessage %s\n", lpMsg->message == WM_SYSKEYDOWN ? "WM_SYSKEYDOWN" : "WM_KEYDOWN");
|
||||||
|
|
||||||
switch (lpMsg->wParam)
|
switch (lpMsg->wParam)
|
||||||
{
|
{
|
||||||
|
@ -457,7 +456,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
||||||
{
|
{
|
||||||
ULONG i;
|
ULONG i;
|
||||||
WCHAR first, second;
|
WCHAR first, second;
|
||||||
DPRINT("PREVIOUS DEAD CHAR: %c\n", dead_char);
|
TRACE("PREVIOUS DEAD CHAR: %c\n", dead_char);
|
||||||
|
|
||||||
for( i = 0; keyLayout->pDeadKey[i].dwBoth; i++ )
|
for( i = 0; keyLayout->pDeadKey[i].dwBoth; i++ )
|
||||||
{
|
{
|
||||||
|
@ -471,7 +470,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("FINAL CHAR: %c\n", wp[0]);
|
TRACE("FINAL CHAR: %c\n", wp[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dead_char)
|
if (dead_char)
|
||||||
|
@ -486,7 +485,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
||||||
NewMsg.hwnd = lpMsg->hwnd;
|
NewMsg.hwnd = lpMsg->hwnd;
|
||||||
NewMsg.wParam = wp[0];
|
NewMsg.wParam = wp[0];
|
||||||
NewMsg.lParam = lpMsg->lParam;
|
NewMsg.lParam = lpMsg->lParam;
|
||||||
DPRINT( "CHAR='%c' %04x %08x\n", wp[0], wp[0], lpMsg->lParam );
|
TRACE( "CHAR='%c' %04x %08x\n", wp[0], wp[0], lpMsg->lParam );
|
||||||
MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY);
|
MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY);
|
||||||
Result = TRUE;
|
Result = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -501,7 +500,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
|
||||||
MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY);
|
MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY);
|
||||||
Result = TRUE;
|
Result = TRUE;
|
||||||
}
|
}
|
||||||
DPRINT("IntTranslateKbdMessage E %s\n", NewMsg.message == WM_CHAR ? "WM_CHAR" : "WM_SYSCHAR");
|
TRACE("IntTranslateKbdMessage E %s\n", NewMsg.message == WM_CHAR ? "WM_CHAR" : "WM_SYSCHAR");
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -524,7 +523,7 @@ UINT ScanToVk( UINT Code, BOOL ExtKey, PKBDTABLES pkKT )
|
||||||
{
|
{
|
||||||
if( !pkKT )
|
if( !pkKT )
|
||||||
{
|
{
|
||||||
DPRINT("ScanToVk: No layout\n");
|
TRACE("ScanToVk: No layout\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -623,7 +622,7 @@ NtUserMapVirtualKeyEx( UINT Code, UINT Type, DWORD keyboardId, HKL dwhkl )
|
||||||
PKBDTABLES keyLayout;
|
PKBDTABLES keyLayout;
|
||||||
DECLARE_RETURN(UINT);
|
DECLARE_RETURN(UINT);
|
||||||
|
|
||||||
DPRINT("Enter NtUserMapVirtualKeyEx\n");
|
TRACE("Enter NtUserMapVirtualKeyEx\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
pti = PsGetCurrentThreadWin32Thread();
|
pti = PsGetCurrentThreadWin32Thread();
|
||||||
|
@ -635,7 +634,7 @@ NtUserMapVirtualKeyEx( UINT Code, UINT Type, DWORD keyboardId, HKL dwhkl )
|
||||||
RETURN(IntMapVirtualKeyEx( Code, Type, keyLayout ));
|
RETURN(IntMapVirtualKeyEx( Code, Type, keyLayout ));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserMapVirtualKeyEx, ret=%i\n",_ret_);
|
TRACE("Leave NtUserMapVirtualKeyEx, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -658,7 +657,7 @@ NtUserToUnicodeEx(
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
DECLARE_RETURN(int);
|
DECLARE_RETURN(int);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetKeyboardState\n");
|
TRACE("Enter NtUserSetKeyboardState\n");
|
||||||
UserEnterShared();//fixme: this syscall doesnt seem to need any locking...
|
UserEnterShared();//fixme: this syscall doesnt seem to need any locking...
|
||||||
|
|
||||||
/* Key up? */
|
/* Key up? */
|
||||||
|
@ -671,7 +670,7 @@ NtUserToUnicodeEx(
|
||||||
lpKeyState,
|
lpKeyState,
|
||||||
sizeof(KeyStateBuf))) )
|
sizeof(KeyStateBuf))) )
|
||||||
{
|
{
|
||||||
DPRINT1( "Couldn't copy key state from caller.\n" );
|
ERR( "Couldn't copy key state from caller.\n" );
|
||||||
RETURN(0);
|
RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -681,7 +680,7 @@ NtUserToUnicodeEx(
|
||||||
OutPwszBuff = ExAllocatePoolWithTag(NonPagedPool,sizeof(WCHAR) * cchBuff, TAG_STRING);
|
OutPwszBuff = ExAllocatePoolWithTag(NonPagedPool,sizeof(WCHAR) * cchBuff, TAG_STRING);
|
||||||
if( !OutPwszBuff )
|
if( !OutPwszBuff )
|
||||||
{
|
{
|
||||||
DPRINT1( "ExAllocatePoolWithTag(%d) failed\n", sizeof(WCHAR) * cchBuff);
|
ERR( "ExAllocatePoolWithTag(%d) failed\n", sizeof(WCHAR) * cchBuff);
|
||||||
RETURN(0);
|
RETURN(0);
|
||||||
}
|
}
|
||||||
RtlZeroMemory( OutPwszBuff, sizeof( WCHAR ) * cchBuff );
|
RtlZeroMemory( OutPwszBuff, sizeof( WCHAR ) * cchBuff );
|
||||||
|
@ -702,7 +701,7 @@ NtUserToUnicodeEx(
|
||||||
RETURN(ret);
|
RETURN(ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetKeyboardState, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetKeyboardState, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -729,7 +728,7 @@ NtUserGetKeyNameText( LONG lParam, LPWSTR lpString, int nSize )
|
||||||
VSC_LPWSTR *KeyNames;
|
VSC_LPWSTR *KeyNames;
|
||||||
DECLARE_RETURN(DWORD);
|
DECLARE_RETURN(DWORD);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetKeyNameText\n");
|
TRACE("Enter NtUserGetKeyNameText\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
pti = PsGetCurrentThreadWin32Thread();
|
pti = PsGetCurrentThreadWin32Thread();
|
||||||
|
@ -808,7 +807,7 @@ NtUserGetKeyNameText( LONG lParam, LPWSTR lpString, int nSize )
|
||||||
RETURN(ret);
|
RETURN(ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetKeyNameText, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetKeyNameText, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -858,7 +857,7 @@ W32kKeyProcessMessage(LPMSG Msg,
|
||||||
*
|
*
|
||||||
* Shift and the LP_EXT_BIT cancel. */
|
* Shift and the LP_EXT_BIT cancel. */
|
||||||
ScanCode = (Msg->lParam >> 16) & 0xff;
|
ScanCode = (Msg->lParam >> 16) & 0xff;
|
||||||
DPRINT("ScanCode %04x\n",ScanCode);
|
TRACE("ScanCode %04x\n",ScanCode);
|
||||||
|
|
||||||
BaseMapping = Msg->wParam =
|
BaseMapping = Msg->wParam =
|
||||||
IntMapVirtualKeyEx( ScanCode, 1, KeyboardLayout );
|
IntMapVirtualKeyEx( ScanCode, 1, KeyboardLayout );
|
||||||
|
@ -887,7 +886,7 @@ W32kKeyProcessMessage(LPMSG Msg,
|
||||||
|
|
||||||
if (!VscVkTable)
|
if (!VscVkTable)
|
||||||
{
|
{
|
||||||
DPRINT1("somethings wrong, Prefix=0x%x", Prefix);
|
ERR("somethings wrong, Prefix=0x%x", Prefix);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -918,7 +917,7 @@ W32kKeyProcessMessage(LPMSG Msg,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Key: [%04x -> %04x]\n", BaseMapping, Msg->wParam);
|
TRACE("Key: [%04x -> %04x]\n", BaseMapping, Msg->wParam);
|
||||||
|
|
||||||
/* Now that we have the VK, we can set the keymap appropriately
|
/* Now that we have the VK, we can set the keymap appropriately
|
||||||
* This is a better place for this code, as it's guaranteed to be
|
* This is a better place for this code, as it's guaranteed to be
|
||||||
|
@ -960,7 +959,7 @@ UserGetKeyboardType(
|
||||||
case 2: /* Number of F-keys */
|
case 2: /* Number of F-keys */
|
||||||
return 12; /* We're doing an 101 for now, so return 12 F-keys */
|
return 12; /* We're doing an 101 for now, so return 12 F-keys */
|
||||||
default:
|
default:
|
||||||
DPRINT1("Unknown type!\n");
|
ERR("Unknown type!\n");
|
||||||
return 0; /* The book says 0 here, so 0 */
|
return 0; /* The book says 0 here, so 0 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -985,7 +984,7 @@ NtUserVkKeyScanEx(
|
||||||
PKBL pkbl = NULL;
|
PKBL pkbl = NULL;
|
||||||
DWORD CapsMod = 0, CapsState = 0, Ret = -1;
|
DWORD CapsMod = 0, CapsState = 0, Ret = -1;
|
||||||
|
|
||||||
DPRINT("NtUserVkKeyScanEx() wChar %d, KbdLayout 0x%p\n", wChar, hKeyboardLayout);
|
TRACE("NtUserVkKeyScanEx() wChar %d, KbdLayout 0x%p\n", wChar, hKeyboardLayout);
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
if (UsehKL)
|
if (UsehKL)
|
||||||
|
@ -1019,7 +1018,7 @@ NtUserVkKeyScanEx(
|
||||||
if(vkPtr->wch[CapsState] == wChar)
|
if(vkPtr->wch[CapsState] == wChar)
|
||||||
{
|
{
|
||||||
CapsMod = KeyLayout->pCharModifiers->ModNumber[CapsState];
|
CapsMod = KeyLayout->pCharModifiers->ModNumber[CapsState];
|
||||||
DPRINT("nMod %d wC %04x: CapsMod %08x CapsState %08x MaxModBits %08x\n",
|
TRACE("nMod %d wC %04x: CapsMod %08x CapsState %08x MaxModBits %08x\n",
|
||||||
nMod, wChar, CapsMod, CapsState, KeyLayout->pCharModifiers->wMaxModBits);
|
nMod, wChar, CapsMod, CapsState, KeyLayout->pCharModifiers->wMaxModBits);
|
||||||
Ret = ((CapsMod << 8)|(vkPtr->VirtualKey & 0xff));
|
Ret = ((CapsMod << 8)|(vkPtr->VirtualKey & 0xff));
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserMenu);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
PMENU_OBJECT FASTCALL
|
PMENU_OBJECT FASTCALL
|
||||||
IntGetSystemMenu(PWND Window, BOOL bRevert, BOOL RetMenu);
|
IntGetSystemMenu(PWND Window, BOOL bRevert, BOOL RetMenu);
|
||||||
|
@ -711,14 +710,14 @@ IntSetMenuItemInfo(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, PROSMENUITEMINF
|
||||||
}
|
}
|
||||||
if (lpmii->fType & ~fTypeMask)
|
if (lpmii->fType & ~fTypeMask)
|
||||||
{
|
{
|
||||||
DbgPrint("IntSetMenuItemInfo invalid fType flags %x\n", lpmii->fType & ~fTypeMask);
|
ERR("IntSetMenuItemInfo invalid fType flags %x\n", lpmii->fType & ~fTypeMask);
|
||||||
lpmii->fMask &= ~(MIIM_TYPE | MIIM_FTYPE);
|
lpmii->fMask &= ~(MIIM_TYPE | MIIM_FTYPE);
|
||||||
}
|
}
|
||||||
if (lpmii->fMask & MIIM_TYPE)
|
if (lpmii->fMask & MIIM_TYPE)
|
||||||
{
|
{
|
||||||
if (lpmii->fMask & ( MIIM_STRING | MIIM_FTYPE | MIIM_BITMAP))
|
if (lpmii->fMask & ( MIIM_STRING | MIIM_FTYPE | MIIM_BITMAP))
|
||||||
{
|
{
|
||||||
DbgPrint("IntSetMenuItemInfo: Invalid combination of fMask bits used\n");
|
ERR("IntSetMenuItemInfo: Invalid combination of fMask bits used\n");
|
||||||
/* this does not happen on Win9x/ME */
|
/* this does not happen on Win9x/ME */
|
||||||
SetLastNtError( ERROR_INVALID_PARAMETER);
|
SetLastNtError( ERROR_INVALID_PARAMETER);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -748,7 +747,7 @@ IntSetMenuItemInfo(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, PROSMENUITEMINF
|
||||||
{
|
{
|
||||||
if(( lpmii->fType & MFT_BITMAP))
|
if(( lpmii->fType & MFT_BITMAP))
|
||||||
{
|
{
|
||||||
DbgPrint("IntSetMenuItemInfo: Can not use FTYPE and MFT_BITMAP.\n");
|
ERR("IntSetMenuItemInfo: Can not use FTYPE and MFT_BITMAP.\n");
|
||||||
SetLastNtError( ERROR_INVALID_PARAMETER);
|
SetLastNtError( ERROR_INVALID_PARAMETER);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -919,7 +918,7 @@ IntInsertMenuItem(PMENU_OBJECT MenuObject, UINT uItem, BOOL fByPosition,
|
||||||
|
|
||||||
pos = IntInsertMenuItemToList(SubMenu, MenuItem, pos);
|
pos = IntInsertMenuItemToList(SubMenu, MenuItem, pos);
|
||||||
|
|
||||||
DPRINT("IntInsertMenuItemToList = %i\n", pos);
|
TRACE("IntInsertMenuItemToList = %i\n", pos);
|
||||||
|
|
||||||
return (pos >= 0);
|
return (pos >= 0);
|
||||||
}
|
}
|
||||||
|
@ -1559,7 +1558,7 @@ NtUserCheckMenuItem(
|
||||||
PMENU_OBJECT Menu;
|
PMENU_OBJECT Menu;
|
||||||
DECLARE_RETURN(DWORD);
|
DECLARE_RETURN(DWORD);
|
||||||
|
|
||||||
DPRINT("Enter NtUserCheckMenuItem\n");
|
TRACE("Enter NtUserCheckMenuItem\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Menu = UserGetMenuObject(hMenu)))
|
if(!(Menu = UserGetMenuObject(hMenu)))
|
||||||
|
@ -1570,7 +1569,7 @@ NtUserCheckMenuItem(
|
||||||
RETURN( IntCheckMenuItem(Menu, uIDCheckItem, uCheck));
|
RETURN( IntCheckMenuItem(Menu, uIDCheckItem, uCheck));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserCheckMenuItem, ret=%i\n",_ret_);
|
TRACE("Leave NtUserCheckMenuItem, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1597,7 +1596,7 @@ HMENU FASTCALL UserCreateMenu(BOOL PopupMenu)
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Validation of window station handle (0x%X) failed\n",
|
ERR("Validation of window station handle (0x%X) failed\n",
|
||||||
CurrentProcess->Win32WindowStation);
|
CurrentProcess->Win32WindowStation);
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
return (HMENU)0;
|
return (HMENU)0;
|
||||||
|
@ -1626,7 +1625,7 @@ NtUserDeleteMenu(
|
||||||
PMENU_OBJECT Menu;
|
PMENU_OBJECT Menu;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserDeleteMenu\n");
|
TRACE("Enter NtUserDeleteMenu\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Menu = UserGetMenuObject(hMenu)))
|
if(!(Menu = UserGetMenuObject(hMenu)))
|
||||||
|
@ -1637,7 +1636,7 @@ NtUserDeleteMenu(
|
||||||
RETURN( IntRemoveMenuItem(Menu, uPosition, uFlags, TRUE));
|
RETURN( IntRemoveMenuItem(Menu, uPosition, uFlags, TRUE));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserDeleteMenu, ret=%i\n",_ret_);
|
TRACE("Leave NtUserDeleteMenu, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1655,7 +1654,7 @@ NtUserGetTitleBarInfo(
|
||||||
DECLARE_RETURN(BOOLEAN);
|
DECLARE_RETURN(BOOLEAN);
|
||||||
BOOLEAN retValue = TRUE;
|
BOOLEAN retValue = TRUE;
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetTitleBarInfo\n");
|
TRACE("Enter NtUserGetTitleBarInfo\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
/* Vaildate the windows handle */
|
/* Vaildate the windows handle */
|
||||||
|
@ -1704,7 +1703,7 @@ NtUserGetTitleBarInfo(
|
||||||
RETURN( retValue );
|
RETURN( retValue );
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetTitleBarInfo, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetTitleBarInfo, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1740,7 +1739,7 @@ NtUserDestroyMenu(
|
||||||
PMENU_OBJECT Menu;
|
PMENU_OBJECT Menu;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserDestroyMenu\n");
|
TRACE("Enter NtUserDestroyMenu\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Menu = UserGetMenuObject(hMenu)))
|
if(!(Menu = UserGetMenuObject(hMenu)))
|
||||||
|
@ -1757,7 +1756,7 @@ NtUserDestroyMenu(
|
||||||
RETURN( IntDestroyMenuObject(Menu, TRUE, TRUE));
|
RETURN( IntDestroyMenuObject(Menu, TRUE, TRUE));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserDestroyMenu, ret=%i\n",_ret_);
|
TRACE("Leave NtUserDestroyMenu, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1774,7 +1773,7 @@ NtUserEnableMenuItem(
|
||||||
PMENU_OBJECT Menu;
|
PMENU_OBJECT Menu;
|
||||||
DECLARE_RETURN(UINT);
|
DECLARE_RETURN(UINT);
|
||||||
|
|
||||||
DPRINT("Enter NtUserEnableMenuItem\n");
|
TRACE("Enter NtUserEnableMenuItem\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Menu = UserGetMenuObject(hMenu)))
|
if(!(Menu = UserGetMenuObject(hMenu)))
|
||||||
|
@ -1785,7 +1784,7 @@ NtUserEnableMenuItem(
|
||||||
RETURN( IntEnableMenuItem(Menu, uIDEnableItem, uEnable));
|
RETURN( IntEnableMenuItem(Menu, uIDEnableItem, uEnable));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserEnableMenuItem, ret=%i\n",_ret_);
|
TRACE("Leave NtUserEnableMenuItem, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1810,7 +1809,7 @@ NtUserGetMenuBarInfo(
|
||||||
MENUBARINFO kmbi;
|
MENUBARINFO kmbi;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetMenuBarInfo\n");
|
TRACE("Enter NtUserGetMenuBarInfo\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
if (!(WindowObject = UserGetWindowObject(hwnd)))
|
if (!(WindowObject = UserGetWindowObject(hwnd)))
|
||||||
|
@ -1867,7 +1866,7 @@ NtUserGetMenuBarInfo(
|
||||||
Rect.bottom = Offset.y;
|
Rect.bottom = Offset.y;
|
||||||
Rect.top = Offset.y - MenuObject->MenuInfo.Height;
|
Rect.top = Offset.y - MenuObject->MenuInfo.Height;
|
||||||
kmbi.rcBar = Rect;
|
kmbi.rcBar = Rect;
|
||||||
DPRINT("Rect top = %d bottom = %d left = %d right = %d \n",
|
TRACE("Rect top = %d bottom = %d left = %d right = %d \n",
|
||||||
Rect.top, Rect.bottom, Rect.left, Rect.right);
|
Rect.top, Rect.bottom, Rect.left, Rect.right);
|
||||||
}
|
}
|
||||||
if (idItem)
|
if (idItem)
|
||||||
|
@ -1879,7 +1878,7 @@ NtUserGetMenuBarInfo(
|
||||||
kmbi.fBarFocused = TRUE;
|
kmbi.fBarFocused = TRUE;
|
||||||
SubMenuObject = UserGetMenuObject(MenuObject->MenuItemList->hSubMenu);
|
SubMenuObject = UserGetMenuObject(MenuObject->MenuItemList->hSubMenu);
|
||||||
if(SubMenuObject) kmbi.hwndMenu = SubMenuObject->MenuInfo.Wnd;
|
if(SubMenuObject) kmbi.hwndMenu = SubMenuObject->MenuInfo.Wnd;
|
||||||
DPRINT("OBJID_MENU, idItem = %d\n",idItem);
|
TRACE("OBJID_MENU, idItem = %d\n",idItem);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OBJID_CLIENT:
|
case OBJID_CLIENT:
|
||||||
|
@ -1890,7 +1889,7 @@ NtUserGetMenuBarInfo(
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Res = FALSE;
|
Res = FALSE;
|
||||||
DPRINT1("OBJID_CLIENT, No SubMenu!\n");
|
ERR("OBJID_CLIENT, No SubMenu!\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (idItem)
|
if (idItem)
|
||||||
|
@ -1931,7 +1930,7 @@ NtUserGetMenuBarInfo(
|
||||||
kmbi.fBarFocused = TRUE;
|
kmbi.fBarFocused = TRUE;
|
||||||
XSubMenuObject = UserGetMenuObject(SubMenuObject->MenuItemList->hSubMenu);
|
XSubMenuObject = UserGetMenuObject(SubMenuObject->MenuItemList->hSubMenu);
|
||||||
if (XSubMenuObject) kmbi.hwndMenu = XSubMenuObject->MenuInfo.Wnd;
|
if (XSubMenuObject) kmbi.hwndMenu = XSubMenuObject->MenuInfo.Wnd;
|
||||||
DPRINT("OBJID_CLIENT, idItem = %d\n",idItem);
|
TRACE("OBJID_CLIENT, idItem = %d\n",idItem);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OBJID_SYSMENU:
|
case OBJID_SYSMENU:
|
||||||
|
@ -1981,12 +1980,12 @@ NtUserGetMenuBarInfo(
|
||||||
kmbi.fBarFocused = TRUE;
|
kmbi.fBarFocused = TRUE;
|
||||||
SubMenuObject = UserGetMenuObject(SysMenuObject->MenuItemList->hSubMenu);
|
SubMenuObject = UserGetMenuObject(SysMenuObject->MenuItemList->hSubMenu);
|
||||||
if(SubMenuObject) kmbi.hwndMenu = SubMenuObject->MenuInfo.Wnd;
|
if(SubMenuObject) kmbi.hwndMenu = SubMenuObject->MenuInfo.Wnd;
|
||||||
DPRINT("OBJID_SYSMENU, idItem = %d\n",idItem);
|
TRACE("OBJID_SYSMENU, idItem = %d\n",idItem);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
Res = FALSE;
|
Res = FALSE;
|
||||||
DPRINT1("Unknown idObject = %d, idItem = %d\n",idObject,idItem);
|
ERR("Unknown idObject = %d, idItem = %d\n",idObject,idItem);
|
||||||
}
|
}
|
||||||
if (Res)
|
if (Res)
|
||||||
{
|
{
|
||||||
|
@ -2000,7 +1999,7 @@ NtUserGetMenuBarInfo(
|
||||||
RETURN(Res);
|
RETURN(Res);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetMenuBarInfo, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetMenuBarInfo, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2017,7 +2016,7 @@ NtUserGetMenuIndex(
|
||||||
PMENU_ITEM MenuItem;
|
PMENU_ITEM MenuItem;
|
||||||
DECLARE_RETURN(UINT);
|
DECLARE_RETURN(UINT);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetMenuIndex\n");
|
TRACE("Enter NtUserGetMenuIndex\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
if ( !(Menu = UserGetMenuObject(hMenu)) ||
|
if ( !(Menu = UserGetMenuObject(hMenu)) ||
|
||||||
|
@ -2035,7 +2034,7 @@ NtUserGetMenuIndex(
|
||||||
RETURN(0xFFFFFFFF);
|
RETURN(0xFFFFFFFF);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetMenuIndex, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetMenuIndex, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2058,7 +2057,7 @@ NtUserGetMenuItemRect(
|
||||||
PMENU_ITEM MenuItem;
|
PMENU_ITEM MenuItem;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetMenuItemRect\n");
|
TRACE("Enter NtUserGetMenuItemRect\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
if (!(Menu = UserGetMenuObject(hMenu)))
|
if (!(Menu = UserGetMenuObject(hMenu)))
|
||||||
|
@ -2105,7 +2104,7 @@ NtUserGetMenuItemRect(
|
||||||
RETURN( TRUE);
|
RETURN( TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetMenuItemRect, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetMenuItemRect, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2124,7 +2123,7 @@ NtUserHiliteMenuItem(
|
||||||
PWND Window;
|
PWND Window;
|
||||||
DECLARE_RETURN(BOOLEAN);
|
DECLARE_RETURN(BOOLEAN);
|
||||||
|
|
||||||
DPRINT("Enter NtUserHiliteMenuItem\n");
|
TRACE("Enter NtUserHiliteMenuItem\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Window = UserGetWindowObject(hWnd)))
|
if(!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -2147,7 +2146,7 @@ NtUserHiliteMenuItem(
|
||||||
RETURN(FALSE);
|
RETURN(FALSE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserHiliteMenuItem, ret=%i\n",_ret_);
|
TRACE("Leave NtUserHiliteMenuItem, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2221,7 +2220,7 @@ NtUserMenuItemFromPoint(
|
||||||
int i;
|
int i;
|
||||||
DECLARE_RETURN(int);
|
DECLARE_RETURN(int);
|
||||||
|
|
||||||
DPRINT("Enter NtUserMenuItemFromPoint\n");
|
TRACE("Enter NtUserMenuItemFromPoint\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Menu = UserGetMenuObject(hMenu)))
|
if (!(Menu = UserGetMenuObject(hMenu)))
|
||||||
|
@ -2250,7 +2249,7 @@ NtUserMenuItemFromPoint(
|
||||||
RETURN( (mi ? i : NO_SELECTED_ITEM));
|
RETURN( (mi ? i : NO_SELECTED_ITEM));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserMenuItemFromPoint, ret=%i\n",_ret_);
|
TRACE("Leave NtUserMenuItemFromPoint, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2342,7 +2341,7 @@ NtUserRemoveMenu(
|
||||||
PMENU_OBJECT Menu;
|
PMENU_OBJECT Menu;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserRemoveMenu\n");
|
TRACE("Enter NtUserRemoveMenu\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Menu = UserGetMenuObject(hMenu)))
|
if(!(Menu = UserGetMenuObject(hMenu)))
|
||||||
|
@ -2353,7 +2352,7 @@ NtUserRemoveMenu(
|
||||||
RETURN(IntRemoveMenuItem(Menu, uPosition, uFlags, FALSE));
|
RETURN(IntRemoveMenuItem(Menu, uPosition, uFlags, FALSE));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserRemoveMenu, ret=%i\n",_ret_);
|
TRACE("Leave NtUserRemoveMenu, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
|
|
||||||
|
@ -2370,7 +2369,7 @@ NtUserSetMenuContextHelpId(
|
||||||
PMENU_OBJECT Menu;
|
PMENU_OBJECT Menu;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetMenuContextHelpId\n");
|
TRACE("Enter NtUserSetMenuContextHelpId\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Menu = UserGetMenuObject(hMenu)))
|
if(!(Menu = UserGetMenuObject(hMenu)))
|
||||||
|
@ -2381,7 +2380,7 @@ NtUserSetMenuContextHelpId(
|
||||||
RETURN(IntSetMenuContextHelpId(Menu, dwContextHelpId));
|
RETURN(IntSetMenuContextHelpId(Menu, dwContextHelpId));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetMenuContextHelpId, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetMenuContextHelpId, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2398,7 +2397,7 @@ NtUserSetMenuDefaultItem(
|
||||||
PMENU_OBJECT Menu;
|
PMENU_OBJECT Menu;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetMenuDefaultItem\n");
|
TRACE("Enter NtUserSetMenuDefaultItem\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Menu = UserGetMenuObject(hMenu)))
|
if(!(Menu = UserGetMenuObject(hMenu)))
|
||||||
|
@ -2409,7 +2408,7 @@ NtUserSetMenuDefaultItem(
|
||||||
RETURN( UserSetMenuDefaultItem(Menu, uItem, fByPos));
|
RETURN( UserSetMenuDefaultItem(Menu, uItem, fByPos));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetMenuDefaultItem, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetMenuDefaultItem, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2424,7 +2423,7 @@ NtUserSetMenuFlagRtoL(
|
||||||
PMENU_OBJECT Menu;
|
PMENU_OBJECT Menu;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetMenuFlagRtoL\n");
|
TRACE("Enter NtUserSetMenuFlagRtoL\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Menu = UserGetMenuObject(hMenu)))
|
if(!(Menu = UserGetMenuObject(hMenu)))
|
||||||
|
@ -2435,7 +2434,7 @@ NtUserSetMenuFlagRtoL(
|
||||||
RETURN(IntSetMenuFlagRtoL(Menu));
|
RETURN(IntSetMenuFlagRtoL(Menu));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetMenuFlagRtoL, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetMenuFlagRtoL, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2451,7 +2450,7 @@ NtUserThunkedMenuInfo(
|
||||||
PMENU_OBJECT Menu;
|
PMENU_OBJECT Menu;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserThunkedMenuInfo\n");
|
TRACE("Enter NtUserThunkedMenuInfo\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Menu = UserGetMenuObject(hMenu)))
|
if (!(Menu = UserGetMenuObject(hMenu)))
|
||||||
|
@ -2462,7 +2461,7 @@ NtUserThunkedMenuInfo(
|
||||||
RETURN(UserMenuInfo(Menu, (PROSMENUINFO)lpcmi, TRUE));
|
RETURN(UserMenuInfo(Menu, (PROSMENUINFO)lpcmi, TRUE));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserThunkedMenuInfo, ret=%i\n",_ret_);
|
TRACE("Leave NtUserThunkedMenuInfo, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2484,7 +2483,7 @@ NtUserThunkedMenuItemInfo(
|
||||||
UNICODE_STRING lstrCaption;
|
UNICODE_STRING lstrCaption;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserThunkedMenuItemInfo\n");
|
TRACE("Enter NtUserThunkedMenuItemInfo\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
/* lpszCaption may be NULL, check for it and call RtlInitUnicodeString()
|
/* lpszCaption may be NULL, check for it and call RtlInitUnicodeString()
|
||||||
|
@ -2506,7 +2505,7 @@ NtUserThunkedMenuItemInfo(
|
||||||
lpszCaption);
|
lpszCaption);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to capture MenuItem Caption (status 0x%08x)\n",Status);
|
ERR("Failed to capture MenuItem Caption (status 0x%08x)\n",Status);
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
RETURN(FALSE);
|
RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
@ -2517,7 +2516,7 @@ NtUserThunkedMenuItemInfo(
|
||||||
RETURN( UserMenuItemInfo(Menu, uItem, fByPosition, (PROSMENUITEMINFO)lpmii, TRUE));
|
RETURN( UserMenuItemInfo(Menu, uItem, fByPosition, (PROSMENUITEMINFO)lpmii, TRUE));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserThunkedMenuItemInfo, ret=%i\n",_ret_);
|
TRACE("Leave NtUserThunkedMenuItemInfo, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2538,7 +2537,7 @@ NtUserBuildMenuItemList(
|
||||||
PMENU_OBJECT Menu;
|
PMENU_OBJECT Menu;
|
||||||
DECLARE_RETURN(DWORD);
|
DECLARE_RETURN(DWORD);
|
||||||
|
|
||||||
DPRINT("Enter NtUserBuildMenuItemList\n");
|
TRACE("Enter NtUserBuildMenuItemList\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Menu = UserGetMenuObject(hMenu)))
|
if(!(Menu = UserGetMenuObject(hMenu)))
|
||||||
|
@ -2558,7 +2557,7 @@ NtUserBuildMenuItemList(
|
||||||
RETURN( res);
|
RETURN( res);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserBuildMenuItemList, ret=%i\n",_ret_);
|
TRACE("Leave NtUserBuildMenuItemList, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2576,7 +2575,7 @@ NtUserGetMenuDefaultItem(
|
||||||
DWORD gismc = 0;
|
DWORD gismc = 0;
|
||||||
DECLARE_RETURN(UINT);
|
DECLARE_RETURN(UINT);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetMenuDefaultItem\n");
|
TRACE("Enter NtUserGetMenuDefaultItem\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Menu = UserGetMenuObject(hMenu)))
|
if(!(Menu = UserGetMenuObject(hMenu)))
|
||||||
|
@ -2587,7 +2586,7 @@ NtUserGetMenuDefaultItem(
|
||||||
RETURN( IntGetMenuDefaultItem(Menu, fByPos, gmdiFlags, &gismc));
|
RETURN( IntGetMenuDefaultItem(Menu, fByPos, gmdiFlags, &gismc));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetMenuDefaultItem, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetMenuDefaultItem, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2605,7 +2604,7 @@ NtUserMenuInfo(
|
||||||
PMENU_OBJECT Menu;
|
PMENU_OBJECT Menu;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserMenuInfo\n");
|
TRACE("Enter NtUserMenuInfo\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
if (!(Menu = UserGetMenuObject(hMenu)))
|
if (!(Menu = UserGetMenuObject(hMenu)))
|
||||||
|
@ -2616,7 +2615,7 @@ NtUserMenuInfo(
|
||||||
RETURN(UserMenuInfo(Menu, UnsafeMenuInfo, SetOrGet));
|
RETURN(UserMenuInfo(Menu, UnsafeMenuInfo, SetOrGet));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserMenuInfo, ret=%i\n",_ret_);
|
TRACE("Leave NtUserMenuInfo, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2636,7 +2635,7 @@ NtUserMenuItemInfo(
|
||||||
PMENU_OBJECT Menu;
|
PMENU_OBJECT Menu;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserMenuItemInfo\n");
|
TRACE("Enter NtUserMenuItemInfo\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Menu = UserGetMenuObject(hMenu)))
|
if (!(Menu = UserGetMenuObject(hMenu)))
|
||||||
|
@ -2647,7 +2646,7 @@ NtUserMenuItemInfo(
|
||||||
RETURN( UserMenuItemInfo(Menu, Item, ByPosition, UnsafeItemInfo, SetOrGet));
|
RETURN( UserMenuItemInfo(Menu, Item, ByPosition, UnsafeItemInfo, SetOrGet));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserMenuItemInfo, ret=%i\n",_ret_);
|
TRACE("Leave NtUserMenuItemInfo, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserMsg);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
BOOLEAN NTAPI PsGetProcessExitProcessCalled(PEPROCESS Process);
|
BOOLEAN NTAPI PsGetProcessExitProcessCalled(PEPROCESS Process);
|
||||||
|
|
||||||
|
@ -223,7 +222,7 @@ MsgMemorySize(PMSGMEMORY MsgMemoryEntry, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
DPRINT1("Exception caught in MsgMemorySize()! Status: 0x%x\n", _SEH2_GetExceptionCode());
|
ERR("Exception caught in MsgMemorySize()! Status: 0x%x\n", _SEH2_GetExceptionCode());
|
||||||
Size = 0;
|
Size = 0;
|
||||||
}
|
}
|
||||||
_SEH2_END;
|
_SEH2_END;
|
||||||
|
@ -260,7 +259,7 @@ PackParam(LPARAM *lParamPacked, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL Non
|
||||||
|
|
||||||
if (NULL == PackedNcCalcsize)
|
if (NULL == PackedNcCalcsize)
|
||||||
{
|
{
|
||||||
DPRINT1("Not enough memory to pack lParam\n");
|
ERR("Not enough memory to pack lParam\n");
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
RtlCopyMemory(PackedNcCalcsize, UnpackedNcCalcsize, sizeof(NCCALCSIZE_PARAMS));
|
RtlCopyMemory(PackedNcCalcsize, UnpackedNcCalcsize, sizeof(NCCALCSIZE_PARAMS));
|
||||||
|
@ -285,7 +284,7 @@ PackParam(LPARAM *lParamPacked, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL Non
|
||||||
PackedCs = ExAllocatePoolWithTag(PoolType, Size, TAG_MSG);
|
PackedCs = ExAllocatePoolWithTag(PoolType, Size, TAG_MSG);
|
||||||
if (NULL == PackedCs)
|
if (NULL == PackedCs)
|
||||||
{
|
{
|
||||||
DPRINT1("Not enough memory to pack lParam\n");
|
ERR("Not enough memory to pack lParam\n");
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
RtlCopyMemory(PackedCs, UnpackedCs, sizeof(CREATESTRUCTW));
|
RtlCopyMemory(PackedCs, UnpackedCs, sizeof(CREATESTRUCTW));
|
||||||
|
@ -331,7 +330,7 @@ PackParam(LPARAM *lParamPacked, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL Non
|
||||||
size = MsgMemorySize(MsgMemoryEntry, wParam, lParam);
|
size = MsgMemorySize(MsgMemoryEntry, wParam, lParam);
|
||||||
if (!size)
|
if (!size)
|
||||||
{
|
{
|
||||||
DPRINT1("No size for lParamPacked\n");
|
ERR("No size for lParamPacked\n");
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
PackedData = ExAllocatePoolWithTag(NonPagedPool, size, TAG_MSG);
|
PackedData = ExAllocatePoolWithTag(NonPagedPool, size, TAG_MSG);
|
||||||
|
@ -421,7 +420,7 @@ CopyMsgToKernelMem(MSG *KernelModeMsg, MSG *UserModeMsg, PMSGMEMORY MsgMemoryEnt
|
||||||
KernelMem = ExAllocatePoolWithTag(PagedPool, Size, TAG_MSG);
|
KernelMem = ExAllocatePoolWithTag(PagedPool, Size, TAG_MSG);
|
||||||
if (NULL == KernelMem)
|
if (NULL == KernelMem)
|
||||||
{
|
{
|
||||||
DPRINT1("Not enough memory to copy message to kernel mem\n");
|
ERR("Not enough memory to copy message to kernel mem\n");
|
||||||
return STATUS_NO_MEMORY;
|
return STATUS_NO_MEMORY;
|
||||||
}
|
}
|
||||||
KernelModeMsg->lParam = (LPARAM) KernelMem;
|
KernelModeMsg->lParam = (LPARAM) KernelMem;
|
||||||
|
@ -432,7 +431,7 @@ CopyMsgToKernelMem(MSG *KernelModeMsg, MSG *UserModeMsg, PMSGMEMORY MsgMemoryEnt
|
||||||
Status = MmCopyFromCaller(KernelMem, (PVOID) UserModeMsg->lParam, Size);
|
Status = MmCopyFromCaller(KernelMem, (PVOID) UserModeMsg->lParam, Size);
|
||||||
if (! NT_SUCCESS(Status))
|
if (! NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to copy message to kernel: invalid usermode buffer\n");
|
ERR("Failed to copy message to kernel: invalid usermode buffer\n");
|
||||||
ExFreePoolWithTag(KernelMem, TAG_MSG);
|
ExFreePoolWithTag(KernelMem, TAG_MSG);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -477,7 +476,7 @@ CopyMsgToUserMem(MSG *UserModeMsg, MSG *KernelModeMsg)
|
||||||
Status = MmCopyToCaller((PVOID) UserModeMsg->lParam, (PVOID) KernelModeMsg->lParam, Size);
|
Status = MmCopyToCaller((PVOID) UserModeMsg->lParam, (PVOID) KernelModeMsg->lParam, Size);
|
||||||
if (! NT_SUCCESS(Status))
|
if (! NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to copy message from kernel: invalid usermode buffer\n");
|
ERR("Failed to copy message from kernel: invalid usermode buffer\n");
|
||||||
ExFreePool((PVOID) KernelModeMsg->lParam);
|
ExFreePool((PVOID) KernelModeMsg->lParam);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -520,10 +519,10 @@ IdlePing(VOID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("IdlePing ppi 0x%x\n",ppi);
|
TRACE("IdlePing ppi 0x%x\n",ppi);
|
||||||
if ( ppi && ppi->InputIdleEvent )
|
if ( ppi && ppi->InputIdleEvent )
|
||||||
{
|
{
|
||||||
DPRINT("InputIdleEvent\n");
|
TRACE("InputIdleEvent\n");
|
||||||
KeSetEvent( ppi->InputIdleEvent, IO_NO_INCREMENT, FALSE);
|
KeSetEvent( ppi->InputIdleEvent, IO_NO_INCREMENT, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -533,7 +532,7 @@ IdlePong(VOID)
|
||||||
{
|
{
|
||||||
PPROCESSINFO ppi = PsGetCurrentProcessWin32Process();
|
PPROCESSINFO ppi = PsGetCurrentProcessWin32Process();
|
||||||
|
|
||||||
DPRINT("IdlePong ppi 0x%x\n",ppi);
|
TRACE("IdlePong ppi 0x%x\n",ppi);
|
||||||
if ( ppi && ppi->InputIdleEvent )
|
if ( ppi && ppi->InputIdleEvent )
|
||||||
{
|
{
|
||||||
KeClearEvent(ppi->InputIdleEvent);
|
KeClearEvent(ppi->InputIdleEvent);
|
||||||
|
@ -860,7 +859,7 @@ co_IntWaitMessage( PWND Window,
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
DPRINT1("Exit co_IntWaitMessage on error!\n");
|
ERR("Exit co_IntWaitMessage on error!\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (Status == STATUS_USER_APC || Status == STATUS_TIMEOUT)
|
if (Status == STATUS_USER_APC || Status == STATUS_TIMEOUT)
|
||||||
|
@ -1124,13 +1123,13 @@ UserPostMessage( HWND Wnd,
|
||||||
pti = Window->head.pti;
|
pti = Window->head.pti;
|
||||||
if ( pti->TIF_flags & TIF_INCLEANUP )
|
if ( pti->TIF_flags & TIF_INCLEANUP )
|
||||||
{
|
{
|
||||||
DPRINT1("Attempted to post message to window 0x%x when the thread is in cleanup!\n", Wnd);
|
ERR("Attempted to post message to window 0x%x when the thread is in cleanup!\n", Wnd);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( Window->state & WNDS_DESTROYED )
|
if ( Window->state & WNDS_DESTROYED )
|
||||||
{
|
{
|
||||||
DPRINT1("Attempted to post message to window 0x%x that is being destroyed!\n", Wnd);
|
ERR("Attempted to post message to window 0x%x that is being destroyed!\n", Wnd);
|
||||||
/* FIXME - last error code? */
|
/* FIXME - last error code? */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1214,7 +1213,7 @@ co_IntSendMessageTimeoutSingle( HWND hWnd,
|
||||||
|
|
||||||
if (! NT_SUCCESS(PackParam(&lParamPacked, Msg, wParam, lParam, FALSE)))
|
if (! NT_SUCCESS(PackParam(&lParamPacked, Msg, wParam, lParam, FALSE)))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to pack message parameters\n");
|
ERR("Failed to pack message parameters\n");
|
||||||
RETURN( FALSE);
|
RETURN( FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1234,7 +1233,7 @@ co_IntSendMessageTimeoutSingle( HWND hWnd,
|
||||||
|
|
||||||
if (! NT_SUCCESS(UnpackParam(lParamPacked, Msg, wParam, lParam, FALSE)))
|
if (! NT_SUCCESS(UnpackParam(lParamPacked, Msg, wParam, lParam, FALSE)))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to unpack message parameters\n");
|
ERR("Failed to unpack message parameters\n");
|
||||||
RETURN( TRUE);
|
RETURN( TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1251,7 +1250,7 @@ co_IntSendMessageTimeoutSingle( HWND hWnd,
|
||||||
if (Window->state & WNDS_DESTROYED)
|
if (Window->state & WNDS_DESTROYED)
|
||||||
{
|
{
|
||||||
/* FIXME - last error? */
|
/* FIXME - last error? */
|
||||||
DPRINT1("Attempted to send message to window 0x%x that is being destroyed!\n", hWnd);
|
ERR("Attempted to send message to window 0x%x that is being destroyed!\n", hWnd);
|
||||||
RETURN( FALSE);
|
RETURN( FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1395,7 +1394,7 @@ co_IntSendMessageWithCallBack( HWND hWnd,
|
||||||
if (Window->state & WNDS_DESTROYED)
|
if (Window->state & WNDS_DESTROYED)
|
||||||
{
|
{
|
||||||
/* FIXME - last error? */
|
/* FIXME - last error? */
|
||||||
DPRINT1("Attempted to send message to window 0x%x that is being destroyed!\n", hWnd);
|
ERR("Attempted to send message to window 0x%x that is being destroyed!\n", hWnd);
|
||||||
RETURN(FALSE);
|
RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1419,7 +1418,7 @@ co_IntSendMessageWithCallBack( HWND hWnd,
|
||||||
|
|
||||||
if (! NT_SUCCESS(PackParam(&lParamPacked, Msg, wParam, lParam, Window->head.pti->MessageQueue != Win32Thread->MessageQueue)))
|
if (! NT_SUCCESS(PackParam(&lParamPacked, Msg, wParam, lParam, Window->head.pti->MessageQueue != Win32Thread->MessageQueue)))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to pack message parameters\n");
|
ERR("Failed to pack message parameters\n");
|
||||||
RETURN( FALSE);
|
RETURN( FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1465,14 +1464,14 @@ co_IntSendMessageWithCallBack( HWND hWnd,
|
||||||
{
|
{
|
||||||
if (! NT_SUCCESS(UnpackParam(lParamPacked, Msg, wParam, lParam, FALSE)))
|
if (! NT_SUCCESS(UnpackParam(lParamPacked, Msg, wParam, lParam, FALSE)))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to unpack message parameters\n");
|
ERR("Failed to unpack message parameters\n");
|
||||||
}
|
}
|
||||||
RETURN(TRUE);
|
RETURN(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!(Message = ExAllocatePoolWithTag(NonPagedPool, sizeof(USER_SENT_MESSAGE), TAG_USRMSG)))
|
if(!(Message = ExAllocatePoolWithTag(NonPagedPool, sizeof(USER_SENT_MESSAGE), TAG_USRMSG)))
|
||||||
{
|
{
|
||||||
DPRINT1("MsqSendMessage(): Not enough memory to allocate a message");
|
ERR("MsqSendMessage(): Not enough memory to allocate a message");
|
||||||
RETURN( FALSE);
|
RETURN( FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1578,7 +1577,7 @@ co_IntDoSendMessage( HWND hWnd,
|
||||||
/* Check for an exiting window. */
|
/* Check for an exiting window. */
|
||||||
if (Window && Window->state & WNDS_DESTROYED)
|
if (Window && Window->state & WNDS_DESTROYED)
|
||||||
{
|
{
|
||||||
DPRINT1("co_IntDoSendMessage Window Exiting!\n");
|
ERR("co_IntDoSendMessage Window Exiting!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* See if the current thread can handle the message */
|
/* See if the current thread can handle the message */
|
||||||
|
@ -1740,7 +1739,7 @@ NtUserDragDetect(
|
||||||
WORD wDragWidth, wDragHeight;
|
WORD wDragWidth, wDragHeight;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserDragDetect(%x)\n", hWnd);
|
TRACE("Enter NtUserDragDetect(%x)\n", hWnd);
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
wDragWidth = UserGetSystemMetrics(SM_CXDRAG);
|
wDragWidth = UserGetSystemMetrics(SM_CXDRAG);
|
||||||
|
@ -1794,7 +1793,7 @@ NtUserDragDetect(
|
||||||
RETURN( FALSE);
|
RETURN( FALSE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserDragDetect, ret=%i\n",_ret_);
|
TRACE("Leave NtUserDragDetect, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1839,9 +1838,9 @@ NtUserWaitMessage(VOID)
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
DPRINT("NtUserWaitMessage Enter\n");
|
TRACE("NtUserWaitMessage Enter\n");
|
||||||
ret = co_IntWaitMessage(NULL, 0, 0);
|
ret = co_IntWaitMessage(NULL, 0, 0);
|
||||||
DPRINT("NtUserWaitMessage Leave\n");
|
TRACE("NtUserWaitMessage Leave\n");
|
||||||
UserLeave();
|
UserLeave();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -2165,7 +2164,7 @@ NtUserMessageCall( HWND hWnd,
|
||||||
if (!(Ret = co_IntSendMessageWithCallBack(hWnd, Msg, wParam, lParam,
|
if (!(Ret = co_IntSendMessageWithCallBack(hWnd, Msg, wParam, lParam,
|
||||||
CallBackInfo.CallBack, CallBackInfo.Context, &uResult)))
|
CallBackInfo.CallBack, CallBackInfo.Context, &uResult)))
|
||||||
{
|
{
|
||||||
DPRINT1("Callback failure!\n");
|
ERR("Callback failure!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2261,7 +2260,7 @@ NtUserMessageCall( HWND hWnd,
|
||||||
CWP.message = Msg;
|
CWP.message = Msg;
|
||||||
CWP.wParam = wParam;
|
CWP.wParam = wParam;
|
||||||
CWP.lParam = lParam;
|
CWP.lParam = lParam;
|
||||||
DPRINT("WH_CALLWNDPROC: Hook %x NextHook %x\n", Hook, NextObj );
|
TRACE("WH_CALLWNDPROC: Hook %x NextHook %x\n", Hook, NextObj );
|
||||||
|
|
||||||
lResult = co_IntCallHookProc( Hook->HookId,
|
lResult = co_IntCallHookProc( Hook->HookId,
|
||||||
HC_ACTION,
|
HC_ACTION,
|
||||||
|
@ -2387,8 +2386,8 @@ NtUserWaitForInputIdle( IN HANDLE hProcess,
|
||||||
pti->pClientInfo->dwTIFlags = pti->TIF_flags;
|
pti->pClientInfo->dwTIFlags = pti->TIF_flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("WFII: ppi 0x%x\n",W32Process);
|
TRACE("WFII: ppi 0x%x\n",W32Process);
|
||||||
DPRINT("WFII: waiting for %p\n", Handles[1] );
|
TRACE("WFII: waiting for %p\n", Handles[1] );
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
UserLeave();
|
UserLeave();
|
||||||
|
@ -2418,17 +2417,17 @@ NtUserWaitForInputIdle( IN HANDLE hProcess,
|
||||||
{
|
{
|
||||||
MSG Msg;
|
MSG Msg;
|
||||||
co_IntGetPeekMessage( &Msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE, FALSE);
|
co_IntGetPeekMessage( &Msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE, FALSE);
|
||||||
DPRINT1("WFII: WAIT 2\n");
|
ERR("WFII: WAIT 2\n");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STATUS_TIMEOUT:
|
case STATUS_TIMEOUT:
|
||||||
DPRINT1("WFII: timeout\n");
|
ERR("WFII: timeout\n");
|
||||||
case WAIT_FAILED:
|
case WAIT_FAILED:
|
||||||
goto WaitExit;
|
goto WaitExit;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DPRINT1("WFII: finished\n");
|
ERR("WFII: finished\n");
|
||||||
Status = STATUS_SUCCESS;
|
Status = STATUS_SUCCESS;
|
||||||
goto WaitExit;
|
goto WaitExit;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,9 +11,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserSysparams);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
|
|
||||||
static BOOL Setup = FALSE;
|
static BOOL Setup = FALSE;
|
||||||
|
|
||||||
|
@ -80,7 +78,7 @@ InitMetrics(VOID)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Window sizes */
|
/* Window sizes */
|
||||||
DPRINT("ncm.iCaptionWidth=%d,GetSystemMetrics(SM_CYSIZE)=%d,GetSystemMetrics(SM_CXFRAME)=%d,avcwCaption=%d \n",
|
TRACE("ncm.iCaptionWidth=%d,GetSystemMetrics(SM_CYSIZE)=%d,GetSystemMetrics(SM_CXFRAME)=%d,avcwCaption=%d \n",
|
||||||
gspv.ncm.iCaptionWidth, piSysMet[SM_CYSIZE],piSysMet[SM_CXFRAME], gspv.tmCaptionFont.tmAveCharWidth);
|
gspv.ncm.iCaptionWidth, piSysMet[SM_CYSIZE],piSysMet[SM_CXFRAME], gspv.tmCaptionFont.tmAveCharWidth);
|
||||||
|
|
||||||
piSysMet[SM_CXMIN] = 3 * max(gspv.ncm.iCaptionWidth, 8) // 112
|
piSysMet[SM_CXMIN] = 3 * max(gspv.ncm.iCaptionWidth, 8) // 112
|
||||||
|
@ -185,7 +183,7 @@ UserGetSystemMetrics(ULONG Index)
|
||||||
{
|
{
|
||||||
ASSERT(gpsi);
|
ASSERT(gpsi);
|
||||||
ASSERT(Setup);
|
ASSERT(Setup);
|
||||||
DPRINT("UserGetSystemMetrics(%d)\n", Index);
|
TRACE("UserGetSystemMetrics(%d)\n", Index);
|
||||||
|
|
||||||
/* Get metrics from array */
|
/* Get metrics from array */
|
||||||
if (Index < SM_CMETRICS)
|
if (Index < SM_CMETRICS)
|
||||||
|
@ -206,7 +204,7 @@ UserGetSystemMetrics(ULONG Index)
|
||||||
return 0; // FIXME
|
return 0; // FIXME
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT1("UserGetSystemMetrics() called with invalid index %d\n", Index);
|
ERR("UserGetSystemMetrics() called with invalid index %d\n", Index);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserMisc);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
|
|
||||||
SHORT
|
SHORT
|
||||||
FASTCALL
|
FASTCALL
|
||||||
|
@ -56,7 +54,7 @@ IntGdiGetLanguageID(VOID)
|
||||||
}
|
}
|
||||||
ZwClose(KeyHandle);
|
ZwClose(KeyHandle);
|
||||||
}
|
}
|
||||||
DPRINT("Language ID = %x\n",Ret);
|
TRACE("Language ID = %x\n",Ret);
|
||||||
return (SHORT) Ret;
|
return (SHORT) Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +67,7 @@ NtUserGetThreadState(
|
||||||
{
|
{
|
||||||
DWORD_PTR ret = 0;
|
DWORD_PTR ret = 0;
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetThreadState\n");
|
TRACE("Enter NtUserGetThreadState\n");
|
||||||
if (Routine != THREADSTATE_GETTHREADINFO)
|
if (Routine != THREADSTATE_GETTHREADINFO)
|
||||||
{
|
{
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
@ -104,7 +102,7 @@ NtUserGetThreadState(
|
||||||
{
|
{
|
||||||
PUSER_SENT_MESSAGE Message =
|
PUSER_SENT_MESSAGE Message =
|
||||||
((PTHREADINFO)PsGetCurrentThreadWin32Thread())->pusmCurrent;
|
((PTHREADINFO)PsGetCurrentThreadWin32Thread())->pusmCurrent;
|
||||||
DPRINT1("THREADSTATE_INSENDMESSAGE\n");
|
ERR("THREADSTATE_INSENDMESSAGE\n");
|
||||||
|
|
||||||
ret = ISMEX_NOSEND;
|
ret = ISMEX_NOSEND;
|
||||||
if (Message)
|
if (Message)
|
||||||
|
@ -144,7 +142,7 @@ NtUserGetThreadState(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Leave NtUserGetThreadState, ret=%i\n", ret);
|
TRACE("Leave NtUserGetThreadState, ret=%i\n", ret);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -183,13 +181,13 @@ NtUserGetDoubleClickTime(VOID)
|
||||||
{
|
{
|
||||||
UINT Result;
|
UINT Result;
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetDoubleClickTime\n");
|
TRACE("Enter NtUserGetDoubleClickTime\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
// FIXME: Check if this works on non-interactive winsta
|
// FIXME: Check if this works on non-interactive winsta
|
||||||
Result = gspv.iDblClickTime;
|
Result = gspv.iDblClickTime;
|
||||||
|
|
||||||
DPRINT("Leave NtUserGetDoubleClickTime, ret=%i\n", Result);
|
TRACE("Leave NtUserGetDoubleClickTime, ret=%i\n", Result);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
@ -210,7 +208,7 @@ NtUserGetGUIThreadInfo(
|
||||||
|
|
||||||
DECLARE_RETURN(BOOLEAN);
|
DECLARE_RETURN(BOOLEAN);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetGUIThreadInfo\n");
|
TRACE("Enter NtUserGetGUIThreadInfo\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
Status = MmCopyFromCaller(&SafeGui, lpgui, sizeof(DWORD));
|
Status = MmCopyFromCaller(&SafeGui, lpgui, sizeof(DWORD));
|
||||||
|
@ -296,7 +294,7 @@ NtUserGetGUIThreadInfo(
|
||||||
RETURN( TRUE);
|
RETURN( TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetGUIThreadInfo, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetGUIThreadInfo, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -314,7 +312,7 @@ NtUserGetGuiResources(
|
||||||
DWORD Ret = 0;
|
DWORD Ret = 0;
|
||||||
DECLARE_RETURN(DWORD);
|
DECLARE_RETURN(DWORD);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetGuiResources\n");
|
TRACE("Enter NtUserGetGuiResources\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
Status = ObReferenceObjectByHandle(hProcess,
|
Status = ObReferenceObjectByHandle(hProcess,
|
||||||
|
@ -362,7 +360,7 @@ NtUserGetGuiResources(
|
||||||
RETURN( Ret);
|
RETURN( Ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetGuiResources, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetGuiResources, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
|
DBG_DEFAULT_CHANNEL(UserMonitor);
|
||||||
|
|
||||||
/* FIXME: find include file for these */
|
/* FIXME: find include file for these */
|
||||||
#define MONITORINFOF_PRIMARY 1
|
#define MONITORINFOF_PRIMARY 1
|
||||||
#define MONITOR_DEFAULTTONULL 0
|
#define MONITOR_DEFAULTTONULL 0
|
||||||
|
@ -33,7 +35,7 @@ NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
InitMonitorImpl()
|
InitMonitorImpl()
|
||||||
{
|
{
|
||||||
DPRINT("Initializing monitor implementation...\n");
|
TRACE("Initializing monitor implementation...\n");
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +43,7 @@ InitMonitorImpl()
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
CleanupMonitorImpl()
|
CleanupMonitorImpl()
|
||||||
{
|
{
|
||||||
DPRINT("Cleaning up monitor implementation...\n");
|
TRACE("Cleaning up monitor implementation...\n");
|
||||||
/* FIXME: Destroy monitor objects? */
|
/* FIXME: Destroy monitor objects? */
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
|
@ -137,20 +139,20 @@ IntAttachMonitor(IN PDEVOBJ *pGdiDevice,
|
||||||
PMONITOR Monitor;
|
PMONITOR Monitor;
|
||||||
WCHAR Buffer[CCHDEVICENAME];
|
WCHAR Buffer[CCHDEVICENAME];
|
||||||
|
|
||||||
DPRINT("Attaching monitor...\n");
|
TRACE("Attaching monitor...\n");
|
||||||
|
|
||||||
/* create new monitor object */
|
/* create new monitor object */
|
||||||
Monitor = IntCreateMonitorObject();
|
Monitor = IntCreateMonitorObject();
|
||||||
if (Monitor == NULL)
|
if (Monitor == NULL)
|
||||||
{
|
{
|
||||||
DPRINT("Couldnt create monitor object\n");
|
TRACE("Couldnt create monitor object\n");
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
_snwprintf(Buffer, CCHDEVICENAME, L"\\\\.\\DISPLAY%d", DisplayNumber + 1);
|
_snwprintf(Buffer, CCHDEVICENAME, L"\\\\.\\DISPLAY%d", DisplayNumber + 1);
|
||||||
if (!RtlCreateUnicodeString(&Monitor->DeviceName, Buffer))
|
if (!RtlCreateUnicodeString(&Monitor->DeviceName, Buffer))
|
||||||
{
|
{
|
||||||
DPRINT("Couldn't duplicate monitor name!\n");
|
TRACE("Couldn't duplicate monitor name!\n");
|
||||||
UserDereferenceObject(Monitor);
|
UserDereferenceObject(Monitor);
|
||||||
UserDeleteObject(UserHMGetHandle(Monitor), otMonitor);
|
UserDeleteObject(UserHMGetHandle(Monitor), otMonitor);
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
@ -161,14 +163,14 @@ IntAttachMonitor(IN PDEVOBJ *pGdiDevice,
|
||||||
|
|
||||||
if (gMonitorList == NULL)
|
if (gMonitorList == NULL)
|
||||||
{
|
{
|
||||||
DPRINT("Primary monitor is beeing attached\n");
|
TRACE("Primary monitor is beeing attached\n");
|
||||||
Monitor->IsPrimary = TRUE;
|
Monitor->IsPrimary = TRUE;
|
||||||
gMonitorList = Monitor;
|
gMonitorList = Monitor;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PMONITOR p;
|
PMONITOR p;
|
||||||
DPRINT("Additional monitor is beeing attached\n");
|
TRACE("Additional monitor is beeing attached\n");
|
||||||
for (p = gMonitorList; p->Next != NULL; p = p->Next)
|
for (p = gMonitorList; p->Next != NULL; p = p->Next)
|
||||||
{
|
{
|
||||||
p->Next = Monitor;
|
p->Next = Monitor;
|
||||||
|
@ -362,7 +364,7 @@ IntGetMonitorsFromRect(OPTIONAL IN LPCRECTL pRect,
|
||||||
MonitorRect = Monitor->rcMonitor;
|
MonitorRect = Monitor->rcMonitor;
|
||||||
ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&Monitor->Lock);
|
ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(&Monitor->Lock);
|
||||||
|
|
||||||
DPRINT("MonitorRect: left = %d, top = %d, right = %d, bottom = %d\n",
|
TRACE("MonitorRect: left = %d, top = %d, right = %d, bottom = %d\n",
|
||||||
MonitorRect.left, MonitorRect.top, MonitorRect.right, MonitorRect.bottom);
|
MonitorRect.left, MonitorRect.top, MonitorRect.right, MonitorRect.bottom);
|
||||||
|
|
||||||
if (flags == MONITOR_DEFAULTTOPRIMARY && Monitor->IsPrimary)
|
if (flags == MONITOR_DEFAULTTOPRIMARY && Monitor->IsPrimary)
|
||||||
|
@ -494,7 +496,7 @@ NtUserEnumDisplayMonitors(
|
||||||
status = MmCopyFromCaller(&rect, pRect, sizeof (RECT));
|
status = MmCopyFromCaller(&rect, pRect, sizeof (RECT));
|
||||||
if (!NT_SUCCESS(status))
|
if (!NT_SUCCESS(status))
|
||||||
{
|
{
|
||||||
DPRINT("MmCopyFromCaller() failed!\n");
|
TRACE("MmCopyFromCaller() failed!\n");
|
||||||
SetLastNtError(status);
|
SetLastNtError(status);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -509,7 +511,7 @@ NtUserEnumDisplayMonitors(
|
||||||
dc = DC_LockDc(hDC);
|
dc = DC_LockDc(hDC);
|
||||||
if (dc == NULL)
|
if (dc == NULL)
|
||||||
{
|
{
|
||||||
DPRINT("DC_LockDc() failed!\n");
|
TRACE("DC_LockDc() failed!\n");
|
||||||
/* FIXME: setlasterror? */
|
/* FIXME: setlasterror? */
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -518,7 +520,7 @@ NtUserEnumDisplayMonitors(
|
||||||
|
|
||||||
if (regionType == 0)
|
if (regionType == 0)
|
||||||
{
|
{
|
||||||
DPRINT("NtGdiGetRgnBox() failed!\n");
|
TRACE("NtGdiGetRgnBox() failed!\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (regionType == NULLREGION)
|
if (regionType == NULLREGION)
|
||||||
|
@ -555,7 +557,7 @@ NtUserEnumDisplayMonitors(
|
||||||
if (numMonitors == 0 || listSize == 0 ||
|
if (numMonitors == 0 || listSize == 0 ||
|
||||||
(hMonitorList == NULL && monitorRectList == NULL))
|
(hMonitorList == NULL && monitorRectList == NULL))
|
||||||
{
|
{
|
||||||
DPRINT("numMonitors = %d\n", numMonitors);
|
TRACE("numMonitors = %d\n", numMonitors);
|
||||||
return numMonitors;
|
return numMonitors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -653,13 +655,13 @@ NtUserGetMonitorInfo(
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetMonitorInfo\n");
|
TRACE("Enter NtUserGetMonitorInfo\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
/* get monitor object */
|
/* get monitor object */
|
||||||
if (!(Monitor = UserGetMonitorObject(hMonitor)))
|
if (!(Monitor = UserGetMonitorObject(hMonitor)))
|
||||||
{
|
{
|
||||||
DPRINT("Couldnt find monitor 0x%lx\n", hMonitor);
|
TRACE("Couldnt find monitor 0x%lx\n", hMonitor);
|
||||||
RETURN(FALSE);
|
RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -704,17 +706,17 @@ NtUserGetMonitorInfo(
|
||||||
Status = MmCopyToCaller(pMonitorInfo, &MonitorInfo, MonitorInfo.cbSize);
|
Status = MmCopyToCaller(pMonitorInfo, &MonitorInfo, MonitorInfo.cbSize);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("GetMonitorInfo: MmCopyToCaller failed\n");
|
TRACE("GetMonitorInfo: MmCopyToCaller failed\n");
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
RETURN(FALSE);
|
RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("GetMonitorInfo: success\n");
|
TRACE("GetMonitorInfo: success\n");
|
||||||
|
|
||||||
RETURN(TRUE);
|
RETURN(TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetMonitorInfo, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetMonitorInfo, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -864,7 +866,7 @@ NtUserMonitorFromWindow(
|
||||||
RECTL Rect;
|
RECTL Rect;
|
||||||
DECLARE_RETURN(HMONITOR);
|
DECLARE_RETURN(HMONITOR);
|
||||||
|
|
||||||
DPRINT("Enter NtUserMonitorFromWindow\n");
|
TRACE("Enter NtUserMonitorFromWindow\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -885,7 +887,7 @@ NtUserMonitorFromWindow(
|
||||||
RETURN(hMonitor);
|
RETURN(hMonitor);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserMonitorFromWindow, ret=%i\n",_ret_);
|
TRACE("Leave NtUserMonitorFromWindow, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserMsgQ);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
VOID FASTCALL DoTheScreenSaver(VOID);
|
VOID FASTCALL DoTheScreenSaver(VOID);
|
||||||
|
|
||||||
|
@ -61,7 +60,7 @@ IntChildrenWindowFromPoint(PWND pWndTop, INT x, INT y)
|
||||||
{
|
{
|
||||||
if (pWnd->state2 & WNDS2_INDESTROY || pWnd->state & WNDS_DESTROYED )
|
if (pWnd->state2 & WNDS2_INDESTROY || pWnd->state & WNDS_DESTROYED )
|
||||||
{
|
{
|
||||||
DPRINT("The Window is in DESTROY!\n");
|
TRACE("The Window is in DESTROY!\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +92,7 @@ IntTopLevelWindowFromPoint(INT x, INT y)
|
||||||
{
|
{
|
||||||
if (pWnd->state2 & WNDS2_INDESTROY || pWnd->state & WNDS_DESTROYED)
|
if (pWnd->state2 & WNDS2_INDESTROY || pWnd->state & WNDS_DESTROYED)
|
||||||
{
|
{
|
||||||
DPRINT("The Window is in DESTROY!\n");
|
TRACE("The Window is in DESTROY!\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +157,7 @@ UserSetCursor(
|
||||||
{
|
{
|
||||||
/* Remove the cursor */
|
/* Remove the cursor */
|
||||||
GreMovePointer(hdcScreen, -1, -1);
|
GreMovePointer(hdcScreen, -1, -1);
|
||||||
DPRINT("Removing pointer!\n");
|
TRACE("Removing pointer!\n");
|
||||||
}
|
}
|
||||||
IntGetSysCursorInfo()->CurrentCursorObject = NewCursor;
|
IntGetSysCursorInfo()->CurrentCursorObject = NewCursor;
|
||||||
}
|
}
|
||||||
|
@ -204,13 +203,13 @@ int UserShowCursor(BOOL bShow)
|
||||||
{
|
{
|
||||||
/* Show the pointer */
|
/* Show the pointer */
|
||||||
GreMovePointer(hdcScreen, gpsi->ptCursor.x, gpsi->ptCursor.y);
|
GreMovePointer(hdcScreen, gpsi->ptCursor.x, gpsi->ptCursor.y);
|
||||||
DPRINT("Showing pointer!\n");
|
TRACE("Showing pointer!\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Remove the pointer */
|
/* Remove the pointer */
|
||||||
GreMovePointer(hdcScreen, -1, -1);
|
GreMovePointer(hdcScreen, -1, -1);
|
||||||
DPRINT("Removing pointer!\n");
|
TRACE("Removing pointer!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update global info */
|
/* Update global info */
|
||||||
|
@ -245,7 +244,7 @@ DWORD FASTCALL UserGetKeyState(DWORD key)
|
||||||
/* change the input key state for a given key */
|
/* change the input key state for a given key */
|
||||||
static void set_input_key_state( PUSER_MESSAGE_QUEUE MessageQueue, UCHAR key, BOOL down )
|
static void set_input_key_state( PUSER_MESSAGE_QUEUE MessageQueue, UCHAR key, BOOL down )
|
||||||
{
|
{
|
||||||
DPRINT("set_input_key_state key:%d, down:%d\n", key, down);
|
TRACE("set_input_key_state key:%d, down:%d\n", key, down);
|
||||||
|
|
||||||
if (down)
|
if (down)
|
||||||
{
|
{
|
||||||
|
@ -267,7 +266,7 @@ static void update_input_key_state( PUSER_MESSAGE_QUEUE MessageQueue, MSG* msg )
|
||||||
UCHAR key;
|
UCHAR key;
|
||||||
BOOL down = 0;
|
BOOL down = 0;
|
||||||
|
|
||||||
DPRINT("update_input_key_state message:%d\n", msg->message);
|
TRACE("update_input_key_state message:%d\n", msg->message);
|
||||||
|
|
||||||
switch (msg->message)
|
switch (msg->message)
|
||||||
{
|
{
|
||||||
|
@ -349,7 +348,7 @@ IntMsqSetWakeMask(DWORD WakeMask)
|
||||||
if ( (Win32Thread->pcti->fsChangeBits & LOWORD(WakeMask)) ||
|
if ( (Win32Thread->pcti->fsChangeBits & LOWORD(WakeMask)) ||
|
||||||
( (dwFlags & MWMO_INPUTAVAILABLE) && (Win32Thread->pcti->fsWakeBits & LOWORD(WakeMask)) ) )
|
( (dwFlags & MWMO_INPUTAVAILABLE) && (Win32Thread->pcti->fsWakeBits & LOWORD(WakeMask)) ) )
|
||||||
{
|
{
|
||||||
DPRINT1("Chg 0x%x Wake 0x%x Mask 0x%x\n",Win32Thread->pcti->fsChangeBits, Win32Thread->pcti->fsWakeBits, WakeMask);
|
ERR("Chg 0x%x Wake 0x%x Mask 0x%x\n",Win32Thread->pcti->fsChangeBits, Win32Thread->pcti->fsWakeBits, WakeMask);
|
||||||
KeSetEvent(MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE); // Wake it up!
|
KeSetEvent(MessageQueue->NewMessages, IO_NO_INCREMENT, FALSE); // Wake it up!
|
||||||
return MessageEventHandle;
|
return MessageEventHandle;
|
||||||
}
|
}
|
||||||
|
@ -600,7 +599,7 @@ co_MsqInsertMouseMessage(MSG* Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT("Posting mouse message to hwnd=0x%x!\n", UserHMGetHandle(pwnd));
|
TRACE("Posting mouse message to hwnd=0x%x!\n", UserHMGetHandle(pwnd));
|
||||||
MsqPostMessage(pwnd->head.pti->MessageQueue, Msg, TRUE, QS_MOUSEBUTTON);
|
MsqPostMessage(pwnd->head.pti->MessageQueue, Msg, TRUE, QS_MOUSEBUTTON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -631,7 +630,7 @@ co_MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
LARGE_INTEGER LargeTickCount;
|
LARGE_INTEGER LargeTickCount;
|
||||||
KBDLLHOOKSTRUCT KbdHookData;
|
KBDLLHOOKSTRUCT KbdHookData;
|
||||||
|
|
||||||
DPRINT("MsqPostKeyboardMessage(uMsg 0x%x, wParam 0x%x, lParam 0x%x)\n",
|
TRACE("MsqPostKeyboardMessage(uMsg 0x%x, wParam 0x%x, lParam 0x%x)\n",
|
||||||
uMsg, wParam, lParam);
|
uMsg, wParam, lParam);
|
||||||
|
|
||||||
// Condition may arise when calling MsqPostMessage and waiting for an event.
|
// Condition may arise when calling MsqPostMessage and waiting for an event.
|
||||||
|
@ -663,21 +662,21 @@ co_MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
KbdHookData.dwExtraInfo = 0;
|
KbdHookData.dwExtraInfo = 0;
|
||||||
if (co_HOOK_CallHooks(WH_KEYBOARD_LL, HC_ACTION, Msg.message, (LPARAM) &KbdHookData))
|
if (co_HOOK_CallHooks(WH_KEYBOARD_LL, HC_ACTION, Msg.message, (LPARAM) &KbdHookData))
|
||||||
{
|
{
|
||||||
DPRINT1("Kbd msg %d wParam %d lParam 0x%08x dropped by WH_KEYBOARD_LL hook\n",
|
ERR("Kbd msg %d wParam %d lParam 0x%08x dropped by WH_KEYBOARD_LL hook\n",
|
||||||
Msg.message, Msg.wParam, Msg.lParam);
|
Msg.message, Msg.wParam, Msg.lParam);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FocusMessageQueue == NULL)
|
if (FocusMessageQueue == NULL)
|
||||||
{
|
{
|
||||||
DPRINT("No focus message queue\n");
|
TRACE("No focus message queue\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FocusMessageQueue->FocusWindow != (HWND)0)
|
if (FocusMessageQueue->FocusWindow != (HWND)0)
|
||||||
{
|
{
|
||||||
Msg.hwnd = FocusMessageQueue->FocusWindow;
|
Msg.hwnd = FocusMessageQueue->FocusWindow;
|
||||||
DPRINT("Msg.hwnd = %x\n", Msg.hwnd);
|
TRACE("Msg.hwnd = %x\n", Msg.hwnd);
|
||||||
|
|
||||||
FocusMessageQueue->Desktop->pDeskInfo->LastInputWasKbd = TRUE;
|
FocusMessageQueue->Desktop->pDeskInfo->LastInputWasKbd = TRUE;
|
||||||
|
|
||||||
|
@ -686,7 +685,7 @@ co_MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT("Invalid focus window handle\n");
|
TRACE("Invalid focus window handle\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -830,7 +829,7 @@ co_MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue)
|
||||||
/* The message has not been processed yet, reinsert it. */
|
/* The message has not been processed yet, reinsert it. */
|
||||||
RemoveEntryList(&Message->ListEntry);
|
RemoveEntryList(&Message->ListEntry);
|
||||||
InsertTailList(&Message->CallBackSenderQueue->SentMessagesListHead, &Message->ListEntry);
|
InsertTailList(&Message->CallBackSenderQueue->SentMessagesListHead, &Message->ListEntry);
|
||||||
DPRINT("Callback Message not processed yet. Requeuing the message\n");
|
TRACE("Callback Message not processed yet. Requeuing the message\n");
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -958,7 +957,7 @@ MsqRemoveWindowMessagesFromQueue(PVOID pWindow)
|
||||||
ListEntry);
|
ListEntry);
|
||||||
if(SentMessage->Msg.hwnd == Window->head.h)
|
if(SentMessage->Msg.hwnd == Window->head.h)
|
||||||
{
|
{
|
||||||
DPRINT("Notify the sender and remove a message from the queue that had not been dispatched\n");
|
TRACE("Notify the sender and remove a message from the queue that had not been dispatched\n");
|
||||||
|
|
||||||
RemoveEntryList(&SentMessage->ListEntry);
|
RemoveEntryList(&SentMessage->ListEntry);
|
||||||
ClearMsgBitsMask(MessageQueue, SentMessage->QS_Flags);
|
ClearMsgBitsMask(MessageQueue, SentMessage->QS_Flags);
|
||||||
|
@ -1024,7 +1023,7 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
|
||||||
|
|
||||||
if(!(Message = ExAllocatePoolWithTag(PagedPool, sizeof(USER_SENT_MESSAGE), TAG_USRMSG)))
|
if(!(Message = ExAllocatePoolWithTag(PagedPool, sizeof(USER_SENT_MESSAGE), TAG_USRMSG)))
|
||||||
{
|
{
|
||||||
DPRINT1("MsqSendMessage(): Not enough memory to allocate a message");
|
ERR("MsqSendMessage(): Not enough memory to allocate a message");
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1126,7 +1125,7 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
|
||||||
Entry = Entry->Flink;
|
Entry = Entry->Flink;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("MsqSendMessage (blocked) timed out 1\n");
|
TRACE("MsqSendMessage (blocked) timed out 1\n");
|
||||||
}
|
}
|
||||||
while (co_MsqDispatchOneSentMessage(ThreadQueue))
|
while (co_MsqDispatchOneSentMessage(ThreadQueue))
|
||||||
;
|
;
|
||||||
|
@ -1186,7 +1185,7 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
|
||||||
Entry = Entry->Flink;
|
Entry = Entry->Flink;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("MsqSendMessage timed out 2\n");
|
TRACE("MsqSendMessage timed out 2\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
while (co_MsqDispatchOneSentMessage(ThreadQueue))
|
while (co_MsqDispatchOneSentMessage(ThreadQueue))
|
||||||
|
@ -1302,7 +1301,7 @@ BOOL co_IntProcessMouseMessage(MSG* msg, BOOL* RemoveMessages, UINT first, UINT
|
||||||
pwndMsg = co_WinPosWindowFromPoint(pwndMsg, &msg->pt, &hittest);
|
pwndMsg = co_WinPosWindowFromPoint(pwndMsg, &msg->pt, &hittest);
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Got mouse message for 0x%x, hittest: 0x%x\n", msg->hwnd, hittest );
|
TRACE("Got mouse message for 0x%x, hittest: 0x%x\n", msg->hwnd, hittest );
|
||||||
|
|
||||||
if (pwndMsg == NULL || pwndMsg->head.pti != pti)
|
if (pwndMsg == NULL || pwndMsg->head.pti != pti)
|
||||||
{
|
{
|
||||||
|
@ -1375,7 +1374,7 @@ BOOL co_IntProcessMouseMessage(MSG* msg, BOOL* RemoveMessages, UINT first, UINT
|
||||||
|
|
||||||
if (!((first == 0 && last == 0) || (message >= first || message <= last)))
|
if (!((first == 0 && last == 0) || (message >= first || message <= last)))
|
||||||
{
|
{
|
||||||
DPRINT("Message out of range!!!\n");
|
TRACE("Message out of range!!!\n");
|
||||||
RETURN(FALSE);
|
RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1386,7 +1385,7 @@ BOOL co_IntProcessMouseMessage(MSG* msg, BOOL* RemoveMessages, UINT first, UINT
|
||||||
{
|
{
|
||||||
if (!((first == 0 && last == 0) || (message >= first || message <= last)))
|
if (!((first == 0 && last == 0) || (message >= first || message <= last)))
|
||||||
{
|
{
|
||||||
DPRINT("Message out of range!!!\n");
|
TRACE("Message out of range!!!\n");
|
||||||
RETURN(FALSE);
|
RETURN(FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1444,7 +1443,7 @@ BOOL co_IntProcessMouseMessage(MSG* msg, BOOL* RemoveMessages, UINT first, UINT
|
||||||
hook.dwExtraInfo = 0/*extra_info*/;
|
hook.dwExtraInfo = 0/*extra_info*/;
|
||||||
co_HOOK_CallHooks( WH_CBT, HCBT_CLICKSKIPPED, message, (LPARAM)&hook );
|
co_HOOK_CallHooks( WH_CBT, HCBT_CLICKSKIPPED, message, (LPARAM)&hook );
|
||||||
|
|
||||||
DPRINT1("WH_MOUSE dorpped mouse message!\n");
|
ERR("WH_MOUSE dorpped mouse message!\n");
|
||||||
|
|
||||||
/* Remove and skip message */
|
/* Remove and skip message */
|
||||||
*RemoveMessages = TRUE;
|
*RemoveMessages = TRUE;
|
||||||
|
@ -1513,7 +1512,7 @@ BOOL co_IntProcessMouseMessage(MSG* msg, BOOL* RemoveMessages, UINT first, UINT
|
||||||
if(!co_IntMouseActivateWindow(pwndMsg)) eatMsg = TRUE;
|
if(!co_IntMouseActivateWindow(pwndMsg)) eatMsg = TRUE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
DPRINT1( "unknown WM_MOUSEACTIVATE code %d\n", ret );
|
ERR( "unknown WM_MOUSEACTIVATE code %d\n", ret );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1575,7 +1574,7 @@ BOOL co_IntProcessKeyboardMessage(MSG* Msg, BOOL* RemoveMessages)
|
||||||
HCBT_KEYSKIPPED,
|
HCBT_KEYSKIPPED,
|
||||||
LOWORD(Msg->wParam),
|
LOWORD(Msg->wParam),
|
||||||
Msg->lParam );
|
Msg->lParam );
|
||||||
DPRINT1("KeyboardMessage WH_CBT Call Hook return!\n");
|
ERR("KeyboardMessage WH_CBT Call Hook return!\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1793,7 +1792,7 @@ CALLBACK
|
||||||
HungAppSysTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
|
HungAppSysTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
|
||||||
{
|
{
|
||||||
DoTheScreenSaver();
|
DoTheScreenSaver();
|
||||||
DPRINT("HungAppSysTimerProc\n");
|
TRACE("HungAppSysTimerProc\n");
|
||||||
// Process list of windows that are hung and waiting.
|
// Process list of windows that are hung and waiting.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1872,7 +1871,7 @@ MsqCleanupMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue)
|
||||||
IntDereferenceMessageQueue(CurrentSentMessage->CallBackSenderQueue);
|
IntDereferenceMessageQueue(CurrentSentMessage->CallBackSenderQueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Notify the sender and remove a message from the queue that had not been dispatched\n");
|
TRACE("Notify the sender and remove a message from the queue that had not been dispatched\n");
|
||||||
/* Only if the message has a sender was the message in the DispatchingList */
|
/* Only if the message has a sender was the message in the DispatchingList */
|
||||||
if ((CurrentSentMessage->SenderQueue)
|
if ((CurrentSentMessage->SenderQueue)
|
||||||
&& (CurrentSentMessage->DispatchingListEntry.Flink != NULL))
|
&& (CurrentSentMessage->DispatchingListEntry.Flink != NULL))
|
||||||
|
@ -1924,7 +1923,7 @@ MsqCleanupMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue)
|
||||||
RemoveEntryList(&CurrentSentMessage->DispatchingListEntry);
|
RemoveEntryList(&CurrentSentMessage->DispatchingListEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Notify the sender, the thread has been terminated while dispatching a message!\n");
|
TRACE("Notify the sender, the thread has been terminated while dispatching a message!\n");
|
||||||
|
|
||||||
/* wake the sender's thread */
|
/* wake the sender's thread */
|
||||||
if (CurrentSentMessage->CompletionEvent != NULL)
|
if (CurrentSentMessage->CompletionEvent != NULL)
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
*/
|
*/
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserMisc);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
APIENTRY
|
APIENTRY
|
||||||
|
@ -19,7 +18,7 @@ NtUserAssociateInputContext(
|
||||||
DWORD dwUnknown2,
|
DWORD dwUnknown2,
|
||||||
DWORD dwUnknown3)
|
DWORD dwUnknown3)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +104,7 @@ NtUserBuildHimcList(
|
||||||
DWORD dwUnknown3,
|
DWORD dwUnknown3,
|
||||||
DWORD dwUnknown4)
|
DWORD dwUnknown4)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +114,7 @@ NtUserConvertMemHandle(
|
||||||
DWORD Unknown0,
|
DWORD Unknown0,
|
||||||
DWORD Unknown1)
|
DWORD Unknown1)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -128,7 +127,7 @@ NtUserCreateLocalMemHandle(
|
||||||
DWORD Unknown2,
|
DWORD Unknown2,
|
||||||
DWORD Unknown3)
|
DWORD Unknown3)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -140,7 +139,7 @@ NtUserDdeGetQualityOfService(
|
||||||
IN HWND hWndServer,
|
IN HWND hWndServer,
|
||||||
OUT PSECURITY_QUALITY_OF_SERVICE pqosPrev)
|
OUT PSECURITY_QUALITY_OF_SERVICE pqosPrev)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -154,7 +153,7 @@ NtUserDdeInitialize(
|
||||||
DWORD Unknown3,
|
DWORD Unknown3,
|
||||||
DWORD Unknown4)
|
DWORD Unknown4)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -166,7 +165,7 @@ NtUserDdeSetQualityOfService(
|
||||||
IN PSECURITY_QUALITY_OF_SERVICE pqosNew,
|
IN PSECURITY_QUALITY_OF_SERVICE pqosNew,
|
||||||
OUT PSECURITY_QUALITY_OF_SERVICE pqosPrev)
|
OUT PSECURITY_QUALITY_OF_SERVICE pqosPrev)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -181,7 +180,7 @@ NtUserDragObject(
|
||||||
HCURSOR hc1
|
HCURSOR hc1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -194,7 +193,7 @@ NtUserDrawAnimatedRects(
|
||||||
RECT *lprcFrom,
|
RECT *lprcFrom,
|
||||||
RECT *lprcTo)
|
RECT *lprcTo)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -204,7 +203,7 @@ APIENTRY
|
||||||
NtUserEvent(
|
NtUserEvent(
|
||||||
DWORD Unknown0)
|
DWORD Unknown0)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -215,7 +214,7 @@ NtUserExcludeUpdateRgn(
|
||||||
HDC hDC,
|
HDC hDC,
|
||||||
HWND hWnd)
|
HWND hWnd)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -230,7 +229,7 @@ NtUserGetAltTabInfo(
|
||||||
UINT cchItemText,
|
UINT cchItemText,
|
||||||
BOOL Ansi)
|
BOOL Ansi)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -242,7 +241,7 @@ NtUserGetControlBrush(
|
||||||
HDC hdc,
|
HDC hdc,
|
||||||
UINT ctlType)
|
UINT ctlType)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -259,7 +258,7 @@ NtUserGetControlColor(
|
||||||
HDC hdc,
|
HDC hdc,
|
||||||
UINT CtlMsg) // Wine PaintRect: WM_CTLCOLORMSGBOX + hbrush
|
UINT CtlMsg) // Wine PaintRect: WM_CTLCOLORMSGBOX + hbrush
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -272,7 +271,7 @@ NtUserGetImeHotKey(
|
||||||
DWORD Unknown2,
|
DWORD Unknown2,
|
||||||
DWORD Unknown3)
|
DWORD Unknown3)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -283,7 +282,7 @@ NtUserImpersonateDdeClientWindow(
|
||||||
HWND hWndClient,
|
HWND hWndClient,
|
||||||
HWND hWndServer)
|
HWND hWndServer)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -297,7 +296,7 @@ NtUserInitializeClientPfnArrays(
|
||||||
HINSTANCE hmodUser)
|
HINSTANCE hmodUser)
|
||||||
{
|
{
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
DPRINT("Enter NtUserInitializeClientPfnArrays User32 0x%x\n",hmodUser);
|
TRACE("Enter NtUserInitializeClientPfnArrays User32 0x%x\n",hmodUser);
|
||||||
|
|
||||||
if (ClientPfnInit) return Status;
|
if (ClientPfnInit) return Status;
|
||||||
|
|
||||||
|
@ -327,7 +326,7 @@ NtUserInitializeClientPfnArrays(
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed reading Client Pfns from user space.\n");
|
ERR("Failed reading Client Pfns from user space.\n");
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,7 +350,7 @@ NtUserInitTask(
|
||||||
DWORD Unknown10,
|
DWORD Unknown10,
|
||||||
DWORD Unknown11)
|
DWORD Unknown11)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -360,7 +359,7 @@ BOOL
|
||||||
APIENTRY
|
APIENTRY
|
||||||
NtUserLockWorkStation(VOID)
|
NtUserLockWorkStation(VOID)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -369,7 +368,7 @@ DWORD
|
||||||
APIENTRY
|
APIENTRY
|
||||||
NtUserMNDragLeave(VOID)
|
NtUserMNDragLeave(VOID)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -380,7 +379,7 @@ NtUserMNDragOver(
|
||||||
DWORD Unknown0,
|
DWORD Unknown0,
|
||||||
DWORD Unknown1)
|
DWORD Unknown1)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -391,7 +390,7 @@ NtUserModifyUserStartupInfoFlags(
|
||||||
DWORD Unknown0,
|
DWORD Unknown0,
|
||||||
DWORD Unknown1)
|
DWORD Unknown1)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -403,7 +402,7 @@ NtUserNotifyIMEStatus(
|
||||||
DWORD Unknown1,
|
DWORD Unknown1,
|
||||||
DWORD Unknown2)
|
DWORD Unknown2)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -417,7 +416,7 @@ NtUserQueryUserCounters(
|
||||||
DWORD Unknown3,
|
DWORD Unknown3,
|
||||||
DWORD Unknown4)
|
DWORD Unknown4)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -427,7 +426,7 @@ APIENTRY
|
||||||
NtUserRegisterTasklist(
|
NtUserRegisterTasklist(
|
||||||
DWORD Unknown0)
|
DWORD Unknown0)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -438,7 +437,7 @@ NtUserSetConsoleReserveKeys(
|
||||||
DWORD Unknown0,
|
DWORD Unknown0,
|
||||||
DWORD Unknown1)
|
DWORD Unknown1)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -449,7 +448,7 @@ NtUserSetDbgTag(
|
||||||
DWORD Unknown0,
|
DWORD Unknown0,
|
||||||
DWORD Unknown1)
|
DWORD Unknown1)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -463,7 +462,7 @@ NtUserSetImeHotKey(
|
||||||
DWORD Unknown3,
|
DWORD Unknown3,
|
||||||
DWORD Unknown4)
|
DWORD Unknown4)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -475,7 +474,7 @@ NtUserSetRipFlags(
|
||||||
DWORD Unknown0,
|
DWORD Unknown0,
|
||||||
DWORD Unknown1)
|
DWORD Unknown1)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -534,7 +533,7 @@ NtUserUpdateInputContext(
|
||||||
DWORD Unknown1,
|
DWORD Unknown1,
|
||||||
DWORD Unknown2)
|
DWORD Unknown2)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -546,7 +545,7 @@ NtUserUpdateInstance(
|
||||||
DWORD Unknown1,
|
DWORD Unknown1,
|
||||||
DWORD Unknown2)
|
DWORD Unknown2)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -558,7 +557,7 @@ NtUserUserHandleGrantAccess(
|
||||||
IN HANDLE hJob,
|
IN HANDLE hJob,
|
||||||
IN BOOL bGrant)
|
IN BOOL bGrant)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -568,7 +567,7 @@ APIENTRY
|
||||||
NtUserWaitForMsgAndEvent(
|
NtUserWaitForMsgAndEvent(
|
||||||
DWORD Unknown0)
|
DWORD Unknown0)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -583,7 +582,7 @@ NtUserWin32PoolAllocationStats(
|
||||||
DWORD Unknown4,
|
DWORD Unknown4,
|
||||||
DWORD Unknown5)
|
DWORD Unknown5)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -592,7 +591,7 @@ DWORD
|
||||||
APIENTRY
|
APIENTRY
|
||||||
NtUserYieldTask(VOID)
|
NtUserYieldTask(VOID)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -604,7 +603,7 @@ NtUserCheckImeHotKey(
|
||||||
DWORD dwUnknown1,
|
DWORD dwUnknown1,
|
||||||
DWORD dwUnknown2)
|
DWORD dwUnknown2)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -615,7 +614,7 @@ NtUserConsoleControl(
|
||||||
DWORD dwUnknown2,
|
DWORD dwUnknown2,
|
||||||
DWORD dwUnknown3)
|
DWORD dwUnknown3)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -624,7 +623,7 @@ APIENTRY
|
||||||
NtUserCreateInputContext(
|
NtUserCreateInputContext(
|
||||||
DWORD dwUnknown1)
|
DWORD dwUnknown1)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -633,7 +632,7 @@ APIENTRY
|
||||||
NtUserDestroyInputContext(
|
NtUserDestroyInputContext(
|
||||||
DWORD dwUnknown1)
|
DWORD dwUnknown1)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -642,7 +641,7 @@ APIENTRY
|
||||||
NtUserDisableThreadIme(
|
NtUserDisableThreadIme(
|
||||||
DWORD dwUnknown1)
|
DWORD dwUnknown1)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -651,7 +650,7 @@ APIENTRY
|
||||||
NtUserGetAppImeLevel(
|
NtUserGetAppImeLevel(
|
||||||
DWORD dwUnknown1)
|
DWORD dwUnknown1)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -661,7 +660,7 @@ NtUserGetAtomName(
|
||||||
ATOM nAtom,
|
ATOM nAtom,
|
||||||
LPWSTR lpBuffer)
|
LPWSTR lpBuffer)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -671,7 +670,7 @@ NtUserGetImeInfoEx(
|
||||||
DWORD dwUnknown1,
|
DWORD dwUnknown1,
|
||||||
DWORD dwUnknown2)
|
DWORD dwUnknown2)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -682,7 +681,7 @@ NtUserGetRawInputBuffer(
|
||||||
PUINT pcbSize,
|
PUINT pcbSize,
|
||||||
UINT cbSizeHeader)
|
UINT cbSizeHeader)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -695,7 +694,7 @@ NtUserGetRawInputData(
|
||||||
PUINT pcbSize,
|
PUINT pcbSize,
|
||||||
UINT cbSizeHeader)
|
UINT cbSizeHeader)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -708,7 +707,7 @@ NtUserGetRawInputDeviceInfo(
|
||||||
PUINT pcbSize
|
PUINT pcbSize
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -719,7 +718,7 @@ NtUserGetRawInputDeviceList(
|
||||||
PUINT puiNumDevices,
|
PUINT puiNumDevices,
|
||||||
UINT cbSize)
|
UINT cbSize)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -730,7 +729,7 @@ NtUserGetRegisteredRawInputDevices(
|
||||||
PUINT puiNumDevices,
|
PUINT puiNumDevices,
|
||||||
UINT cbSize)
|
UINT cbSize)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -741,7 +740,7 @@ NtUserHardErrorControl(
|
||||||
DWORD dwUnknown2,
|
DWORD dwUnknown2,
|
||||||
DWORD dwUnknown3)
|
DWORD dwUnknown3)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -756,7 +755,7 @@ NtUserMinMaximize(
|
||||||
UINT SwFlags;
|
UINT SwFlags;
|
||||||
PWND pWnd;
|
PWND pWnd;
|
||||||
|
|
||||||
DPRINT("Enter NtUserMinMaximize\n");
|
TRACE("Enter NtUserMinMaximize\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
pWnd = UserGetWindowObject(hWnd);
|
pWnd = UserGetWindowObject(hWnd);
|
||||||
|
@ -788,7 +787,7 @@ NtUserMinMaximize(
|
||||||
co_WinPosShowWindow(pWnd, cmd);
|
co_WinPosShowWindow(pWnd, cmd);
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
DPRINT("Leave NtUserMinMaximize\n");
|
TRACE("Leave NtUserMinMaximize\n");
|
||||||
UserLeave();
|
UserLeave();
|
||||||
return 0; // Always NULL?
|
return 0; // Always NULL?
|
||||||
}
|
}
|
||||||
|
@ -801,7 +800,7 @@ NtUserNotifyProcessCreate(
|
||||||
DWORD dwUnknown3,
|
DWORD dwUnknown3,
|
||||||
DWORD dwUnknown4)
|
DWORD dwUnknown4)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -813,7 +812,7 @@ NtUserProcessConnect(
|
||||||
DWORD Size)
|
DWORD Size)
|
||||||
{
|
{
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
DPRINT("NtUserProcessConnect\n");
|
TRACE("NtUserProcessConnect\n");
|
||||||
if (pUserConnect && ( Size == sizeof(USERCONNECT) ))
|
if (pUserConnect && ( Size == sizeof(USERCONNECT) ))
|
||||||
{
|
{
|
||||||
PPROCESSINFO W32Process;
|
PPROCESSINFO W32Process;
|
||||||
|
@ -851,7 +850,7 @@ NtUserQueryInformationThread(
|
||||||
DWORD dwUnknown4,
|
DWORD dwUnknown4,
|
||||||
DWORD dwUnknown5)
|
DWORD dwUnknown5)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -861,7 +860,7 @@ NtUserQueryInputContext(
|
||||||
DWORD dwUnknown1,
|
DWORD dwUnknown1,
|
||||||
DWORD dwUnknown2)
|
DWORD dwUnknown2)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -875,7 +874,7 @@ NtUserRealInternalGetMessage(
|
||||||
UINT wRemoveMsg,
|
UINT wRemoveMsg,
|
||||||
BOOL bGMSG)
|
BOOL bGMSG)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -885,7 +884,7 @@ NtUserRealWaitMessageEx(
|
||||||
DWORD dwWakeMask,
|
DWORD dwWakeMask,
|
||||||
UINT uTimeout)
|
UINT uTimeout)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -898,7 +897,7 @@ NtUserRegisterUserApiHook(
|
||||||
DWORD dwUnknown4)
|
DWORD dwUnknown4)
|
||||||
{
|
{
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
UserLeave();
|
UserLeave();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -910,7 +909,7 @@ NtUserRegisterRawInputDevices(
|
||||||
IN UINT uiNumDevices,
|
IN UINT uiNumDevices,
|
||||||
IN UINT cbSize)
|
IN UINT cbSize)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -922,7 +921,7 @@ NtUserResolveDesktop(
|
||||||
DWORD dwUnknown3,
|
DWORD dwUnknown3,
|
||||||
DWORD dwUnknown4)
|
DWORD dwUnknown4)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -932,7 +931,7 @@ NtUserSetAppImeLevel(
|
||||||
DWORD dwUnknown1,
|
DWORD dwUnknown1,
|
||||||
DWORD dwUnknown2)
|
DWORD dwUnknown2)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -941,7 +940,7 @@ APIENTRY
|
||||||
NtUserSetImeInfoEx(
|
NtUserSetImeInfoEx(
|
||||||
DWORD dwUnknown1)
|
DWORD dwUnknown1)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -953,7 +952,7 @@ NtUserSetInformationProcess(
|
||||||
DWORD dwUnknown3,
|
DWORD dwUnknown3,
|
||||||
DWORD dwUnknown4)
|
DWORD dwUnknown4)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -967,15 +966,15 @@ NtUserSetInformationThread(IN HANDLE ThreadHandle,
|
||||||
{
|
{
|
||||||
if (ThreadInformationClass == UserThreadInitiateShutdown)
|
if (ThreadInformationClass == UserThreadInitiateShutdown)
|
||||||
{
|
{
|
||||||
DPRINT1("Shutdown initiated\n");
|
ERR("Shutdown initiated\n");
|
||||||
}
|
}
|
||||||
else if (ThreadInformationClass == UserThreadEndShutdown)
|
else if (ThreadInformationClass == UserThreadEndShutdown)
|
||||||
{
|
{
|
||||||
DPRINT1("Shutdown ended\n");
|
ERR("Shutdown ended\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
}
|
}
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
|
@ -987,7 +986,7 @@ NtUserSetThreadLayoutHandles(
|
||||||
DWORD dwUnknown1,
|
DWORD dwUnknown1,
|
||||||
DWORD dwUnknown2)
|
DWORD dwUnknown2)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -995,7 +994,7 @@ BOOL
|
||||||
APIENTRY
|
APIENTRY
|
||||||
NtUserSoundSentry(VOID)
|
NtUserSoundSentry(VOID)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1004,7 +1003,7 @@ APIENTRY
|
||||||
NtUserTestForInteractiveUser(
|
NtUserTestForInteractiveUser(
|
||||||
DWORD dwUnknown1)
|
DWORD dwUnknown1)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1018,7 +1017,7 @@ NtUserCalcMenuBar(
|
||||||
DWORD dwUnknown4,
|
DWORD dwUnknown4,
|
||||||
DWORD dwUnknown5)
|
DWORD dwUnknown5)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1032,7 +1031,7 @@ NtUserPaintMenuBar(
|
||||||
DWORD dwUnknown5,
|
DWORD dwUnknown5,
|
||||||
DWORD dwUnknown6)
|
DWORD dwUnknown6)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1040,7 +1039,7 @@ BOOL
|
||||||
APIENTRY
|
APIENTRY
|
||||||
NtUserUnregisterUserApiHook(VOID)
|
NtUserUnregisterUserApiHook(VOID)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1052,7 +1051,7 @@ NtUserGetLayeredWindowAttributes(
|
||||||
BYTE *pbAlpha,
|
BYTE *pbAlpha,
|
||||||
DWORD *pdwFlags)
|
DWORD *pdwFlags)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1080,7 +1079,7 @@ NtUserRemoteConnect(
|
||||||
DWORD dwUnknown2,
|
DWORD dwUnknown2,
|
||||||
DWORD dwUnknown3)
|
DWORD dwUnknown3)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1092,7 +1091,7 @@ NtUserRemoteRedrawRectangle(
|
||||||
DWORD dwUnknown3,
|
DWORD dwUnknown3,
|
||||||
DWORD dwUnknown4)
|
DWORD dwUnknown4)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1100,7 +1099,7 @@ DWORD
|
||||||
APIENTRY
|
APIENTRY
|
||||||
NtUserRemoteRedrawScreen(VOID)
|
NtUserRemoteRedrawScreen(VOID)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1108,7 +1107,7 @@ DWORD
|
||||||
APIENTRY
|
APIENTRY
|
||||||
NtUserRemoteStopScreenUpdates(VOID)
|
NtUserRemoteStopScreenUpdates(VOID)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1119,7 +1118,7 @@ NtUserCtxDisplayIOCtl(
|
||||||
DWORD dwUnknown2,
|
DWORD dwUnknown2,
|
||||||
DWORD dwUnknown3)
|
DWORD dwUnknown3)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1136,7 +1135,7 @@ NtUserDrawMenuBarTemp(
|
||||||
HFONT hFont)
|
HFONT hFont)
|
||||||
{
|
{
|
||||||
/* we'll use this function just for caching the menu bar */
|
/* we'll use this function just for caching the menu bar */
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1152,7 +1151,7 @@ NtUserFillWindow(HWND hWndPaint,
|
||||||
HDC hDC,
|
HDC hDC,
|
||||||
HBRUSH hBrush)
|
HBRUSH hBrush)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1163,7 +1162,7 @@ NtUserFillWindow(HWND hWndPaint,
|
||||||
BOOL APIENTRY
|
BOOL APIENTRY
|
||||||
NtUserFlashWindowEx(IN PFLASHWINFO pfwi)
|
NtUserFlashWindowEx(IN PFLASHWINFO pfwi)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1174,7 +1173,7 @@ NtUserFlashWindowEx(IN PFLASHWINFO pfwi)
|
||||||
BOOL APIENTRY
|
BOOL APIENTRY
|
||||||
NtUserLockWindowUpdate(HWND hWnd)
|
NtUserLockWindowUpdate(HWND hWnd)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1187,7 +1186,7 @@ NtUserRealChildWindowFromPoint(HWND Parent,
|
||||||
LONG x,
|
LONG x,
|
||||||
LONG y)
|
LONG y)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1199,7 +1198,7 @@ DWORD APIENTRY
|
||||||
NtUserSetImeOwnerWindow(DWORD Unknown0,
|
NtUserSetImeOwnerWindow(DWORD Unknown0,
|
||||||
DWORD Unknown1)
|
DWORD Unknown1)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1214,7 +1213,7 @@ NtUserSetInternalWindowPos(
|
||||||
LPRECT rect,
|
LPRECT rect,
|
||||||
LPPOINT pt)
|
LPPOINT pt)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1228,7 +1227,7 @@ NtUserSetLayeredWindowAttributes(HWND hwnd,
|
||||||
BYTE bAlpha,
|
BYTE bAlpha,
|
||||||
DWORD dwFlags)
|
DWORD dwFlags)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1249,7 +1248,7 @@ NtUserUpdateLayeredWindow(
|
||||||
DWORD dwFlags,
|
DWORD dwFlags,
|
||||||
RECT *prcDirty)
|
RECT *prcDirty)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1260,7 +1259,7 @@ NtUserUpdateLayeredWindow(
|
||||||
HWND APIENTRY
|
HWND APIENTRY
|
||||||
NtUserWindowFromPhysicalPoint(POINT Point)
|
NtUserWindowFromPhysicalPoint(POINT Point)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -1275,7 +1274,7 @@ NtUserWindowFromPhysicalPoint(POINT Point)
|
||||||
DWORD APIENTRY
|
DWORD APIENTRY
|
||||||
NtUserResolveDesktopForWOW(DWORD Unknown0)
|
NtUserResolveDesktopForWOW(DWORD Unknown0)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1285,7 +1284,7 @@ NtUserResolveDesktopForWOW(DWORD Unknown0)
|
||||||
BOOL APIENTRY
|
BOOL APIENTRY
|
||||||
NtUserEndMenu(VOID)
|
NtUserEndMenu(VOID)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1303,7 +1302,7 @@ NtUserTrackPopupMenuEx(
|
||||||
HWND hWnd,
|
HWND hWnd,
|
||||||
LPTPMPARAMS lptpm)
|
LPTPMPARAMS lptpm)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1311,7 +1310,7 @@ NtUserTrackPopupMenuEx(
|
||||||
DWORD APIENTRY
|
DWORD APIENTRY
|
||||||
NtUserQuerySendMessage(DWORD Unknown0)
|
NtUserQuerySendMessage(DWORD Unknown0)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1324,7 +1323,7 @@ NtUserAlterWindowStyle(DWORD Unknown0,
|
||||||
DWORD Unknown1,
|
DWORD Unknown1,
|
||||||
DWORD Unknown2)
|
DWORD Unknown2)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
@ -1343,7 +1342,7 @@ NtUserSetWindowStationUser(
|
||||||
DWORD Unknown2,
|
DWORD Unknown2,
|
||||||
DWORD Unknown3)
|
DWORD Unknown3)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1352,7 +1351,7 @@ BOOL APIENTRY NtUserAddClipboardFormatListener(
|
||||||
HWND hwnd
|
HWND hwnd
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1360,7 +1359,7 @@ BOOL APIENTRY NtUserRemoveClipboardFormatListener(
|
||||||
HWND hwnd
|
HWND hwnd
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1370,7 +1369,7 @@ BOOL APIENTRY NtUserGetUpdatedClipboardFormats(
|
||||||
PUINT pcFormatsOut
|
PUINT pcFormatsOut
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1385,7 +1384,7 @@ NtUserGetCursorFrameInfo(
|
||||||
DWORD Unknown2,
|
DWORD Unknown2,
|
||||||
DWORD Unknown3)
|
DWORD Unknown3)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserMisc);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
BOOL InitSysParams();
|
BOOL InitSysParams();
|
||||||
|
|
||||||
|
@ -64,14 +63,14 @@ InitUserImpl(VOID)
|
||||||
|
|
||||||
if (!UserCreateHandleTable())
|
if (!UserCreateHandleTable())
|
||||||
{
|
{
|
||||||
DPRINT1("Failed creating handle table\n");
|
ERR("Failed creating handle table\n");
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = InitSessionImpl();
|
Status = InitSessionImpl();
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Error init session impl.\n");
|
ERR("Error init session impl.\n");
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,7 +151,7 @@ NtUserInitialize(
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
DPRINT1("Enter NtUserInitialize(%lx, %p, %p)\n",
|
ERR("Enter NtUserInitialize(%lx, %p, %p)\n",
|
||||||
dwWinVersion, hPowerRequestEvent, hMediaRequestEvent);
|
dwWinVersion, hPowerRequestEvent, hMediaRequestEvent);
|
||||||
|
|
||||||
/* Check the Windows version */
|
/* Check the Windows version */
|
||||||
|
|
|
@ -24,8 +24,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserObj);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
//int usedHandles=0;
|
//int usedHandles=0;
|
||||||
PUSER_HANDLE_TABLE gHandleTable = NULL;
|
PUSER_HANDLE_TABLE gHandleTable = NULL;
|
||||||
|
@ -55,7 +54,7 @@ __inline static PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht)
|
||||||
{
|
{
|
||||||
PUSER_HANDLE_ENTRY entry;
|
PUSER_HANDLE_ENTRY entry;
|
||||||
PPROCESSINFO ppi = PsGetCurrentProcessWin32Process();
|
PPROCESSINFO ppi = PsGetCurrentProcessWin32Process();
|
||||||
DPRINT("handles used %i\n",gpsi->cHandleEntries);
|
TRACE("handles used %i\n",gpsi->cHandleEntries);
|
||||||
|
|
||||||
if (ht->freelist)
|
if (ht->freelist)
|
||||||
{
|
{
|
||||||
|
@ -73,7 +72,7 @@ __inline static PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht)
|
||||||
int i, iFree = 0, iWindow = 0, iMenu = 0, iCursorIcon = 0,
|
int i, iFree = 0, iWindow = 0, iMenu = 0, iCursorIcon = 0,
|
||||||
iHook = 0, iCallProc = 0, iAccel = 0, iMonitor = 0, iTimer = 0, iEvent = 0, iSMWP = 0;
|
iHook = 0, iCallProc = 0, iAccel = 0, iMonitor = 0, iTimer = 0, iEvent = 0, iSMWP = 0;
|
||||||
/**/
|
/**/
|
||||||
DPRINT1("Out of user handles! Used -> %i, NM_Handle -> %d\n", gpsi->cHandleEntries, ht->nb_handles);
|
ERR("Out of user handles! Used -> %i, NM_Handle -> %d\n", gpsi->cHandleEntries, ht->nb_handles);
|
||||||
//#if 0
|
//#if 0
|
||||||
for(i = 0; i < ht->nb_handles; i++)
|
for(i = 0; i < ht->nb_handles; i++)
|
||||||
{
|
{
|
||||||
|
@ -115,7 +114,7 @@ __inline static PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DPRINT1("Handle Count by Type:\n Free = %d Window = %d Menu = %d CursorIcon = %d Hook = %d\n CallProc = %d Accel = %d Monitor = %d Timer = %d Event = %d SMWP = %d\n",
|
ERR("Handle Count by Type:\n Free = %d Window = %d Menu = %d CursorIcon = %d Hook = %d\n CallProc = %d Accel = %d Monitor = %d Timer = %d Event = %d SMWP = %d\n",
|
||||||
iFree, iWindow, iMenu, iCursorIcon, iHook, iCallProc, iAccel, iMonitor, iTimer, iEvent, iSMWP );
|
iFree, iWindow, iMenu, iCursorIcon, iHook, iCallProc, iAccel, iMonitor, iTimer, iEvent, iSMWP );
|
||||||
//#endif
|
//#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -272,7 +271,7 @@ BOOL FASTCALL UserCreateHandleTable(VOID)
|
||||||
mem = UserHeapAlloc(sizeof(USER_HANDLE_ENTRY) * 1024*2);
|
mem = UserHeapAlloc(sizeof(USER_HANDLE_ENTRY) * 1024*2);
|
||||||
if (!mem)
|
if (!mem)
|
||||||
{
|
{
|
||||||
DPRINT1("Failed creating handle table\n");
|
ERR("Failed creating handle table\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,7 +279,7 @@ BOOL FASTCALL UserCreateHandleTable(VOID)
|
||||||
if (gHandleTable == NULL)
|
if (gHandleTable == NULL)
|
||||||
{
|
{
|
||||||
UserHeapFree(mem);
|
UserHeapFree(mem);
|
||||||
DPRINT1("Failed creating handle table\n");
|
ERR("Failed creating handle table\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -394,10 +393,10 @@ UserDereferenceObject(PVOID object)
|
||||||
|
|
||||||
if (!entry)
|
if (!entry)
|
||||||
{
|
{
|
||||||
DPRINT1("warning! Dereference Object without ENTRY! Obj -> 0x%x\n", object);
|
ERR("warning! Dereference Object without ENTRY! Obj -> 0x%x\n", object);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
DPRINT("warning! Dereference to zero! Obj -> 0x%x\n", object);
|
TRACE("warning! Dereference to zero! Obj -> 0x%x\n", object);
|
||||||
|
|
||||||
((PHEAD)object)->cLockObj = 0;
|
((PHEAD)object)->cLockObj = 0;
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserPainting);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
/* PRIVATE FUNCTIONS **********************************************************/
|
/* PRIVATE FUNCTIONS **********************************************************/
|
||||||
|
|
||||||
|
@ -313,7 +312,7 @@ IntInvalidateWindows(PWND Wnd, HRGN hRgn, ULONG Flags)
|
||||||
BOOL HadPaintMessage, HadNCPaintMessage;
|
BOOL HadPaintMessage, HadNCPaintMessage;
|
||||||
BOOL HasPaintMessage, HasNCPaintMessage;
|
BOOL HasPaintMessage, HasNCPaintMessage;
|
||||||
|
|
||||||
DPRINT("IntInvalidateWindows start\n");
|
TRACE("IntInvalidateWindows start\n");
|
||||||
/*
|
/*
|
||||||
* If the nonclient is not to be redrawn, clip the region to the client
|
* If the nonclient is not to be redrawn, clip the region to the client
|
||||||
* rect
|
* rect
|
||||||
|
@ -465,7 +464,7 @@ IntInvalidateWindows(PWND Wnd, HRGN hRgn, ULONG Flags)
|
||||||
else
|
else
|
||||||
MsqIncPaintCountQueue(Wnd->head.pti->MessageQueue);
|
MsqIncPaintCountQueue(Wnd->head.pti->MessageQueue);
|
||||||
}
|
}
|
||||||
DPRINT("IntInvalidateWindows exit\n");
|
TRACE("IntInvalidateWindows exit\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -511,7 +510,7 @@ co_UserRedrawWindow(
|
||||||
ULONG Flags)
|
ULONG Flags)
|
||||||
{
|
{
|
||||||
HRGN hRgn = NULL;
|
HRGN hRgn = NULL;
|
||||||
DPRINT("co_UserRedrawWindow start\n");
|
TRACE("co_UserRedrawWindow start\n");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Step 1.
|
* Step 1.
|
||||||
|
@ -593,7 +592,7 @@ co_UserRedrawWindow(
|
||||||
{
|
{
|
||||||
GreDeleteObject(hRgn);
|
GreDeleteObject(hRgn);
|
||||||
}
|
}
|
||||||
DPRINT("co_UserRedrawWindow exit\n");
|
TRACE("co_UserRedrawWindow exit\n");
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -667,7 +666,7 @@ IntGetPaintMessage(
|
||||||
|
|
||||||
if (Message->hwnd == NULL)
|
if (Message->hwnd == NULL)
|
||||||
{
|
{
|
||||||
DPRINT1("PAINTING BUG: Thread marked as containing dirty windows, but no dirty windows found! Counts %d\n",Thread->cPaintsReady);
|
ERR("PAINTING BUG: Thread marked as containing dirty windows, but no dirty windows found! Counts %d\n",Thread->cPaintsReady);
|
||||||
/* Hack to stop spamming the debuglog ! */
|
/* Hack to stop spamming the debuglog ! */
|
||||||
Thread->cPaintsReady = 0;
|
Thread->cPaintsReady = 0;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -801,7 +800,7 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs)
|
||||||
DECLARE_RETURN(HDC);
|
DECLARE_RETURN(HDC);
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserBeginPaint\n");
|
TRACE("Enter NtUserBeginPaint\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -893,7 +892,7 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs)
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
if (Window) UserDerefObjectCo(Window);
|
if (Window) UserDerefObjectCo(Window);
|
||||||
|
|
||||||
DPRINT("Leave NtUserBeginPaint, ret=%i\n",_ret_);
|
TRACE("Leave NtUserBeginPaint, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
|
|
||||||
|
@ -915,7 +914,7 @@ NtUserEndPaint(HWND hWnd, CONST PAINTSTRUCT* pUnsafePs)
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
HDC hdc = NULL;
|
HDC hdc = NULL;
|
||||||
|
|
||||||
DPRINT("Enter NtUserEndPaint\n");
|
TRACE("Enter NtUserEndPaint\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -947,7 +946,7 @@ NtUserEndPaint(HWND hWnd, CONST PAINTSTRUCT* pUnsafePs)
|
||||||
RETURN(TRUE);
|
RETURN(TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserEndPaint, ret=%i\n",_ret_);
|
TRACE("Leave NtUserEndPaint, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -997,7 +996,7 @@ NtUserGetUpdateRgn(HWND hWnd, HRGN hRgn, BOOL bErase)
|
||||||
INT ret;
|
INT ret;
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetUpdateRgn\n");
|
TRACE("Enter NtUserGetUpdateRgn\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -1012,7 +1011,7 @@ NtUserGetUpdateRgn(HWND hWnd, HRGN hRgn, BOOL bErase)
|
||||||
RETURN(ret);
|
RETURN(ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetUpdateRgn, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetUpdateRgn, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1034,7 +1033,7 @@ NtUserGetUpdateRect(HWND hWnd, LPRECT UnsafeRect, BOOL bErase)
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetUpdateRect\n");
|
TRACE("Enter NtUserGetUpdateRect\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -1096,7 +1095,7 @@ NtUserGetUpdateRect(HWND hWnd, LPRECT UnsafeRect, BOOL bErase)
|
||||||
RETURN(!RECTL_bIsEmptyRect(&Rect));
|
RETURN(!RECTL_bIsEmptyRect(&Rect));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetUpdateRect, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetUpdateRect, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1122,7 +1121,7 @@ NtUserRedrawWindow(
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserRedrawWindow\n");
|
TRACE("Enter NtUserRedrawWindow\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Wnd = UserGetWindowObject(hWnd ? hWnd : IntGetDesktopWindow())))
|
if (!(Wnd = UserGetWindowObject(hWnd ? hWnd : IntGetDesktopWindow())))
|
||||||
|
@ -1170,7 +1169,7 @@ NtUserRedrawWindow(
|
||||||
RETURN( Ret);
|
RETURN( Ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserRedrawWindow, ret=%i\n",_ret_);
|
TRACE("Leave NtUserRedrawWindow, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1310,7 +1309,7 @@ NtUserScrollDC(
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
DWORD Result;
|
DWORD Result;
|
||||||
|
|
||||||
DPRINT("Enter NtUserScrollDC\n");
|
TRACE("Enter NtUserScrollDC\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
|
@ -1376,7 +1375,7 @@ NtUserScrollDC(
|
||||||
RETURN(TRUE);
|
RETURN(TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserScrollDC, ret=%i\n",_ret_);
|
TRACE("Leave NtUserScrollDC, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1409,7 +1408,7 @@ NtUserScrollWindowEx(
|
||||||
DECLARE_RETURN(DWORD);
|
DECLARE_RETURN(DWORD);
|
||||||
USER_REFERENCE_ENTRY Ref, CaretRef;
|
USER_REFERENCE_ENTRY Ref, CaretRef;
|
||||||
|
|
||||||
DPRINT("Enter NtUserScrollWindowEx\n");
|
TRACE("Enter NtUserScrollWindowEx\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
Window = UserGetWindowObject(hWnd);
|
Window = UserGetWindowObject(hWnd);
|
||||||
|
@ -1574,7 +1573,7 @@ CLEANUP:
|
||||||
if (Window)
|
if (Window)
|
||||||
UserDerefObjectCo(Window);
|
UserDerefObjectCo(Window);
|
||||||
|
|
||||||
DPRINT("Leave NtUserScrollWindowEx, ret=%i\n",_ret_);
|
TRACE("Leave NtUserScrollWindowEx, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1593,19 +1592,14 @@ UserDrawCaptionText(
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
BOOLEAN bDeleteFont = FALSE;
|
BOOLEAN bDeleteFont = FALSE;
|
||||||
SIZE Size;
|
SIZE Size;
|
||||||
#ifndef NDEBUG
|
|
||||||
INT i;
|
TRACE("UserDrawCaptionText: %wZ\n", Text);
|
||||||
DPRINT(""); // print filename and line no.
|
|
||||||
for(i = 0; i < Text->Length/sizeof(WCHAR); i++)
|
|
||||||
DbgPrint("%C", Text->Buffer[i]);
|
|
||||||
DbgPrint(", %d\n", Text->Length/sizeof(WCHAR));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
nclm.cbSize = sizeof(nclm);
|
nclm.cbSize = sizeof(nclm);
|
||||||
if(!UserSystemParametersInfo(SPI_GETNONCLIENTMETRICS,
|
if(!UserSystemParametersInfo(SPI_GETNONCLIENTMETRICS,
|
||||||
sizeof(NONCLIENTMETRICS), &nclm, 0))
|
sizeof(NONCLIENTMETRICS), &nclm, 0))
|
||||||
{
|
{
|
||||||
DPRINT1("UserSystemParametersInfo() failed!\n");
|
ERR("UserSystemParametersInfo() failed!\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1618,7 +1612,7 @@ UserDrawCaptionText(
|
||||||
|
|
||||||
if(!NT_SUCCESS(Status))
|
if(!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("TextIntCreateFontIndirect() failed! Status: 0x%x\n", Status);
|
ERR("TextIntCreateFontIndirect() failed! Status: 0x%x\n", Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1630,7 +1624,7 @@ UserDrawCaptionText(
|
||||||
hOldFont = NtGdiSelectFont(hDc, hFont);
|
hOldFont = NtGdiSelectFont(hDc, hFont);
|
||||||
if(!hOldFont)
|
if(!hOldFont)
|
||||||
{
|
{
|
||||||
DPRINT1("SelectFont() failed!\n");
|
ERR("SelectFont() failed!\n");
|
||||||
/* Don't fail */
|
/* Don't fail */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1709,7 +1703,7 @@ BOOL UserDrawCaption(
|
||||||
|
|
||||||
if(!GreGradientFill(hDc, Vertices, 2, &gcap, 1, GRADIENT_FILL_RECT_H))
|
if(!GreGradientFill(hDc, Vertices, 2, &gcap, 1, GRADIENT_FILL_RECT_H))
|
||||||
{
|
{
|
||||||
DPRINT1("GreGradientFill() failed!\n");
|
ERR("GreGradientFill() failed!\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1726,7 +1720,7 @@ BOOL UserDrawCaption(
|
||||||
|
|
||||||
if(!hOldBrush)
|
if(!hOldBrush)
|
||||||
{
|
{
|
||||||
DPRINT1("NtGdiSelectBrush() failed!\n");
|
ERR("NtGdiSelectBrush() failed!\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1735,7 +1729,7 @@ BOOL UserDrawCaption(
|
||||||
Rect.bottom - Rect.top,
|
Rect.bottom - Rect.top,
|
||||||
PATCOPY))
|
PATCOPY))
|
||||||
{
|
{
|
||||||
DPRINT1("NtGdiPatBlt() failed!\n");
|
ERR("NtGdiPatBlt() failed!\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserProp);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
/* STATIC FUNCTIONS **********************************************************/
|
/* STATIC FUNCTIONS **********************************************************/
|
||||||
|
|
||||||
|
@ -108,7 +107,7 @@ NtUserBuildPropList(HWND hWnd,
|
||||||
DWORD Cnt = 0;
|
DWORD Cnt = 0;
|
||||||
DECLARE_RETURN(NTSTATUS);
|
DECLARE_RETURN(NTSTATUS);
|
||||||
|
|
||||||
DPRINT("Enter NtUserBuildPropList\n");
|
TRACE("Enter NtUserBuildPropList\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -162,7 +161,7 @@ NtUserBuildPropList(HWND hWnd,
|
||||||
RETURN( STATUS_SUCCESS);
|
RETURN( STATUS_SUCCESS);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserBuildPropList, ret=%i\n",_ret_);
|
TRACE("Leave NtUserBuildPropList, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -175,7 +174,7 @@ NtUserRemoveProp(HWND hWnd, ATOM Atom)
|
||||||
HANDLE Data;
|
HANDLE Data;
|
||||||
DECLARE_RETURN(HANDLE);
|
DECLARE_RETURN(HANDLE);
|
||||||
|
|
||||||
DPRINT("Enter NtUserRemoveProp\n");
|
TRACE("Enter NtUserRemoveProp\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -197,7 +196,7 @@ NtUserRemoveProp(HWND hWnd, ATOM Atom)
|
||||||
RETURN(Data);
|
RETURN(Data);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserRemoveProp, ret=%i\n",_ret_);
|
TRACE("Leave NtUserRemoveProp, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -208,7 +207,7 @@ NtUserSetProp(HWND hWnd, ATOM Atom, HANDLE Data)
|
||||||
PWND Window;
|
PWND Window;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetProp\n");
|
TRACE("Enter NtUserSetProp\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -219,7 +218,7 @@ NtUserSetProp(HWND hWnd, ATOM Atom, HANDLE Data)
|
||||||
RETURN( IntSetProp(Window, Atom, Data));
|
RETURN( IntSetProp(Window, Atom, Data));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetProp, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetProp, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserScrollbar);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#define MINTRACKTHUMB 8 /* Minimum size of the rectangle between the arrows */
|
#define MINTRACKTHUMB 8 /* Minimum size of the rectangle between the arrows */
|
||||||
|
|
||||||
|
@ -184,7 +183,7 @@ co_IntGetScrollInfo(PWND Window, INT nBar, LPSCROLLINFO lpsi)
|
||||||
if(!SBID_IS_VALID(nBar))
|
if(!SBID_IS_VALID(nBar))
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
DPRINT1("Trying to get scrollinfo for unknown scrollbar type %d\n", nBar);
|
ERR("Trying to get scrollinfo for unknown scrollbar type %d\n", nBar);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,7 +240,7 @@ NEWco_IntGetScrollInfo(
|
||||||
if (!SBID_IS_VALID(nBar))
|
if (!SBID_IS_VALID(nBar))
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
DPRINT1("Trying to get scrollinfo for unknown scrollbar type %d\n", nBar);
|
ERR("Trying to get scrollinfo for unknown scrollbar type %d\n", nBar);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,7 +292,7 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
|
||||||
if(!SBID_IS_VALID(nBar))
|
if(!SBID_IS_VALID(nBar))
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
DPRINT1("Trying to set scrollinfo for unknown scrollbar type %d", nBar);
|
ERR("Trying to set scrollinfo for unknown scrollbar type %d", nBar);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -443,7 +442,7 @@ co_IntGetScrollBarInfo(PWND Window, LONG idObject, PSCROLLBARINFO psbi)
|
||||||
if(!SBID_IS_VALID(Bar))
|
if(!SBID_IS_VALID(Bar))
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
DPRINT1("Trying to get scrollinfo for unknown scrollbar type %d\n", Bar);
|
ERR("Trying to get scrollinfo for unknown scrollbar type %d\n", Bar);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,7 +482,7 @@ co_IntCreateScrollBars(PWND Window)
|
||||||
Size = 3 * (sizeof(SBINFOEX));
|
Size = 3 * (sizeof(SBINFOEX));
|
||||||
if(!(Window->pSBInfoex = ExAllocatePoolWithTag(PagedPool, Size, TAG_SBARINFO)))
|
if(!(Window->pSBInfoex = ExAllocatePoolWithTag(PagedPool, Size, TAG_SBARINFO)))
|
||||||
{
|
{
|
||||||
DPRINT1("Unable to allocate memory for scrollbar information for window 0x%x\n", Window->head.h);
|
ERR("Unable to allocate memory for scrollbar information for window 0x%x\n", Window->head.h);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -573,7 +572,7 @@ NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi)
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetScrollBarInfo\n");
|
TRACE("Enter NtUserGetScrollBarInfo\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
Status = MmCopyFromCaller(&sbi, psbi, sizeof(SCROLLBARINFO));
|
Status = MmCopyFromCaller(&sbi, psbi, sizeof(SCROLLBARINFO));
|
||||||
|
@ -602,7 +601,7 @@ NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi)
|
||||||
RETURN( Ret);
|
RETURN( Ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetScrollBarInfo, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetScrollBarInfo, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
|
|
||||||
|
@ -625,7 +624,7 @@ NtUserSBGetParms(
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetScrollInfo\n");
|
TRACE("Enter NtUserGetScrollInfo\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
Status = MmCopyFromCaller(&psi.cbSize, &(lpsi->cbSize), sizeof(UINT));
|
Status = MmCopyFromCaller(&psi.cbSize, &(lpsi->cbSize), sizeof(UINT));
|
||||||
|
@ -662,7 +661,7 @@ NtUserSBGetParms(
|
||||||
RETURN( Ret);
|
RETURN( Ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetScrollInfo, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetScrollInfo, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -681,7 +680,7 @@ NtUserEnableScrollBar(
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserEnableScrollBar\n");
|
TRACE("Enter NtUserEnableScrollBar\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Window = UserGetWindowObject(hWnd)))
|
if(!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -693,7 +692,7 @@ NtUserEnableScrollBar(
|
||||||
if(wSBflags == SB_CTL)
|
if(wSBflags == SB_CTL)
|
||||||
{
|
{
|
||||||
/* FIXME Enable or Disable SB Ctrl*/
|
/* FIXME Enable or Disable SB Ctrl*/
|
||||||
DPRINT1("Enable Scrollbar SB_CTL\n");
|
ERR("Enable Scrollbar SB_CTL\n");
|
||||||
InfoV = IntGetScrollbarInfoFromWindow(Window, SB_CTL);
|
InfoV = IntGetScrollbarInfoFromWindow(Window, SB_CTL);
|
||||||
Chg = IntEnableScrollBar(FALSE, InfoV ,wArrows);
|
Chg = IntEnableScrollBar(FALSE, InfoV ,wArrows);
|
||||||
/* Chg? Scrollbar is Refresh in user32/controls/scrollbar.c. */
|
/* Chg? Scrollbar is Refresh in user32/controls/scrollbar.c. */
|
||||||
|
@ -704,7 +703,7 @@ NtUserEnableScrollBar(
|
||||||
if(wSBflags != SB_BOTH && !SBID_IS_VALID(wSBflags))
|
if(wSBflags != SB_BOTH && !SBID_IS_VALID(wSBflags))
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
DPRINT1("Trying to set scrollinfo for unknown scrollbar type %d", wSBflags);
|
ERR("Trying to set scrollinfo for unknown scrollbar type %d", wSBflags);
|
||||||
RETURN(FALSE);
|
RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -743,7 +742,7 @@ CLEANUP:
|
||||||
if (Window)
|
if (Window)
|
||||||
UserDerefObjectCo(Window);
|
UserDerefObjectCo(Window);
|
||||||
|
|
||||||
DPRINT("Leave NtUserEnableScrollBar, ret=%i\n",_ret_);
|
TRACE("Leave NtUserEnableScrollBar, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -764,7 +763,7 @@ NtUserSetScrollBarInfo(
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetScrollBarInfo\n");
|
TRACE("Enter NtUserSetScrollBarInfo\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Window = UserGetWindowObject(hWnd)))
|
if(!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -777,7 +776,7 @@ NtUserSetScrollBarInfo(
|
||||||
if(!SBID_IS_VALID(Obj))
|
if(!SBID_IS_VALID(Obj))
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
DPRINT1("Trying to set scrollinfo for unknown scrollbar type %d\n", Obj);
|
ERR("Trying to set scrollinfo for unknown scrollbar type %d\n", Obj);
|
||||||
RETURN( FALSE);
|
RETURN( FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -806,7 +805,7 @@ CLEANUP:
|
||||||
if (Window)
|
if (Window)
|
||||||
UserDerefObjectCo(Window);
|
UserDerefObjectCo(Window);
|
||||||
|
|
||||||
DPRINT("Leave NtUserSetScrollBarInfo, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetScrollBarInfo, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -825,7 +824,7 @@ NtUserSetScrollInfo(
|
||||||
DECLARE_RETURN(DWORD);
|
DECLARE_RETURN(DWORD);
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetScrollInfo\n");
|
TRACE("Enter NtUserSetScrollInfo\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Window = UserGetWindowObject(hWnd)))
|
if(!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -847,7 +846,7 @@ CLEANUP:
|
||||||
if (Window)
|
if (Window)
|
||||||
UserDerefObjectCo(Window);
|
UserDerefObjectCo(Window);
|
||||||
|
|
||||||
DPRINT("Leave NtUserSetScrollInfo, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetScrollInfo, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
|
|
||||||
|
@ -926,7 +925,7 @@ NtUserShowScrollBar(HWND hWnd, int wBar, DWORD bShow)
|
||||||
DWORD ret;
|
DWORD ret;
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserShowScrollBar\n");
|
TRACE("Enter NtUserShowScrollBar\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -941,7 +940,7 @@ NtUserShowScrollBar(HWND hWnd, int wBar, DWORD bShow)
|
||||||
RETURN(ret);
|
RETURN(ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserShowScrollBar, ret%i\n",_ret_);
|
TRACE("Leave NtUserShowScrollBar, ret%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserMisc);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
|
|
||||||
/* registered Logon process */
|
/* registered Logon process */
|
||||||
PPROCESSINFO LogonProcess = NULL;
|
PPROCESSINFO LogonProcess = NULL;
|
||||||
|
@ -64,7 +62,7 @@ co_IntRegisterLogonProcess(HANDLE ProcessId, BOOL Register)
|
||||||
Status = co_CsrNotify(&Request);
|
Status = co_CsrNotify(&Request);
|
||||||
if (! NT_SUCCESS(Status))
|
if (! NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to register logon process with CSRSS\n");
|
ERR("Failed to register logon process with CSRSS\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +79,7 @@ NtUserCallNoParam(DWORD Routine)
|
||||||
DWORD_PTR Result = 0;
|
DWORD_PTR Result = 0;
|
||||||
DECLARE_RETURN(DWORD_PTR);
|
DECLARE_RETURN(DWORD_PTR);
|
||||||
|
|
||||||
DPRINT("Enter NtUserCallNoParam\n");
|
TRACE("Enter NtUserCallNoParam\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
switch(Routine)
|
switch(Routine)
|
||||||
|
@ -123,14 +121,14 @@ NtUserCallNoParam(DWORD Routine)
|
||||||
RETURN( (DWORD_PTR)IntReleaseCapture());
|
RETURN( (DWORD_PTR)IntReleaseCapture());
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DPRINT1("Calling invalid routine number 0x%x in NtUserCallNoParam\n", Routine);
|
ERR("Calling invalid routine number 0x%x in NtUserCallNoParam\n", Routine);
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
RETURN(Result);
|
RETURN(Result);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserCallNoParam, ret=%i\n",_ret_);
|
TRACE("Leave NtUserCallNoParam, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -147,7 +145,7 @@ NtUserCallOneParam(
|
||||||
{
|
{
|
||||||
DECLARE_RETURN(DWORD_PTR);
|
DECLARE_RETURN(DWORD_PTR);
|
||||||
|
|
||||||
DPRINT("Enter NtUserCallOneParam\n");
|
TRACE("Enter NtUserCallOneParam\n");
|
||||||
|
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
|
@ -381,13 +379,13 @@ NtUserCallOneParam(
|
||||||
RETURN ( UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_MESSAGE_BEEP, Param) );
|
RETURN ( UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_MESSAGE_BEEP, Param) );
|
||||||
/* TODO: Implement sound sentry */
|
/* TODO: Implement sound sentry */
|
||||||
}
|
}
|
||||||
DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n",
|
ERR("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n",
|
||||||
Routine, Param);
|
Routine, Param);
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
RETURN( 0);
|
RETURN( 0);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserCallOneParam, ret=%i\n",_ret_);
|
TRACE("Leave NtUserCallOneParam, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -406,7 +404,7 @@ NtUserCallTwoParam(
|
||||||
PWND Window;
|
PWND Window;
|
||||||
DECLARE_RETURN(DWORD_PTR);
|
DECLARE_RETURN(DWORD_PTR);
|
||||||
|
|
||||||
DPRINT("Enter NtUserCallTwoParam\n");
|
TRACE("Enter NtUserCallTwoParam\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
switch(Routine)
|
switch(Routine)
|
||||||
|
@ -462,7 +460,7 @@ NtUserCallTwoParam(
|
||||||
}
|
}
|
||||||
|
|
||||||
case TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW:
|
case TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW:
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
RETURN( 0);
|
RETURN( 0);
|
||||||
|
|
||||||
|
|
||||||
|
@ -478,13 +476,13 @@ NtUserCallTwoParam(
|
||||||
case TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK:
|
case TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK:
|
||||||
RETURN( IntUnhookWindowsHook((int)Param1, (HOOKPROC)Param2));
|
RETURN( IntUnhookWindowsHook((int)Param1, (HOOKPROC)Param2));
|
||||||
}
|
}
|
||||||
DPRINT1("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x Parm2=0x%x\n",
|
ERR("Calling invalid routine number 0x%x in NtUserCallTwoParam(), Param1=0x%x Parm2=0x%x\n",
|
||||||
Routine, Param1, Param2);
|
Routine, Param1, Param2);
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
RETURN( 0);
|
RETURN( 0);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserCallTwoParam, ret=%i\n",_ret_);
|
TRACE("Leave NtUserCallTwoParam, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -504,7 +502,7 @@ NtUserCallHwndLock(
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
DECLARE_RETURN(BOOLEAN);
|
DECLARE_RETURN(BOOLEAN);
|
||||||
|
|
||||||
DPRINT("Enter NtUserCallHwndLock\n");
|
TRACE("Enter NtUserCallHwndLock\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -522,7 +520,7 @@ NtUserCallHwndLock(
|
||||||
|
|
||||||
case HWNDLOCK_ROUTINE_DRAWMENUBAR:
|
case HWNDLOCK_ROUTINE_DRAWMENUBAR:
|
||||||
{
|
{
|
||||||
DPRINT("HWNDLOCK_ROUTINE_DRAWMENUBAR\n");
|
TRACE("HWNDLOCK_ROUTINE_DRAWMENUBAR\n");
|
||||||
Ret = TRUE;
|
Ret = TRUE;
|
||||||
if ((Window->style & (WS_CHILD | WS_POPUP)) != WS_CHILD)
|
if ((Window->style & (WS_CHILD | WS_POPUP)) != WS_CHILD)
|
||||||
co_WinPosSetWindowPos( Window,
|
co_WinPosSetWindowPos( Window,
|
||||||
|
@ -578,7 +576,7 @@ NtUserCallHwndLock(
|
||||||
RETURN( Ret);
|
RETURN( Ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserCallHwndLock, ret=%i\n",_ret_);
|
TRACE("Leave NtUserCallHwndLock, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -645,7 +643,7 @@ NtUserCallHwnd(
|
||||||
return IntDeRegisterShellHookWindow(hWnd);
|
return IntDeRegisterShellHookWindow(hWnd);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -734,7 +732,7 @@ NtUserCallHwndParam(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UNIMPLEMENTED;
|
STUB;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -751,7 +749,7 @@ NtUserCallHwndParamLock(
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
DECLARE_RETURN(DWORD);
|
DECLARE_RETURN(DWORD);
|
||||||
|
|
||||||
DPRINT("Enter NtUserCallHwndParamLock\n");
|
TRACE("Enter NtUserCallHwndParamLock\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -772,7 +770,7 @@ NtUserCallHwndParamLock(
|
||||||
RETURN( Ret);
|
RETURN( Ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserCallHwndParamLock, ret=%i\n",_ret_);
|
TRACE("Leave NtUserCallHwndParamLock, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
|
|
||||||
|
|
|
@ -13,16 +13,14 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#include <winsta.h>
|
#include <winsta.h>
|
||||||
|
|
||||||
|
DBG_DEFAULT_CHANNEL(UserSysparams);
|
||||||
|
|
||||||
#define KeRosDumpStackFrames(Frames, Count) KdSystemDebugControl('DsoR', (PVOID)Frames, Count, NULL, 0, NULL, KernelMode)
|
#define KeRosDumpStackFrames(Frames, Count) KdSystemDebugControl('DsoR', (PVOID)Frames, Count, NULL, 0, NULL, KernelMode)
|
||||||
HBITMAP NTAPI UserLoadImage(PCWSTR);
|
HBITMAP NTAPI UserLoadImage(PCWSTR);
|
||||||
BOOL NTAPI W32kDosPathNameToNtPathName(PCWSTR, PUNICODE_STRING);
|
BOOL NTAPI W32kDosPathNameToNtPathName(PCWSTR, PUNICODE_STRING);
|
||||||
|
|
||||||
BOOL gbDebug = 0;
|
|
||||||
SPIVALUES gspv;
|
SPIVALUES gspv;
|
||||||
BOOL gbSpiInitialized = FALSE;
|
BOOL gbSpiInitialized = FALSE;
|
||||||
PWINSTATION_OBJECT gpwinstaCurrent = NULL;
|
PWINSTATION_OBJECT gpwinstaCurrent = NULL;
|
||||||
|
@ -40,8 +38,6 @@ PWINSTATION_OBJECT gpwinstaCurrent = NULL;
|
||||||
return 0; \
|
return 0; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DPRINTX if (gbDebug) DPRINT1
|
|
||||||
|
|
||||||
static const WCHAR* KEY_MOUSE = L"Control Panel\\Mouse";
|
static const WCHAR* KEY_MOUSE = L"Control Panel\\Mouse";
|
||||||
static const WCHAR* VAL_MOUSE1 = L"MouseThreshold1";
|
static const WCHAR* VAL_MOUSE1 = L"MouseThreshold1";
|
||||||
static const WCHAR* VAL_MOUSE2 = L"MouseThreshold2";
|
static const WCHAR* VAL_MOUSE2 = L"MouseThreshold2";
|
||||||
|
@ -165,7 +161,7 @@ SpiLoadMetric(PCWSTR pwszValue, INT iValue)
|
||||||
INT iRegVal;
|
INT iRegVal;
|
||||||
|
|
||||||
iRegVal = SpiLoadInt(KEY_METRIC, pwszValue, METRIC2REG(iValue));
|
iRegVal = SpiLoadInt(KEY_METRIC, pwszValue, METRIC2REG(iValue));
|
||||||
DPRINT("Loaded metric setting '%S', iValue=%d(reg:%d), ret=%d(reg:%d)\n",
|
TRACE("Loaded metric setting '%S', iValue=%d(reg:%d), ret=%d(reg:%d)\n",
|
||||||
pwszValue, iValue, METRIC2REG(iValue), REG2METRIC(iRegVal), iRegVal);
|
pwszValue, iValue, METRIC2REG(iValue), REG2METRIC(iRegVal), iRegVal);
|
||||||
return REG2METRIC(iRegVal);
|
return REG2METRIC(iRegVal);
|
||||||
}
|
}
|
||||||
|
@ -220,7 +216,7 @@ SpiUpdatePerUserSystemParameters()
|
||||||
FALSE, ANSI_CHARSET, 0, 0, DEFAULT_QUALITY,
|
FALSE, ANSI_CHARSET, 0, 0, DEFAULT_QUALITY,
|
||||||
VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif"};
|
VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif"};
|
||||||
|
|
||||||
DPRINT("Enter SpiUpdatePerUserSystemParameters\n");
|
TRACE("Enter SpiUpdatePerUserSystemParameters\n");
|
||||||
|
|
||||||
/* Clear the structure */
|
/* Clear the structure */
|
||||||
memset(&gspv, 0, sizeof(gspv));
|
memset(&gspv, 0, sizeof(gspv));
|
||||||
|
@ -326,13 +322,13 @@ NtUserUpdatePerUserSystemParameters(
|
||||||
{
|
{
|
||||||
BOOL bResult;
|
BOOL bResult;
|
||||||
|
|
||||||
DPRINT("Enter NtUserUpdatePerUserSystemParameters\n");
|
TRACE("Enter NtUserUpdatePerUserSystemParameters\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
SpiUpdatePerUserSystemParameters();
|
SpiUpdatePerUserSystemParameters();
|
||||||
bResult = IntDesktopUpdatePerUserSettings(bEnable);
|
bResult = IntDesktopUpdatePerUserSettings(bEnable);
|
||||||
|
|
||||||
DPRINT("Leave NtUserUpdatePerUserSystemParameters, returning %d\n", bResult);
|
TRACE("Leave NtUserUpdatePerUserSystemParameters, returning %d\n", bResult);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
|
|
||||||
return bResult;
|
return bResult;
|
||||||
|
@ -433,7 +429,7 @@ SpiMemCopy(PVOID pvDst, PVOID pvSrc, ULONG cbSize, BOOL bProtect, BOOL bToUser)
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
DPRINT("SpiMemCopy failed, pvDst=%p, pvSrc=%p, bProtect=%d, bToUser=%d\n", pvDst, pvSrc, bProtect, bToUser);
|
TRACE("SpiMemCopy failed, pvDst=%p, pvSrc=%p, bProtect=%d, bToUser=%d\n", pvDst, pvSrc, bProtect, bToUser);
|
||||||
}
|
}
|
||||||
return NT_SUCCESS(Status);
|
return NT_SUCCESS(Status);
|
||||||
}
|
}
|
||||||
|
@ -619,7 +615,7 @@ SpiSetWallpaper(PVOID pvParam, FLONG fl)
|
||||||
gspv.ustrWallpaper.Length = ustr.Length;
|
gspv.ustrWallpaper.Length = ustr.Length;
|
||||||
gspv.awcWallpaper[ustr.Length / sizeof(WCHAR)] = 0;
|
gspv.awcWallpaper[ustr.Length / sizeof(WCHAR)] = 0;
|
||||||
|
|
||||||
DPRINT("SpiSetWallpaper, name=%S\n", gspv.awcWallpaper);
|
TRACE("SpiSetWallpaper, name=%S\n", gspv.awcWallpaper);
|
||||||
|
|
||||||
/* Update registry */
|
/* Update registry */
|
||||||
if (fl & SPIF_UPDATEINIFILE)
|
if (fl & SPIF_UPDATEINIFILE)
|
||||||
|
@ -636,7 +632,7 @@ SpiSetWallpaper(PVOID pvParam, FLONG fl)
|
||||||
ustr.Length = 0;
|
ustr.Length = 0;
|
||||||
if (!W32kDosPathNameToNtPathName(gspv.awcWallpaper, &ustr))
|
if (!W32kDosPathNameToNtPathName(gspv.awcWallpaper, &ustr))
|
||||||
{
|
{
|
||||||
DPRINT1("RtlDosPathNameToNtPathName_U failed\n");
|
ERR("RtlDosPathNameToNtPathName_U failed\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -644,7 +640,7 @@ SpiSetWallpaper(PVOID pvParam, FLONG fl)
|
||||||
hbmp = UserLoadImage(ustr.Buffer);
|
hbmp = UserLoadImage(ustr.Buffer);
|
||||||
if (!hbmp)
|
if (!hbmp)
|
||||||
{
|
{
|
||||||
DPRINT1("UserLoadImage failed\n");
|
ERR("UserLoadImage failed\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -667,7 +663,7 @@ SpiSetWallpaper(PVOID pvParam, FLONG fl)
|
||||||
/* Yes, Windows really loads the current setting from the registry. */
|
/* Yes, Windows really loads the current setting from the registry. */
|
||||||
ulTile = SpiLoadInt(KEY_DESKTOP, L"TileWallpaper", 0);
|
ulTile = SpiLoadInt(KEY_DESKTOP, L"TileWallpaper", 0);
|
||||||
ulStyle = SpiLoadInt(KEY_DESKTOP, L"WallpaperStyle", 0);
|
ulStyle = SpiLoadInt(KEY_DESKTOP, L"WallpaperStyle", 0);
|
||||||
DPRINT("SpiSetWallpaper: ulTile=%ld, ulStyle=%d\n", ulTile, ulStyle);
|
TRACE("SpiSetWallpaper: ulTile=%ld, ulStyle=%d\n", ulTile, ulStyle);
|
||||||
|
|
||||||
/* Check the values we found in the registry */
|
/* Check the values we found in the registry */
|
||||||
if(ulTile && !ulStyle)
|
if(ulTile && !ulStyle)
|
||||||
|
@ -745,7 +741,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
|
||||||
return SpiSetInt(&gspv.dwKbdSpeed, uiParam, KEY_KBD, VAL_KBDSPD, fl);
|
return SpiSetInt(&gspv.dwKbdSpeed, uiParam, KEY_KBD, VAL_KBDSPD, fl);
|
||||||
|
|
||||||
case SPI_LANGDRIVER:
|
case SPI_LANGDRIVER:
|
||||||
DPRINT1("SPI_LANGDRIVER is unimplemented\n");
|
ERR("SPI_LANGDRIVER is unimplemented\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETSCREENSAVETIMEOUT:
|
case SPI_GETSCREENSAVETIMEOUT:
|
||||||
|
@ -774,7 +770,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
|
||||||
return SpiSetWallpaper(pvParam, fl);
|
return SpiSetWallpaper(pvParam, fl);
|
||||||
|
|
||||||
case SPI_SETDESKPATTERN:
|
case SPI_SETDESKPATTERN:
|
||||||
DPRINT1("SPI_SETDESKPATTERN is unimplemented\n");
|
ERR("SPI_SETDESKPATTERN is unimplemented\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETKEYBOARDDELAY:
|
case SPI_GETKEYBOARDDELAY:
|
||||||
|
@ -951,7 +947,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
|
||||||
}
|
}
|
||||||
|
|
||||||
case SPI_SETPENWINDOWS:
|
case SPI_SETPENWINDOWS:
|
||||||
DPRINT1("SPI_SETPENWINDOWS is unimplemented\n");
|
ERR("SPI_SETPENWINDOWS is unimplemented\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETFILTERKEYS:
|
case SPI_GETFILTERKEYS:
|
||||||
|
@ -1129,27 +1125,27 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
|
||||||
return SpiSetBool(&gspv.bPwrOffActive, uiParam, KEY_DESKTOP, L"PowerOffActive", fl);
|
return SpiSetBool(&gspv.bPwrOffActive, uiParam, KEY_DESKTOP, L"PowerOffActive", fl);
|
||||||
|
|
||||||
case SPI_SETCURSORS:
|
case SPI_SETCURSORS:
|
||||||
DPRINT1("SPI_SETCURSORS is unimplemented\n");
|
ERR("SPI_SETCURSORS is unimplemented\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_SETICONS:
|
case SPI_SETICONS:
|
||||||
DPRINT1("SPI_SETICONS is unimplemented\n");
|
ERR("SPI_SETICONS is unimplemented\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETDEFAULTINPUTLANG:
|
case SPI_GETDEFAULTINPUTLANG:
|
||||||
DPRINT1("SPI_GETDEFAULTINPUTLANG is unimplemented\n");
|
ERR("SPI_GETDEFAULTINPUTLANG is unimplemented\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_SETDEFAULTINPUTLANG:
|
case SPI_SETDEFAULTINPUTLANG:
|
||||||
DPRINT1("SPI_SETDEFAULTINPUTLANG is unimplemented\n");
|
ERR("SPI_SETDEFAULTINPUTLANG is unimplemented\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_SETLANGTOGGLE:
|
case SPI_SETLANGTOGGLE:
|
||||||
DPRINT1("SPI_SETLANGTOGGLE is unimplemented\n");
|
ERR("SPI_SETLANGTOGGLE is unimplemented\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETWINDOWSEXTENSION:
|
case SPI_GETWINDOWSEXTENSION:
|
||||||
DPRINT1("SPI_GETWINDOWSEXTENSION is unimplemented\n");
|
ERR("SPI_GETWINDOWSEXTENSION is unimplemented\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETMOUSETRAILS:
|
case SPI_GETMOUSETRAILS:
|
||||||
|
@ -1233,7 +1229,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
|
||||||
return SpiGet(pvParam, &gspv.audiodesription, sizeof(AUDIODESCRIPTION), fl);
|
return SpiGet(pvParam, &gspv.audiodesription, sizeof(AUDIODESCRIPTION), fl);
|
||||||
|
|
||||||
case SPI_SETAUDIODESCRIPTION:
|
case SPI_SETAUDIODESCRIPTION:
|
||||||
DPRINT1("SPI_SETAUDIODESCRIPTION is unimplemented\n");
|
ERR("SPI_SETAUDIODESCRIPTION is unimplemented\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SPI_GETSCREENSAVESECURE:
|
case SPI_GETSCREENSAVESECURE:
|
||||||
|
@ -1476,11 +1472,11 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
|
||||||
case 0x103B:
|
case 0x103B:
|
||||||
case 0x103C:
|
case 0x103C:
|
||||||
case 0x103D:
|
case 0x103D:
|
||||||
DPRINT1("Undocumented SPI value %x is unimplemented\n", uiAction);
|
ERR("Undocumented SPI value %x is unimplemented\n", uiAction);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DPRINT1("Invalid SPI value: %d\n", uiAction);
|
ERR("Invalid SPI value: %d\n", uiAction);
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1509,7 +1505,7 @@ UserSystemParametersInfo(
|
||||||
|
|
||||||
if (!gpwinstaCurrent)
|
if (!gpwinstaCurrent)
|
||||||
{
|
{
|
||||||
DPRINT1("UserSystemParametersInfo called without active windowstation.\n");
|
ERR("UserSystemParametersInfo called without active windowstation.\n");
|
||||||
//KeRosDumpStackFrames(NULL, 0);
|
//KeRosDumpStackFrames(NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1559,11 +1555,9 @@ NtUserSystemParametersInfo(
|
||||||
{
|
{
|
||||||
BOOL bResult;
|
BOOL bResult;
|
||||||
|
|
||||||
DPRINT("Enter NtUserSystemParametersInfo(%d)\n", uiAction);
|
TRACE("Enter NtUserSystemParametersInfo(%d)\n", uiAction);
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
//if (uiAction == SPI_SETMOUSE) gbDebug = 1;
|
|
||||||
|
|
||||||
// FIXME: get rid of the flags and only use this from um. kernel can access data directly.
|
// FIXME: get rid of the flags and only use this from um. kernel can access data directly.
|
||||||
/* Set UM memory protection flag */
|
/* Set UM memory protection flag */
|
||||||
fWinIni |= SPIF_PROTECT;
|
fWinIni |= SPIF_PROTECT;
|
||||||
|
@ -1571,14 +1565,8 @@ NtUserSystemParametersInfo(
|
||||||
/* Call internal function */
|
/* Call internal function */
|
||||||
bResult = UserSystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
|
bResult = UserSystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
|
||||||
|
|
||||||
//DPRINTX("NtUserSystemParametersInfo SPI_ICONHORIZONTALSPACING uiParam=%d, pvParam=%p, pvParam=%d bResult=%d\n",
|
TRACE("Leave NtUserSystemParametersInfo, returning %d\n", bResult);
|
||||||
// uiParam, pvParam, pvParam?*(UINT*)pvParam:0, bResult);
|
|
||||||
|
|
||||||
DPRINT("Leave NtUserSystemParametersInfo, returning %d\n", bResult);
|
|
||||||
UserLeave();
|
UserLeave();
|
||||||
|
|
||||||
//DPRINTX("NtUserSystemParametersInfo SPI_ICONHORIZONTALSPACING bResult=%d\n", bResult);
|
|
||||||
//gbDebug = 0;
|
|
||||||
|
|
||||||
return bResult;
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserTimer);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
WORD FASTCALL get_key_state(void);
|
WORD FASTCALL get_key_state(void);
|
||||||
|
|
||||||
|
@ -96,7 +95,7 @@ RemoveTimer(PTIMER pTmr)
|
||||||
UserDereferenceObject(pTmr);
|
UserDereferenceObject(pTmr);
|
||||||
Ret = UserDeleteObject( UserHMGetHandle(pTmr), otTimer);
|
Ret = UserDeleteObject( UserHMGetHandle(pTmr), otTimer);
|
||||||
}
|
}
|
||||||
if (!Ret) DPRINT1("Warning: Unable to delete timer\n");
|
if (!Ret) ERR("Warning: Unable to delete timer\n");
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
@ -199,14 +198,14 @@ IntSetTimer( PWND Window,
|
||||||
/* Windows NT/2k/XP behaviour */
|
/* Windows NT/2k/XP behaviour */
|
||||||
if (Elapse > MAX_ELAPSE_TIME)
|
if (Elapse > MAX_ELAPSE_TIME)
|
||||||
{
|
{
|
||||||
DPRINT("Adjusting uElapse\n");
|
TRACE("Adjusting uElapse\n");
|
||||||
Elapse = 1;
|
Elapse = 1;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
/* Windows XP SP2 and Windows Server 2003 behaviour */
|
/* Windows XP SP2 and Windows Server 2003 behaviour */
|
||||||
if (Elapse > MAX_ELAPSE_TIME)
|
if (Elapse > MAX_ELAPSE_TIME)
|
||||||
{
|
{
|
||||||
DPRINT("Adjusting uElapse\n");
|
TRACE("Adjusting uElapse\n");
|
||||||
Elapse = MAX_ELAPSE_TIME;
|
Elapse = MAX_ELAPSE_TIME;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -214,7 +213,7 @@ IntSetTimer( PWND Window,
|
||||||
/* Windows 2k/XP and Windows Server 2003 SP1 behaviour */
|
/* Windows 2k/XP and Windows Server 2003 SP1 behaviour */
|
||||||
if (Elapse < 10)
|
if (Elapse < 10)
|
||||||
{
|
{
|
||||||
DPRINT("Adjusting uElapse\n");
|
TRACE("Adjusting uElapse\n");
|
||||||
Elapse = 10;
|
Elapse = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +233,7 @@ IntSetTimer( PWND Window,
|
||||||
if (IDEvent == (UINT_PTR) -1)
|
if (IDEvent == (UINT_PTR) -1)
|
||||||
{
|
{
|
||||||
IntUnlockWindowlessTimerBitmap();
|
IntUnlockWindowlessTimerBitmap();
|
||||||
DPRINT1("Unable to find a free window-less timer id\n");
|
ERR("Unable to find a free window-less timer id\n");
|
||||||
EngSetLastError(ERROR_NO_SYSTEM_RESOURCES);
|
EngSetLastError(ERROR_NO_SYSTEM_RESOURCES);
|
||||||
ASSERT(FALSE);
|
ASSERT(FALSE);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -300,13 +299,13 @@ SystemTimerProc(HWND hwnd,
|
||||||
pWnd = UserGetWindowObject(hwnd);
|
pWnd = UserGetWindowObject(hwnd);
|
||||||
if (!pWnd)
|
if (!pWnd)
|
||||||
{
|
{
|
||||||
DPRINT1( "System Timer Proc has invalid window handle! 0x%x Id: %d\n", hwnd, idEvent);
|
ERR( "System Timer Proc has invalid window handle! 0x%x Id: %d\n", hwnd, idEvent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT( "Windowless Timer Running!\n" );
|
TRACE( "Windowless Timer Running!\n" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -355,7 +354,7 @@ SystemTimerProc(HWND hwnd,
|
||||||
return; // Not this window so just return.
|
return; // Not this window so just return.
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DPRINT1( "System Timer Proc invalid id %d!\n", idEvent );
|
ERR( "System Timer Proc invalid id %d!\n", idEvent );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
IntKillTimer(pWnd, idEvent, TRUE);
|
IntKillTimer(pWnd, idEvent, TRUE);
|
||||||
|
@ -382,7 +381,7 @@ SystemTimerSet( PWND Window,
|
||||||
if (Window && Window->head.pti->pEThread->ThreadsProcess != PsGetCurrentProcess())
|
if (Window && Window->head.pti->pEThread->ThreadsProcess != PsGetCurrentProcess())
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||||
DPRINT("SysemTimerSet: Access Denied!\n");
|
TRACE("SysemTimerSet: Access Denied!\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return IntSetTimer( Window, nIDEvent, uElapse, lpTimerFunc, TMRF_SYSTEM);
|
return IntSetTimer( Window, nIDEvent, uElapse, lpTimerFunc, TMRF_SYSTEM);
|
||||||
|
@ -512,7 +511,7 @@ ProcessTimers(VOID)
|
||||||
TimeLast = Time;
|
TimeLast = Time;
|
||||||
|
|
||||||
TimerLeave();
|
TimerLeave();
|
||||||
DPRINT("TimerCount = %d\n", TimerCount);
|
TRACE("TimerCount = %d\n", TimerCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL FASTCALL
|
BOOL FASTCALL
|
||||||
|
@ -570,7 +569,7 @@ BOOL FASTCALL
|
||||||
IntKillTimer(PWND Window, UINT_PTR IDEvent, BOOL SystemTimer)
|
IntKillTimer(PWND Window, UINT_PTR IDEvent, BOOL SystemTimer)
|
||||||
{
|
{
|
||||||
PTIMER pTmr = NULL;
|
PTIMER pTmr = NULL;
|
||||||
DPRINT("IntKillTimer Window %x id %p systemtimer %s\n",
|
TRACE("IntKillTimer Window %x id %p systemtimer %s\n",
|
||||||
Window, IDEvent, SystemTimer ? "TRUE" : "FALSE");
|
Window, IDEvent, SystemTimer ? "TRUE" : "FALSE");
|
||||||
|
|
||||||
TimerEnterExclusive();
|
TimerEnterExclusive();
|
||||||
|
@ -627,7 +626,7 @@ NtUserSetTimer
|
||||||
PWND Window;
|
PWND Window;
|
||||||
DECLARE_RETURN(UINT_PTR);
|
DECLARE_RETURN(UINT_PTR);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetTimer\n");
|
TRACE("Enter NtUserSetTimer\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
Window = UserGetWindowObject(hWnd);
|
Window = UserGetWindowObject(hWnd);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
|
@ -635,7 +634,7 @@ NtUserSetTimer
|
||||||
RETURN(IntSetTimer(Window, nIDEvent, uElapse, lpTimerFunc, TMRF_TIFROMWND));
|
RETURN(IntSetTimer(Window, nIDEvent, uElapse, lpTimerFunc, TMRF_TIFROMWND));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetTimer, ret=%i\n", _ret_);
|
TRACE("Leave NtUserSetTimer, ret=%i\n", _ret_);
|
||||||
|
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -652,7 +651,7 @@ NtUserKillTimer
|
||||||
PWND Window;
|
PWND Window;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserKillTimer\n");
|
TRACE("Enter NtUserKillTimer\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
Window = UserGetWindowObject(hWnd);
|
Window = UserGetWindowObject(hWnd);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
|
@ -660,7 +659,7 @@ NtUserKillTimer
|
||||||
RETURN(IntKillTimer(Window, uIDEvent, FALSE));
|
RETURN(IntKillTimer(Window, uIDEvent, FALSE));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserKillTimer, ret=%i\n", _ret_);
|
TRACE("Leave NtUserKillTimer, ret=%i\n", _ret_);
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -676,12 +675,12 @@ NtUserSetSystemTimer(
|
||||||
{
|
{
|
||||||
DECLARE_RETURN(UINT_PTR);
|
DECLARE_RETURN(UINT_PTR);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetSystemTimer\n");
|
TRACE("Enter NtUserSetSystemTimer\n");
|
||||||
|
|
||||||
RETURN(IntSetTimer(UserGetWindowObject(hWnd), nIDEvent, uElapse, NULL, TMRF_SYSTEM));
|
RETURN(IntSetTimer(UserGetWindowObject(hWnd), nIDEvent, uElapse, NULL, TMRF_SYSTEM));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetSystemTimer, ret=%i\n", _ret_);
|
TRACE("Leave NtUserSetSystemTimer, ret=%i\n", _ret_);
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserMisc);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
RTL_ATOM FASTCALL
|
RTL_ATOM FASTCALL
|
||||||
IntAddAtom(LPWSTR AtomName)
|
IntAddAtom(LPWSTR AtomName)
|
||||||
|
@ -89,7 +88,7 @@ IntAddGlobalAtom(LPWSTR lpBuffer, BOOL PinAtom)
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Error init Global Atom.\n");
|
ERR("Error init Global Atom.\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserWinpos);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
HRGN FASTCALL
|
HRGN FASTCALL
|
||||||
VIS_ComputeVisibleRegion(
|
VIS_ComputeVisibleRegion(
|
||||||
|
@ -68,7 +67,7 @@ VIS_ComputeVisibleRegion(
|
||||||
if ( CurrentWindow->state2 & WNDS2_INDESTROY ||
|
if ( CurrentWindow->state2 & WNDS2_INDESTROY ||
|
||||||
CurrentWindow->state & WNDS_DESTROYED )
|
CurrentWindow->state & WNDS_DESTROYED )
|
||||||
{
|
{
|
||||||
DPRINT1("ATM the Current Window or Parent is dead!\n");
|
ERR("ATM the Current Window or Parent is dead!\n");
|
||||||
if (VisRgn) GreDeleteObject(VisRgn);
|
if (VisRgn) GreDeleteObject(VisRgn);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserDce);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
int FASTCALL CLIPPING_UpdateGCRegion(DC* Dc);
|
int FASTCALL CLIPPING_UpdateGCRegion(DC* Dc);
|
||||||
|
|
||||||
|
@ -94,7 +93,7 @@ DceAllocDCE(PWND Window OPTIONAL, DCE_TYPE Type)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
DCECount++;
|
DCECount++;
|
||||||
DPRINT("Alloc DCE's! %d\n",DCECount);
|
TRACE("Alloc DCE's! %d\n",DCECount);
|
||||||
pDce->hwndCurrent = (Window ? Window->head.h : NULL);
|
pDce->hwndCurrent = (Window ? Window->head.h : NULL);
|
||||||
pDce->pwndOrg = Window;
|
pDce->pwndOrg = Window;
|
||||||
pDce->pwndClip = Window;
|
pDce->pwndClip = Window;
|
||||||
|
@ -113,7 +112,7 @@ DceAllocDCE(PWND Window OPTIONAL, DCE_TYPE Type)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT("FREE DCATTR!!!! NOT DCE_WINDOW_DC!!!!! hDC-> %x\n", pDce->hDC);
|
TRACE("FREE DCATTR!!!! NOT DCE_WINDOW_DC!!!!! hDC-> %x\n", pDce->hDC);
|
||||||
GreSetDCOwner(pDce->hDC, GDI_OBJ_HMGR_NONE);
|
GreSetDCOwner(pDce->hDC, GDI_OBJ_HMGR_NONE);
|
||||||
pDce->ptiOwner = NULL;
|
pDce->ptiOwner = NULL;
|
||||||
}
|
}
|
||||||
|
@ -225,7 +224,7 @@ DceReleaseDC(DCE* dce, BOOL EndPaint)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dce->DCXFlags &= ~DCX_DCEBUSY;
|
dce->DCXFlags &= ~DCX_DCEBUSY;
|
||||||
DPRINT("Exit!!!!! DCX_CACHE!!!!!! hDC-> %x \n", dce->hDC);
|
TRACE("Exit!!!!! DCX_CACHE!!!!!! hDC-> %x \n", dce->hDC);
|
||||||
if (!GreSetDCOwner(dce->hDC, GDI_OBJ_HMGR_NONE))
|
if (!GreSetDCOwner(dce->hDC, GDI_OBJ_HMGR_NONE))
|
||||||
return 0;
|
return 0;
|
||||||
dce->ptiOwner = NULL; // Reset ownership.
|
dce->ptiOwner = NULL; // Reset ownership.
|
||||||
|
@ -372,7 +371,7 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Wnd->pcls->pdce) hDC = ((PDCE)Wnd->pcls->pdce)->hDC;
|
if (Wnd->pcls->pdce) hDC = ((PDCE)Wnd->pcls->pdce)->hDC;
|
||||||
DPRINT("We have CLASS!!\n");
|
TRACE("We have CLASS!!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* else // For Testing!
|
/* else // For Testing!
|
||||||
|
@ -524,7 +523,7 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
||||||
|
|
||||||
if (!GreIsHandleValid(Dce->hDC))
|
if (!GreIsHandleValid(Dce->hDC))
|
||||||
{
|
{
|
||||||
DPRINT1("FIXME: Got DCE with invalid hDC! 0x%x\n", Dce->hDC);
|
ERR("FIXME: Got DCE with invalid hDC! 0x%x\n", Dce->hDC);
|
||||||
Dce->hDC = DceCreateDisplayDC();
|
Dce->hDC = DceCreateDisplayDC();
|
||||||
/* FIXME: Handle error */
|
/* FIXME: Handle error */
|
||||||
}
|
}
|
||||||
|
@ -568,7 +567,7 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
||||||
{
|
{
|
||||||
if (Dce->hrgnClip != NULL)
|
if (Dce->hrgnClip != NULL)
|
||||||
{
|
{
|
||||||
DPRINT1("Should not be called!!\n");
|
ERR("Should not be called!!\n");
|
||||||
GreDeleteObject(Dce->hrgnClip);
|
GreDeleteObject(Dce->hrgnClip);
|
||||||
Dce->hrgnClip = NULL;
|
Dce->hrgnClip = NULL;
|
||||||
}
|
}
|
||||||
|
@ -581,7 +580,7 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
||||||
|
|
||||||
if (Dce->DCXFlags & DCX_CACHE)
|
if (Dce->DCXFlags & DCX_CACHE)
|
||||||
{
|
{
|
||||||
DPRINT("ENTER!!!!!! DCX_CACHE!!!!!! hDC-> %x\n", Dce->hDC);
|
TRACE("ENTER!!!!!! DCX_CACHE!!!!!! hDC-> %x\n", Dce->hDC);
|
||||||
// Need to set ownership so Sync dcattr will work.
|
// Need to set ownership so Sync dcattr will work.
|
||||||
GreSetDCOwner(Dce->hDC, GDI_OBJ_HMGR_POWNED);
|
GreSetDCOwner(Dce->hDC, GDI_OBJ_HMGR_POWNED);
|
||||||
Dce->ptiOwner = GetW32ThreadInfo(); // Set the temp owning
|
Dce->ptiOwner = GetW32ThreadInfo(); // Set the temp owning
|
||||||
|
@ -625,7 +624,7 @@ DceFreeDCE(PDCE pdce, BOOLEAN Force)
|
||||||
if (Force &&
|
if (Force &&
|
||||||
GreGetObjectOwner(pdce->hDC) != GDI_OBJ_HMGR_POWNED)
|
GreGetObjectOwner(pdce->hDC) != GDI_OBJ_HMGR_POWNED)
|
||||||
{
|
{
|
||||||
DPRINT("Change ownership for DCE! -> %x\n" , pdce);
|
TRACE("Change ownership for DCE! -> %x\n" , pdce);
|
||||||
// Note: Windows sets W32PF_OWNDCCLEANUP and moves on.
|
// Note: Windows sets W32PF_OWNDCCLEANUP and moves on.
|
||||||
if (GreIsHandleValid(pdce->hDC))
|
if (GreIsHandleValid(pdce->hDC))
|
||||||
{
|
{
|
||||||
|
@ -633,7 +632,7 @@ DceFreeDCE(PDCE pdce, BOOLEAN Force)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("Attempted to change ownership of an DCEhDC 0x%x currently being destroyed!!!\n",pdce->hDC);
|
ERR("Attempted to change ownership of an DCEhDC 0x%x currently being destroyed!!!\n",pdce->hDC);
|
||||||
Hit = TRUE;
|
Hit = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -655,14 +654,14 @@ DceFreeDCE(PDCE pdce, BOOLEAN Force)
|
||||||
|
|
||||||
if (IsListEmpty(&pdce->List))
|
if (IsListEmpty(&pdce->List))
|
||||||
{
|
{
|
||||||
DPRINT1("List is Empty! DCE! -> %x\n" , pdce);
|
ERR("List is Empty! DCE! -> %x\n" , pdce);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ExFreePoolWithTag(pdce, USERTAG_DCE);
|
ExFreePoolWithTag(pdce, USERTAG_DCE);
|
||||||
|
|
||||||
DCECount--;
|
DCECount--;
|
||||||
DPRINT("Freed DCE's! %d \n", DCECount);
|
TRACE("Freed DCE's! %d \n", DCECount);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -680,7 +679,7 @@ DceFreeWindowDCE(PWND Window)
|
||||||
|
|
||||||
if (DCECount <= 0)
|
if (DCECount <= 0)
|
||||||
{
|
{
|
||||||
DPRINT1("FreeWindowDCE No Entry! %d\n",DCECount);
|
ERR("FreeWindowDCE No Entry! %d\n",DCECount);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -690,12 +689,12 @@ DceFreeWindowDCE(PWND Window)
|
||||||
{
|
{
|
||||||
if (!pDCE)
|
if (!pDCE)
|
||||||
{
|
{
|
||||||
DPRINT1("FreeWindowDCE No DCE Pointer!\n");
|
ERR("FreeWindowDCE No DCE Pointer!\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (IsListEmpty(&pDCE->List))
|
if (IsListEmpty(&pDCE->List))
|
||||||
{
|
{
|
||||||
DPRINT1("FreeWindowDCE List is Empty!!!!\n");
|
ERR("FreeWindowDCE List is Empty!!!!\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ( pDCE->hwndCurrent == Window->head.h &&
|
if ( pDCE->hwndCurrent == Window->head.h &&
|
||||||
|
@ -713,10 +712,10 @@ DceFreeWindowDCE(PWND Window)
|
||||||
pDCE->DCXFlags = DCX_DCEEMPTY|DCX_CACHE;
|
pDCE->DCXFlags = DCX_DCEEMPTY|DCX_CACHE;
|
||||||
pDCE->hwndCurrent = 0;
|
pDCE->hwndCurrent = 0;
|
||||||
|
|
||||||
DPRINT("POWNED DCE going Cheap!! DCX_CACHE!! hDC-> %x \n", pDCE->hDC);
|
TRACE("POWNED DCE going Cheap!! DCX_CACHE!! hDC-> %x \n", pDCE->hDC);
|
||||||
if (!GreSetDCOwner( pDCE->hDC, GDI_OBJ_HMGR_NONE))
|
if (!GreSetDCOwner( pDCE->hDC, GDI_OBJ_HMGR_NONE))
|
||||||
{
|
{
|
||||||
DPRINT1("Fail Owner Switch hDC-> %x \n", pDCE->hDC);
|
ERR("Fail Owner Switch hDC-> %x \n", pDCE->hDC);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Do not change owner so thread can clean up! */
|
/* Do not change owner so thread can clean up! */
|
||||||
|
@ -729,7 +728,7 @@ DceFreeWindowDCE(PWND Window)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("Not POWNED or CLASSDC hwndCurrent -> %x \n", pDCE->hwndCurrent);
|
ERR("Not POWNED or CLASSDC hwndCurrent -> %x \n", pDCE->hwndCurrent);
|
||||||
// ASSERT(FALSE); /* bug 5320 */
|
// ASSERT(FALSE); /* bug 5320 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -738,13 +737,13 @@ DceFreeWindowDCE(PWND Window)
|
||||||
if (pDCE->DCXFlags & DCX_DCEBUSY) /* shared cache DCE */
|
if (pDCE->DCXFlags & DCX_DCEBUSY) /* shared cache DCE */
|
||||||
{
|
{
|
||||||
/* FIXME: AFAICS we are doing the right thing here so
|
/* FIXME: AFAICS we are doing the right thing here so
|
||||||
* this should be a DPRINT. But this is best left as an ERR
|
* this should be a TRACE. But this is best left as an ERR
|
||||||
* because the 'application error' is likely to come from
|
* because the 'application error' is likely to come from
|
||||||
* another part of Wine (i.e. it's our fault after all).
|
* another part of Wine (i.e. it's our fault after all).
|
||||||
* We should change this to DPRINT when ReactOS is more stable
|
* We should change this to TRACE when ReactOS is more stable
|
||||||
* (for 1.0?).
|
* (for 1.0?).
|
||||||
*/
|
*/
|
||||||
DPRINT1("[%p] GetDC() without ReleaseDC()!\n", Window->head.h);
|
ERR("[%p] GetDC() without ReleaseDC()!\n", Window->head.h);
|
||||||
DceReleaseDC(pDCE, FALSE);
|
DceReleaseDC(pDCE, FALSE);
|
||||||
}
|
}
|
||||||
pDCE->DCXFlags |= DCX_DCEEMPTY;
|
pDCE->DCXFlags |= DCX_DCEEMPTY;
|
||||||
|
@ -944,7 +943,7 @@ UserReleaseDC(PWND Window, HDC hDc, BOOL EndPaint)
|
||||||
INT nRet = 0;
|
INT nRet = 0;
|
||||||
BOOL Hit = FALSE;
|
BOOL Hit = FALSE;
|
||||||
|
|
||||||
DPRINT("%p %p\n", Window, hDc);
|
TRACE("%p %p\n", Window, hDc);
|
||||||
pLE = LEDce.Flink;
|
pLE = LEDce.Flink;
|
||||||
dce = CONTAINING_RECORD(pLE, DCE, List);
|
dce = CONTAINING_RECORD(pLE, DCE, List);
|
||||||
do
|
do
|
||||||
|
@ -1001,7 +1000,7 @@ NtUserGetDCEx(HWND hWnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
||||||
PWND Wnd=NULL;
|
PWND Wnd=NULL;
|
||||||
DECLARE_RETURN(HDC);
|
DECLARE_RETURN(HDC);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetDCEx\n");
|
TRACE("Enter NtUserGetDCEx\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (hWnd && !(Wnd = UserGetWindowObject(hWnd)))
|
if (hWnd && !(Wnd = UserGetWindowObject(hWnd)))
|
||||||
|
@ -1011,7 +1010,7 @@ NtUserGetDCEx(HWND hWnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
||||||
RETURN( UserGetDCEx(Wnd, ClipRegion, Flags));
|
RETURN( UserGetDCEx(Wnd, ClipRegion, Flags));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetDCEx, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetDCEx, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -1037,7 +1036,7 @@ NtUserGetWindowDC(HWND hWnd)
|
||||||
HDC APIENTRY
|
HDC APIENTRY
|
||||||
NtUserGetDC(HWND hWnd)
|
NtUserGetDC(HWND hWnd)
|
||||||
{
|
{
|
||||||
DPRINT("NtUGetDC -> %x:%x\n", hWnd, !hWnd ? DCX_CACHE | DCX_WINDOW : DCX_USESTYLE );
|
TRACE("NtUGetDC -> %x:%x\n", hWnd, !hWnd ? DCX_CACHE | DCX_WINDOW : DCX_USESTYLE );
|
||||||
|
|
||||||
return NtUserGetDCEx(hWnd, NULL, NULL == hWnd ? DCX_CACHE | DCX_WINDOW : DCX_USESTYLE);
|
return NtUserGetDCEx(hWnd, NULL, NULL == hWnd ? DCX_CACHE | DCX_WINDOW : DCX_USESTYLE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserWnd);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
#define POINT_IN_RECT(p, r) (((r.bottom >= p.y) && (r.top <= p.y))&&((r.left <= p.x )&&( r.right >= p.x )))
|
#define POINT_IN_RECT(p, r) (((r.bottom >= p.y) && (r.top <= p.y))&&((r.left <= p.x )&&( r.right >= p.x )))
|
||||||
|
|
||||||
|
@ -234,7 +233,7 @@ IntWinListChildren(PWND Window)
|
||||||
List = ExAllocatePoolWithTag(PagedPool, (NumChildren + 1) * sizeof(HWND), USERTAG_WINDOWLIST);
|
List = ExAllocatePoolWithTag(PagedPool, (NumChildren + 1) * sizeof(HWND), USERTAG_WINDOWLIST);
|
||||||
if(!List)
|
if(!List)
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to allocate memory for children array\n");
|
ERR("Failed to allocate memory for children array\n");
|
||||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -316,7 +315,7 @@ static void IntSendDestroyMsg(HWND hWnd)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT("destroyed itself while in WM_DESTROY!\n");
|
TRACE("destroyed itself while in WM_DESTROY!\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -371,7 +370,7 @@ static LRESULT co_UserFreeWindow(PWND Window,
|
||||||
|
|
||||||
if(Window->state2 & WNDS2_INDESTROY)
|
if(Window->state2 & WNDS2_INDESTROY)
|
||||||
{
|
{
|
||||||
DPRINT("Tried to call IntDestroyWindow() twice\n");
|
TRACE("Tried to call IntDestroyWindow() twice\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Window->state2 |= WNDS2_INDESTROY;
|
Window->state2 |= WNDS2_INDESTROY;
|
||||||
|
@ -779,7 +778,7 @@ co_DestroyThreadWindows(struct _ETHREAD *Thread)
|
||||||
Current = WThread->WindowListHead.Flink;
|
Current = WThread->WindowListHead.Flink;
|
||||||
Wnd = CONTAINING_RECORD(Current, WND, ThreadListEntry);
|
Wnd = CONTAINING_RECORD(Current, WND, ThreadListEntry);
|
||||||
|
|
||||||
DPRINT("thread cleanup: while destroy wnds, wnd=0x%x\n",Wnd);
|
TRACE("thread cleanup: while destroy wnds, wnd=0x%x\n",Wnd);
|
||||||
|
|
||||||
/* window removes itself from the list */
|
/* window removes itself from the list */
|
||||||
|
|
||||||
|
@ -793,7 +792,7 @@ co_DestroyThreadWindows(struct _ETHREAD *Thread)
|
||||||
UserRefObjectCo(Wnd, &Ref);//faxme: temp hack??
|
UserRefObjectCo(Wnd, &Ref);//faxme: temp hack??
|
||||||
if (!co_UserDestroyWindow(Wnd))
|
if (!co_UserDestroyWindow(Wnd))
|
||||||
{
|
{
|
||||||
DPRINT1("Unable to destroy window 0x%x at thread cleanup... This is _VERY_ bad!\n", Wnd);
|
ERR("Unable to destroy window 0x%x at thread cleanup... This is _VERY_ bad!\n", Wnd);
|
||||||
}
|
}
|
||||||
UserDerefObjectCo(Wnd);//faxme: temp hack??
|
UserDerefObjectCo(Wnd);//faxme: temp hack??
|
||||||
}
|
}
|
||||||
|
@ -1467,13 +1466,13 @@ NtUserBuildHwndList(
|
||||||
Status = PsLookupThreadByThreadId((HANDLE)dwThreadId, &Thread);
|
Status = PsLookupThreadByThreadId((HANDLE)dwThreadId, &Thread);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Thread Id is not valid!\n");
|
ERR("Thread Id is not valid!\n");
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
if (!(W32Thread = (PTHREADINFO)Thread->Tcb.Win32Thread))
|
if (!(W32Thread = (PTHREADINFO)Thread->Tcb.Win32Thread))
|
||||||
{
|
{
|
||||||
ObDereferenceObject(Thread);
|
ObDereferenceObject(Thread);
|
||||||
DPRINT1("Thread is not initialized!\n");
|
ERR("Thread is not initialized!\n");
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1498,7 +1497,7 @@ NtUserBuildHwndList(
|
||||||
_SEH2_END
|
_SEH2_END
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failure to build window list!\n");
|
ERR("Failure to build window list!\n");
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1600,7 +1599,7 @@ IntFixWindowCoordinates(CREATESTRUCTW* Cs, PWND ParentWindow, DWORD* dwShowMode)
|
||||||
*/
|
*/
|
||||||
else if (IS_DEFAULT(Cs->cy))
|
else if (IS_DEFAULT(Cs->cy))
|
||||||
{
|
{
|
||||||
DPRINT("Strange use of CW_USEDEFAULT in nHeight\n");
|
TRACE("Strange use of CW_USEDEFAULT in nHeight\n");
|
||||||
Cs->cy = (pMonitor->rcWork.bottom - pMonitor->rcWork.top) * 3 / 4;
|
Cs->cy = (pMonitor->rcWork.bottom - pMonitor->rcWork.top) * 3 / 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1689,7 +1688,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
|
||||||
goto AllocError;
|
goto AllocError;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Created object with handle %X\n", hWnd);
|
TRACE("Created object with handle %X\n", hWnd);
|
||||||
|
|
||||||
if (NULL == pti->rpdesk->DesktopWindow)
|
if (NULL == pti->rpdesk->DesktopWindow)
|
||||||
{ /*HACK! Helper for win32csr/desktopbg.c */
|
{ /*HACK! Helper for win32csr/desktopbg.c */
|
||||||
|
@ -1795,7 +1794,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
|
||||||
if (!CallProc)
|
if (!CallProc)
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||||
DPRINT1("Warning: Unable to create CallProc for edit control. Control may not operate correctly! hwnd %x\n",hWnd);
|
ERR("Warning: Unable to create CallProc for edit control. Control may not operate correctly! hwnd %x\n",hWnd);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1891,7 +1890,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
|
||||||
return pWnd;
|
return pWnd;
|
||||||
|
|
||||||
AllocError:
|
AllocError:
|
||||||
DPRINT1("IntCreateWindow Allocation Error.\n");
|
ERR("IntCreateWindow Allocation Error.\n");
|
||||||
if(pWnd)
|
if(pWnd)
|
||||||
UserDereferenceObject(pWnd);
|
UserDereferenceObject(pWnd);
|
||||||
|
|
||||||
|
@ -1926,7 +1925,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
pti = GetW32ThreadInfo();
|
pti = GetW32ThreadInfo();
|
||||||
if (pti == NULL || pti->rpdesk == NULL)
|
if (pti == NULL || pti->rpdesk == NULL)
|
||||||
{
|
{
|
||||||
DPRINT1("Thread is not attached to a desktop! Cannot create window!\n");
|
ERR("Thread is not attached to a desktop! Cannot create window!\n");
|
||||||
return NULL; //There is nothing to cleanup
|
return NULL; //There is nothing to cleanup
|
||||||
}
|
}
|
||||||
WinSta = pti->rpdesk->rpwinstaParent;
|
WinSta = pti->rpdesk->rpwinstaParent;
|
||||||
|
@ -1939,7 +1938,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
Class = IntGetAndReferenceClass(ClassName, Cs->hInstance);
|
Class = IntGetAndReferenceClass(ClassName, Cs->hInstance);
|
||||||
if(!Class)
|
if(!Class)
|
||||||
{
|
{
|
||||||
DPRINT1("Failed to find class %wZ\n", ClassName);
|
ERR("Failed to find class %wZ\n", ClassName);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1960,7 +1959,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
}
|
}
|
||||||
else if ((Cs->style & (WS_CHILD|WS_POPUP)) == WS_CHILD)
|
else if ((Cs->style & (WS_CHILD|WS_POPUP)) == WS_CHILD)
|
||||||
{
|
{
|
||||||
DPRINT1("Cannot create a child window without a parrent!\n");
|
ERR("Cannot create a child window without a parrent!\n");
|
||||||
EngSetLastError(ERROR_TLW_WITH_WSCHILD);
|
EngSetLastError(ERROR_TLW_WITH_WSCHILD);
|
||||||
goto cleanup; /* WS_CHILD needs a parent, but WS_POPUP doesn't */
|
goto cleanup; /* WS_CHILD needs a parent, but WS_POPUP doesn't */
|
||||||
}
|
}
|
||||||
|
@ -1987,7 +1986,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
OwnerWindow);
|
OwnerWindow);
|
||||||
if(!Window)
|
if(!Window)
|
||||||
{
|
{
|
||||||
DPRINT1("IntCreateWindow failed!\n");
|
ERR("IntCreateWindow failed!\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2006,7 +2005,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
pCbtCreate = ExAllocatePoolWithTag(NonPagedPool, sizeof(CBT_CREATEWNDW), TAG_HOOK);
|
pCbtCreate = ExAllocatePoolWithTag(NonPagedPool, sizeof(CBT_CREATEWNDW), TAG_HOOK);
|
||||||
if (!pCsw || !pCbtCreate)
|
if (!pCsw || !pCbtCreate)
|
||||||
{
|
{
|
||||||
DPRINT1("UserHeapAlloc() failed!\n");
|
ERR("UserHeapAlloc() failed!\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2024,7 +2023,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
pszClass = UserHeapAlloc(AnsiString.MaximumLength);
|
pszClass = UserHeapAlloc(AnsiString.MaximumLength);
|
||||||
if (!pszClass)
|
if (!pszClass)
|
||||||
{
|
{
|
||||||
DPRINT1("UserHeapAlloc() failed!\n");
|
ERR("UserHeapAlloc() failed!\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
RtlZeroMemory(pszClass, AnsiString.MaximumLength);
|
RtlZeroMemory(pszClass, AnsiString.MaximumLength);
|
||||||
|
@ -2038,7 +2037,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
pszClass = UserHeapAlloc(UnicodeString.MaximumLength);
|
pszClass = UserHeapAlloc(UnicodeString.MaximumLength);
|
||||||
if (!pszClass)
|
if (!pszClass)
|
||||||
{
|
{
|
||||||
DPRINT1("UserHeapAlloc() failed!\n");
|
ERR("UserHeapAlloc() failed!\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
RtlZeroMemory(pszClass, UnicodeString.MaximumLength);
|
RtlZeroMemory(pszClass, UnicodeString.MaximumLength);
|
||||||
|
@ -2061,7 +2060,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
pszName = UserHeapAlloc(AnsiString.MaximumLength);
|
pszName = UserHeapAlloc(AnsiString.MaximumLength);
|
||||||
if (!pszName)
|
if (!pszName)
|
||||||
{
|
{
|
||||||
DPRINT1("UserHeapAlloc() failed!\n");
|
ERR("UserHeapAlloc() failed!\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
RtlZeroMemory(pszName, AnsiString.MaximumLength);
|
RtlZeroMemory(pszName, AnsiString.MaximumLength);
|
||||||
|
@ -2075,7 +2074,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
pszName = UserHeapAlloc(UnicodeString.MaximumLength);
|
pszName = UserHeapAlloc(UnicodeString.MaximumLength);
|
||||||
if (!pszName)
|
if (!pszName)
|
||||||
{
|
{
|
||||||
DPRINT1("UserHeapAlloc() failed!\n");
|
ERR("UserHeapAlloc() failed!\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
RtlZeroMemory(pszName, UnicodeString.MaximumLength);
|
RtlZeroMemory(pszName, UnicodeString.MaximumLength);
|
||||||
|
@ -2092,7 +2091,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
Result = co_HOOK_CallHooks(WH_CBT, HCBT_CREATEWND, (WPARAM) hWnd, (LPARAM) pCbtCreate);
|
Result = co_HOOK_CallHooks(WH_CBT, HCBT_CREATEWND, (WPARAM) hWnd, (LPARAM) pCbtCreate);
|
||||||
if (Result != 0)
|
if (Result != 0)
|
||||||
{
|
{
|
||||||
DPRINT1("WH_CBT HCBT_CREATEWND hook failed! 0x%x\n", Result);
|
ERR("WH_CBT HCBT_CREATEWND hook failed! 0x%x\n", Result);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
// Write back changes.
|
// Write back changes.
|
||||||
|
@ -2148,7 +2147,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
Result = co_IntSendMessage(UserHMGetHandle(Window), WM_NCCREATE, 0, (LPARAM) Cs);
|
Result = co_IntSendMessage(UserHMGetHandle(Window), WM_NCCREATE, 0, (LPARAM) Cs);
|
||||||
if (!Result)
|
if (!Result)
|
||||||
{
|
{
|
||||||
DPRINT1("co_UserCreateWindowEx(): NCCREATE message failed\n");
|
ERR("co_UserCreateWindowEx(): NCCREATE message failed\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2166,7 +2165,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
Result = co_IntSendMessage(UserHMGetHandle(Window), WM_CREATE, 0, (LPARAM) Cs);
|
Result = co_IntSendMessage(UserHMGetHandle(Window), WM_CREATE, 0, (LPARAM) Cs);
|
||||||
if (Result == (LRESULT)-1)
|
if (Result == (LRESULT)-1)
|
||||||
{
|
{
|
||||||
DPRINT1("co_UserCreateWindowEx(): WM_CREATE message failed\n");
|
ERR("co_UserCreateWindowEx(): WM_CREATE message failed\n");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2239,13 +2238,13 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("co_UserCreateWindowEx(): Created window %X\n", hWnd);
|
TRACE("co_UserCreateWindowEx(): Created window %X\n", hWnd);
|
||||||
ret = Window;
|
ret = Window;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
DPRINT("co_UserCreateWindowEx(): Error Created window!\n");
|
TRACE("co_UserCreateWindowEx(): Error Created window!\n");
|
||||||
/* If the window was created, the class will be dereferenced by co_UserDestroyWindow */
|
/* If the window was created, the class will be dereferenced by co_UserDestroyWindow */
|
||||||
if (Window)
|
if (Window)
|
||||||
co_UserDestroyWindow(Window);
|
co_UserDestroyWindow(Window);
|
||||||
|
@ -2361,7 +2360,7 @@ NtUserCreateWindowEx(
|
||||||
Status = ProbeAndCaptureLargeString(&lstrWindowName, plstrWindowName);
|
Status = ProbeAndCaptureLargeString(&lstrWindowName, plstrWindowName);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("NtUserCreateWindowEx: failed to capture plstrWindowName\n");
|
ERR("NtUserCreateWindowEx: failed to capture plstrWindowName\n");
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -2382,7 +2381,7 @@ NtUserCreateWindowEx(
|
||||||
Status = ProbeAndCaptureLargeString(&lstrClassName, plstrClassName);
|
Status = ProbeAndCaptureLargeString(&lstrClassName, plstrClassName);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("NtUserCreateWindowEx: failed to capture plstrClassName\n");
|
ERR("NtUserCreateWindowEx: failed to capture plstrClassName\n");
|
||||||
/* Set last error, cleanup and return */
|
/* Set last error, cleanup and return */
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -2419,7 +2418,7 @@ NtUserCreateWindowEx(
|
||||||
|
|
||||||
if(!pwnd)
|
if(!pwnd)
|
||||||
{
|
{
|
||||||
DPRINT1("co_UserCreateWindowEx failed!\n");
|
ERR("co_UserCreateWindowEx failed!\n");
|
||||||
}
|
}
|
||||||
hwnd = pwnd ? UserHMGetHandle(pwnd) : NULL;
|
hwnd = pwnd ? UserHMGetHandle(pwnd) : NULL;
|
||||||
|
|
||||||
|
@ -2449,7 +2448,7 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWND Window)
|
||||||
|
|
||||||
hWnd = Window->head.h;
|
hWnd = Window->head.h;
|
||||||
|
|
||||||
DPRINT("co_UserDestroyWindow \n");
|
TRACE("co_UserDestroyWindow \n");
|
||||||
|
|
||||||
/* Check for owner thread */
|
/* Check for owner thread */
|
||||||
if ( (Window->head.pti->pEThread != PsGetCurrentThread()) ||
|
if ( (Window->head.pti->pEThread != PsGetCurrentThread()) ||
|
||||||
|
@ -2464,7 +2463,7 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWND Window)
|
||||||
{
|
{
|
||||||
if (co_HOOK_CallHooks(WH_CBT, HCBT_DESTROYWND, (WPARAM) hWnd, 0))
|
if (co_HOOK_CallHooks(WH_CBT, HCBT_DESTROYWND, (WPARAM) hWnd, 0))
|
||||||
{
|
{
|
||||||
DPRINT1("Destroy Window WH_CBT Call Hook return!\n");
|
ERR("Destroy Window WH_CBT Call Hook return!\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2503,7 +2502,7 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWND Window)
|
||||||
{
|
{
|
||||||
if (ti->pDeskInfo->hShellWindow == hWnd)
|
if (ti->pDeskInfo->hShellWindow == hWnd)
|
||||||
{
|
{
|
||||||
DPRINT1("Destroying the ShellWindow!\n");
|
ERR("Destroying the ShellWindow!\n");
|
||||||
ti->pDeskInfo->hShellWindow = NULL;
|
ti->pDeskInfo->hShellWindow = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2598,7 +2597,7 @@ NtUserDestroyWindow(HWND Wnd)
|
||||||
BOOLEAN ret;
|
BOOLEAN ret;
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserDestroyWindow\n");
|
TRACE("Enter NtUserDestroyWindow\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(Wnd)))
|
if (!(Window = UserGetWindowObject(Wnd)))
|
||||||
|
@ -2613,7 +2612,7 @@ NtUserDestroyWindow(HWND Wnd)
|
||||||
RETURN(ret);
|
RETURN(ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserDestroyWindow, ret=%i\n",_ret_);
|
TRACE("Leave NtUserDestroyWindow, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2714,7 +2713,7 @@ NtUserFindWindowEx(HWND hwndParent,
|
||||||
RTL_ATOM ClassAtom = (RTL_ATOM)0;
|
RTL_ATOM ClassAtom = (RTL_ATOM)0;
|
||||||
DECLARE_RETURN(HWND);
|
DECLARE_RETURN(HWND);
|
||||||
|
|
||||||
DPRINT("Enter NtUserFindWindowEx\n");
|
TRACE("Enter NtUserFindWindowEx\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
if (ucClassName != NULL || ucWindowName != NULL)
|
if (ucClassName != NULL || ucWindowName != NULL)
|
||||||
|
@ -2892,7 +2891,7 @@ NtUserFindWindowEx(HWND hwndParent,
|
||||||
RETURN( Ret);
|
RETURN( Ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserFindWindowEx, ret %i\n",_ret_);
|
TRACE("Leave NtUserFindWindowEx, ret %i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2977,7 +2976,7 @@ NtUserGetAncestor(HWND hWnd, UINT Type)
|
||||||
PWND Window, Ancestor;
|
PWND Window, Ancestor;
|
||||||
DECLARE_RETURN(HWND);
|
DECLARE_RETURN(HWND);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetAncestor\n");
|
TRACE("Enter NtUserGetAncestor\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -2991,7 +2990,7 @@ NtUserGetAncestor(HWND hWnd, UINT Type)
|
||||||
RETURN(Ancestor ? Ancestor->head.h : NULL);
|
RETURN(Ancestor ? Ancestor->head.h : NULL);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetAncestor, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetAncestor, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -3006,7 +3005,7 @@ NtUserGetComboBoxInfo(
|
||||||
PWND Wnd;
|
PWND Wnd;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetComboBoxInfo\n");
|
TRACE("Enter NtUserGetComboBoxInfo\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
if (!(Wnd = UserGetWindowObject(hWnd)))
|
if (!(Wnd = UserGetWindowObject(hWnd)))
|
||||||
|
@ -3033,7 +3032,7 @@ NtUserGetComboBoxInfo(
|
||||||
RETURN( (BOOL) co_IntSendMessage( Wnd->head.h, CB_GETCOMBOBOXINFO, 0, (LPARAM)pcbi));
|
RETURN( (BOOL) co_IntSendMessage( Wnd->head.h, CB_GETCOMBOBOXINFO, 0, (LPARAM)pcbi));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetComboBoxInfo, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetComboBoxInfo, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -3121,7 +3120,7 @@ NtUserGetListBoxInfo(
|
||||||
PWND Wnd;
|
PWND Wnd;
|
||||||
DECLARE_RETURN(DWORD);
|
DECLARE_RETURN(DWORD);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetListBoxInfo\n");
|
TRACE("Enter NtUserGetListBoxInfo\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
if (!(Wnd = UserGetWindowObject(hWnd)))
|
if (!(Wnd = UserGetWindowObject(hWnd)))
|
||||||
|
@ -3132,7 +3131,7 @@ NtUserGetListBoxInfo(
|
||||||
RETURN( (DWORD) co_IntSendMessage( Wnd->head.h, LB_GETLISTBOXINFO, 0, 0 ));
|
RETURN( (DWORD) co_IntSendMessage( Wnd->head.h, LB_GETLISTBOXINFO, 0, 0 ));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetListBoxInfo, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetListBoxInfo, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -3159,7 +3158,7 @@ NtUserSetParent(HWND hWndChild, HWND hWndNewParent)
|
||||||
{
|
{
|
||||||
DECLARE_RETURN(HWND);
|
DECLARE_RETURN(HWND);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetParent\n");
|
TRACE("Enter NtUserSetParent\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -3177,7 +3176,7 @@ NtUserSetParent(HWND hWndChild, HWND hWndNewParent)
|
||||||
RETURN( co_UserSetParent(hWndChild, hWndNewParent));
|
RETURN( co_UserSetParent(hWndChild, hWndNewParent));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetParent, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetParent, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -3231,7 +3230,7 @@ NtUserSetShellWindowEx(HWND hwndShell, HWND hwndListView)
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PTHREADINFO ti;
|
PTHREADINFO ti;
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetShellWindowEx\n");
|
TRACE("Enter NtUserSetShellWindowEx\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(WndShell = UserGetWindowObject(hwndShell)))
|
if (!(WndShell = UserGetWindowObject(hwndShell)))
|
||||||
|
@ -3309,7 +3308,7 @@ NtUserSetShellWindowEx(HWND hwndShell, HWND hwndListView)
|
||||||
RETURN( TRUE);
|
RETURN( TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetShellWindowEx, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetShellWindowEx, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -3348,7 +3347,7 @@ NtUserGetSystemMenu(HWND hWnd, BOOL bRevert)
|
||||||
PMENU_OBJECT Menu;
|
PMENU_OBJECT Menu;
|
||||||
DECLARE_RETURN(HMENU);
|
DECLARE_RETURN(HMENU);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetSystemMenu\n");
|
TRACE("Enter NtUserGetSystemMenu\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -3364,7 +3363,7 @@ NtUserGetSystemMenu(HWND hWnd, BOOL bRevert)
|
||||||
RETURN(Menu->MenuInfo.Self);
|
RETURN(Menu->MenuInfo.Self);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetSystemMenu, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetSystemMenu, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -3384,7 +3383,7 @@ NtUserSetSystemMenu(HWND hWnd, HMENU hMenu)
|
||||||
PMENU_OBJECT Menu;
|
PMENU_OBJECT Menu;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetSystemMenu\n");
|
TRACE("Enter NtUserSetSystemMenu\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -3408,7 +3407,7 @@ NtUserSetSystemMenu(HWND hWnd, HMENU hMenu)
|
||||||
RETURN( Result);
|
RETURN( Result);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetSystemMenu, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetSystemMenu, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -3523,7 +3522,7 @@ co_UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DPRINT1("NtUserSetWindowLong(): Unsupported index %d\n", Index);
|
ERR("NtUserSetWindowLong(): Unsupported index %d\n", Index);
|
||||||
EngSetLastError(ERROR_INVALID_INDEX);
|
EngSetLastError(ERROR_INVALID_INDEX);
|
||||||
OldValue = 0;
|
OldValue = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -3549,13 +3548,13 @@ NtUserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
|
||||||
{
|
{
|
||||||
DECLARE_RETURN(LONG);
|
DECLARE_RETURN(LONG);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetWindowLong\n");
|
TRACE("Enter NtUserSetWindowLong\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
RETURN( co_UserSetWindowLong(hWnd, Index, NewValue, Ansi));
|
RETURN( co_UserSetWindowLong(hWnd, Index, NewValue, Ansi));
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetWindowLong, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetWindowLong, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -3576,7 +3575,7 @@ NtUserSetWindowWord(HWND hWnd, INT Index, WORD NewValue)
|
||||||
WORD OldValue;
|
WORD OldValue;
|
||||||
DECLARE_RETURN(WORD);
|
DECLARE_RETURN(WORD);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetWindowWord\n");
|
TRACE("Enter NtUserSetWindowWord\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -3610,7 +3609,7 @@ NtUserSetWindowWord(HWND hWnd, INT Index, WORD NewValue)
|
||||||
RETURN( OldValue);
|
RETURN( OldValue);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetWindowWord, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetWindowWord, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -3628,7 +3627,7 @@ NtUserGetWindowPlacement(HWND hWnd,
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetWindowPlacement\n");
|
TRACE("Enter NtUserGetWindowPlacement\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
if (!(Wnd = UserGetWindowObject(hWnd)))
|
if (!(Wnd = UserGetWindowObject(hWnd)))
|
||||||
|
@ -3686,7 +3685,7 @@ NtUserGetWindowPlacement(HWND hWnd,
|
||||||
RETURN( TRUE);
|
RETURN( TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserGetWindowPlacement, ret=%i\n",_ret_);
|
TRACE("Leave NtUserGetWindowPlacement, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -3715,7 +3714,7 @@ NtUserQueryWindow(HWND hWnd, DWORD Index)
|
||||||
DWORD Result;
|
DWORD Result;
|
||||||
DECLARE_RETURN(UINT);
|
DECLARE_RETURN(UINT);
|
||||||
|
|
||||||
DPRINT("Enter NtUserQueryWindow\n");
|
TRACE("Enter NtUserQueryWindow\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
if (!(pWnd = UserGetWindowObject(hWnd)))
|
if (!(pWnd = UserGetWindowObject(hWnd)))
|
||||||
|
@ -3756,7 +3755,7 @@ NtUserQueryWindow(HWND hWnd, DWORD Index)
|
||||||
RETURN( Result);
|
RETURN( Result);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserQueryWindow, ret=%i\n",_ret_);
|
TRACE("Leave NtUserQueryWindow, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -3773,7 +3772,7 @@ NtUserRegisterWindowMessage(PUNICODE_STRING MessageNameUnsafe)
|
||||||
UINT Ret;
|
UINT Ret;
|
||||||
DECLARE_RETURN(UINT);
|
DECLARE_RETURN(UINT);
|
||||||
|
|
||||||
DPRINT("Enter NtUserRegisterWindowMessage\n");
|
TRACE("Enter NtUserRegisterWindowMessage\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(MessageNameUnsafe == NULL)
|
if(MessageNameUnsafe == NULL)
|
||||||
|
@ -3795,7 +3794,7 @@ NtUserRegisterWindowMessage(PUNICODE_STRING MessageNameUnsafe)
|
||||||
RETURN( Ret);
|
RETURN( Ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserRegisterWindowMessage, ret=%i\n",_ret_);
|
TRACE("Leave NtUserRegisterWindowMessage, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -3814,7 +3813,7 @@ NtUserSetMenu(
|
||||||
BOOL Changed;
|
BOOL Changed;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetMenu\n");
|
TRACE("Enter NtUserSetMenu\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)))
|
if (!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -3841,7 +3840,7 @@ NtUserSetMenu(
|
||||||
RETURN( TRUE);
|
RETURN( TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetMenu, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetMenu, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -3857,7 +3856,7 @@ NtUserSetWindowFNID(HWND hWnd,
|
||||||
PWND Wnd;
|
PWND Wnd;
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetWindowFNID\n");
|
TRACE("Enter NtUserSetWindowFNID\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Wnd = UserGetWindowObject(hWnd)))
|
if (!(Wnd = UserGetWindowObject(hWnd)))
|
||||||
|
@ -3886,7 +3885,7 @@ NtUserSetWindowFNID(HWND hWnd,
|
||||||
RETURN( TRUE);
|
RETURN( TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetWindowFNID\n");
|
TRACE("Leave NtUserSetWindowFNID\n");
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -3904,7 +3903,7 @@ NtUserWindowFromPoint(LONG X, LONG Y)
|
||||||
DECLARE_RETURN(HWND);
|
DECLARE_RETURN(HWND);
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserWindowFromPoint\n");
|
TRACE("Enter NtUserWindowFromPoint\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if ((DesktopWindow = UserGetWindowObject(IntGetDesktopWindow())))
|
if ((DesktopWindow = UserGetWindowObject(IntGetDesktopWindow())))
|
||||||
|
@ -3935,7 +3934,7 @@ CLEANUP:
|
||||||
if (Window) UserDereferenceObject(Window);
|
if (Window) UserDereferenceObject(Window);
|
||||||
if (DesktopWindow) UserDerefObjectCo(DesktopWindow);
|
if (DesktopWindow) UserDerefObjectCo(DesktopWindow);
|
||||||
|
|
||||||
DPRINT("Leave NtUserWindowFromPoint, ret=%i\n",_ret_);
|
TRACE("Leave NtUserWindowFromPoint, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
|
|
||||||
|
@ -3959,7 +3958,7 @@ NtUserDefSetText(HWND hWnd, PLARGE_STRING WindowText)
|
||||||
UNICODE_STRING UnicodeString;
|
UNICODE_STRING UnicodeString;
|
||||||
BOOL Ret = TRUE;
|
BOOL Ret = TRUE;
|
||||||
|
|
||||||
DPRINT("Enter NtUserDefSetText\n");
|
TRACE("Enter NtUserDefSetText\n");
|
||||||
|
|
||||||
if (WindowText != NULL)
|
if (WindowText != NULL)
|
||||||
{
|
{
|
||||||
|
@ -4073,7 +4072,7 @@ NtUserDefSetText(HWND hWnd, PLARGE_STRING WindowText)
|
||||||
Ret = TRUE;
|
Ret = TRUE;
|
||||||
Exit:
|
Exit:
|
||||||
if (UnicodeString.Buffer) RtlFreeUnicodeString(&UnicodeString);
|
if (UnicodeString.Buffer) RtlFreeUnicodeString(&UnicodeString);
|
||||||
DPRINT("Leave NtUserDefSetText, ret=%i\n", Ret);
|
TRACE("Leave NtUserDefSetText, ret=%i\n", Ret);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
@ -4093,7 +4092,7 @@ NtUserInternalGetWindowText(HWND hWnd, LPWSTR lpString, INT nMaxCount)
|
||||||
INT Result;
|
INT Result;
|
||||||
DECLARE_RETURN(INT);
|
DECLARE_RETURN(INT);
|
||||||
|
|
||||||
DPRINT("Enter NtUserInternalGetWindowText\n");
|
TRACE("Enter NtUserInternalGetWindowText\n");
|
||||||
UserEnterShared();
|
UserEnterShared();
|
||||||
|
|
||||||
if(lpString && (nMaxCount <= 1))
|
if(lpString && (nMaxCount <= 1))
|
||||||
|
@ -4139,7 +4138,7 @@ NtUserInternalGetWindowText(HWND hWnd, LPWSTR lpString, INT nMaxCount)
|
||||||
RETURN( Result);
|
RETURN( Result);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserInternalGetWindowText, ret=%i\n",_ret_);
|
TRACE("Leave NtUserInternalGetWindowText, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -4273,7 +4272,7 @@ NtUserValidateHandleSecure(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ /* Is handle entry restricted? */
|
{ /* Is handle entry restricted? */
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserWinpos);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
co_IntPaintWindows(PWND Window, ULONG Flags, BOOL Recurse);
|
co_IntPaintWindows(PWND Window, ULONG Flags, BOOL Recurse);
|
||||||
|
@ -202,7 +201,7 @@ co_WinPosArrangeIconicWindows(PWND parent)
|
||||||
xspacing = UserGetSystemMetrics(SM_CXICONSPACING);
|
xspacing = UserGetSystemMetrics(SM_CXICONSPACING);
|
||||||
yspacing = UserGetSystemMetrics(SM_CYICONSPACING);
|
yspacing = UserGetSystemMetrics(SM_CYICONSPACING);
|
||||||
|
|
||||||
DPRINT("X:%d Y:%d XS:%d YS:%d\n",x,y,xspacing,yspacing);
|
TRACE("X:%d Y:%d XS:%d YS:%d\n",x,y,xspacing,yspacing);
|
||||||
|
|
||||||
for( i = 0; List[i]; i++)
|
for( i = 0; List[i]; i++)
|
||||||
{
|
{
|
||||||
|
@ -239,7 +238,7 @@ co_WinPosArrangeIconicWindows(PWND parent)
|
||||||
static VOID FASTCALL
|
static VOID FASTCALL
|
||||||
WinPosFindIconPos(PWND Window, POINT *Pos)
|
WinPosFindIconPos(PWND Window, POINT *Pos)
|
||||||
{
|
{
|
||||||
DPRINT1("WinPosFindIconPos FIXME!\n");
|
ERR("WinPosFindIconPos FIXME!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID FASTCALL
|
VOID FASTCALL
|
||||||
|
@ -300,7 +299,7 @@ co_WinPosMinMaximize(PWND Wnd, UINT ShowFlag, RECT* NewPos)
|
||||||
|
|
||||||
if (co_HOOK_CallHooks( WH_CBT, HCBT_MINMAX, (WPARAM)Wnd->head.h, ShowFlag))
|
if (co_HOOK_CallHooks( WH_CBT, HCBT_MINMAX, (WPARAM)Wnd->head.h, ShowFlag))
|
||||||
{
|
{
|
||||||
DPRINT1("WinPosMinMaximize WH_CBT Call Hook return!\n");
|
ERR("WinPosMinMaximize WH_CBT Call Hook return!\n");
|
||||||
return SWP_NOSIZE | SWP_NOMOVE;
|
return SWP_NOSIZE | SWP_NOMOVE;
|
||||||
}
|
}
|
||||||
if (Wnd->style & WS_MINIMIZE)
|
if (Wnd->style & WS_MINIMIZE)
|
||||||
|
@ -339,7 +338,7 @@ co_WinPosMinMaximize(PWND Wnd, UINT ShowFlag, RECT* NewPos)
|
||||||
{
|
{
|
||||||
co_WinPosGetMinMaxInfo(Wnd, &Size, &Wnd->InternalPos.MaxPos,
|
co_WinPosGetMinMaxInfo(Wnd, &Size, &Wnd->InternalPos.MaxPos,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
DPRINT("Maximize: %d,%d %dx%d\n",
|
TRACE("Maximize: %d,%d %dx%d\n",
|
||||||
Wnd->InternalPos.MaxPos.x, Wnd->InternalPos.MaxPos.y, Size.x, Size.y);
|
Wnd->InternalPos.MaxPos.x, Wnd->InternalPos.MaxPos.y, Size.x, Size.y);
|
||||||
if (Wnd->style & WS_MINIMIZE)
|
if (Wnd->style & WS_MINIMIZE)
|
||||||
{
|
{
|
||||||
|
@ -1059,7 +1058,7 @@ co_WinPosSetWindowPos(
|
||||||
|
|
||||||
WvrFlags = co_WinPosDoNCCALCSize(Window, &WinPos, &NewWindowRect, &NewClientRect);
|
WvrFlags = co_WinPosDoNCCALCSize(Window, &WinPos, &NewWindowRect, &NewClientRect);
|
||||||
|
|
||||||
//DPRINT1("co_WinPosDoNCCALCSize");
|
TRACE("co_WinPosDoNCCALCSize");
|
||||||
|
|
||||||
/* Relink windows. (also take into account shell window in hwndShellWindow) */
|
/* Relink windows. (also take into account shell window in hwndShellWindow) */
|
||||||
if (!(WinPos.flags & SWP_NOZORDER) && WinPos.hwnd != UserGetShellWindow())
|
if (!(WinPos.flags & SWP_NOZORDER) && WinPos.hwnd != UserGetShellWindow())
|
||||||
|
@ -1695,7 +1694,7 @@ IntDeferWindowPos( HDWP hdwp,
|
||||||
int i;
|
int i;
|
||||||
HDWP retvalue = hdwp;
|
HDWP retvalue = hdwp;
|
||||||
|
|
||||||
DPRINT("hdwp %p, hwnd %p, after %p, %d,%d (%dx%d), flags %08x\n",
|
TRACE("hdwp %p, hwnd %p, after %p, %d,%d (%dx%d), flags %08x\n",
|
||||||
hdwp, hwnd, hwndAfter, x, y, cx, cy, flags);
|
hdwp, hwnd, hwndAfter, x, y, cx, cy, flags);
|
||||||
|
|
||||||
if (flags & ~(SWP_NOSIZE | SWP_NOMOVE |
|
if (flags & ~(SWP_NOSIZE | SWP_NOMOVE |
|
||||||
|
@ -1777,7 +1776,7 @@ BOOL FASTCALL IntEndDeferWindowPosEx( HDWP hdwp )
|
||||||
BOOL res = TRUE;
|
BOOL res = TRUE;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
DPRINT("%p\n", hdwp);
|
TRACE("%p\n", hdwp);
|
||||||
|
|
||||||
if (!(pDWP = (PSMWP)UserGetObject(gHandleTable, hdwp, otSMWP)))
|
if (!(pDWP = (PSMWP)UserGetObject(gHandleTable, hdwp, otSMWP)))
|
||||||
{
|
{
|
||||||
|
@ -1787,7 +1786,7 @@ BOOL FASTCALL IntEndDeferWindowPosEx( HDWP hdwp )
|
||||||
|
|
||||||
for (i = 0, winpos = pDWP->acvr; res && i < pDWP->ccvr; i++, winpos++)
|
for (i = 0, winpos = pDWP->acvr; res && i < pDWP->ccvr; i++, winpos++)
|
||||||
{
|
{
|
||||||
DPRINT("hwnd %p, after %p, %d,%d (%dx%d), flags %08x\n",
|
TRACE("hwnd %p, after %p, %d,%d (%dx%d), flags %08x\n",
|
||||||
winpos->pos.hwnd, winpos->pos.hwndInsertAfter, winpos->pos.x, winpos->pos.y,
|
winpos->pos.hwnd, winpos->pos.hwndInsertAfter, winpos->pos.x, winpos->pos.y,
|
||||||
winpos->pos.cx, winpos->pos.cy, winpos->pos.flags);
|
winpos->pos.cx, winpos->pos.cy, winpos->pos.flags);
|
||||||
|
|
||||||
|
@ -1879,10 +1878,10 @@ NtUserEndDeferWindowPosEx(HDWP WinPosInfo,
|
||||||
DWORD Unknown1)
|
DWORD Unknown1)
|
||||||
{
|
{
|
||||||
BOOL Ret;
|
BOOL Ret;
|
||||||
DPRINT("Enter NtUserEndDeferWindowPosEx\n");
|
TRACE("Enter NtUserEndDeferWindowPosEx\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
Ret = IntEndDeferWindowPosEx(WinPosInfo);
|
Ret = IntEndDeferWindowPosEx(WinPosInfo);
|
||||||
DPRINT("Leave NtUserEndDeferWindowPosEx, ret=%i\n", Ret);
|
TRACE("Leave NtUserEndDeferWindowPosEx, ret=%i\n", Ret);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
@ -1906,7 +1905,7 @@ NtUserDeferWindowPos(HDWP WinPosInfo,
|
||||||
SWP_NOCOPYBITS|SWP_HIDEWINDOW|SWP_SHOWWINDOW|SWP_FRAMECHANGED|
|
SWP_NOCOPYBITS|SWP_HIDEWINDOW|SWP_SHOWWINDOW|SWP_FRAMECHANGED|
|
||||||
SWP_NOACTIVATE|SWP_NOREDRAW|SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE);
|
SWP_NOACTIVATE|SWP_NOREDRAW|SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE);
|
||||||
|
|
||||||
DPRINT("Enter NtUserDeferWindowPos\n");
|
TRACE("Enter NtUserDeferWindowPos\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if ( Flags & Tmp )
|
if ( Flags & Tmp )
|
||||||
|
@ -1940,7 +1939,7 @@ NtUserDeferWindowPos(HDWP WinPosInfo,
|
||||||
Ret = IntDeferWindowPos(WinPosInfo, Wnd, WndInsertAfter, x, y, cx, cy, Flags);
|
Ret = IntDeferWindowPos(WinPosInfo, Wnd, WndInsertAfter, x, y, cx, cy, Flags);
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
DPRINT("Leave NtUserDeferWindowPos, ret=%i\n", Ret);
|
TRACE("Leave NtUserDeferWindowPos, ret=%i\n", Ret);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
@ -1980,7 +1979,7 @@ NtUserSetWindowPos(
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetWindowPos\n");
|
TRACE("Enter NtUserSetWindowPos\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)) || // FIXME:
|
if (!(Window = UserGetWindowObject(hWnd)) || // FIXME:
|
||||||
|
@ -2027,7 +2026,7 @@ NtUserSetWindowPos(
|
||||||
RETURN(ret);
|
RETURN(ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetWindowPos, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetWindowPos, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2047,7 +2046,7 @@ NtUserSetWindowRgn(
|
||||||
BOOLEAN Ret = FALSE;
|
BOOLEAN Ret = FALSE;
|
||||||
DECLARE_RETURN(INT);
|
DECLARE_RETURN(INT);
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetWindowRgn\n");
|
TRACE("Enter NtUserSetWindowRgn\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)) || // FIXME:
|
if (!(Window = UserGetWindowObject(hWnd)) || // FIXME:
|
||||||
|
@ -2095,7 +2094,7 @@ NtUserSetWindowRgn(
|
||||||
RETURN( (INT)Ret);
|
RETURN( (INT)Ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetWindowRgn, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetWindowRgn, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2112,7 +2111,7 @@ NtUserSetWindowPlacement(HWND hWnd,
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserSetWindowPlacement\n");
|
TRACE("Enter NtUserSetWindowPlacement\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Wnd = UserGetWindowObject(hWnd)) || // FIXME:
|
if (!(Wnd = UserGetWindowObject(hWnd)) || // FIXME:
|
||||||
|
@ -2162,7 +2161,7 @@ NtUserSetWindowPlacement(HWND hWnd,
|
||||||
RETURN(TRUE);
|
RETURN(TRUE);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserSetWindowPlacement, ret=%i\n",_ret_);
|
TRACE("Leave NtUserSetWindowPlacement, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2174,7 +2173,7 @@ BOOL APIENTRY
|
||||||
NtUserShowWindowAsync(HWND hWnd, LONG nCmdShow)
|
NtUserShowWindowAsync(HWND hWnd, LONG nCmdShow)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
UNIMPLEMENTED
|
STUB
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
return NtUserShowWindow(hWnd, nCmdShow);
|
return NtUserShowWindow(hWnd, nCmdShow);
|
||||||
|
@ -2192,7 +2191,7 @@ NtUserShowWindow(HWND hWnd, LONG nCmdShow)
|
||||||
DECLARE_RETURN(BOOL);
|
DECLARE_RETURN(BOOL);
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserShowWindow\n");
|
TRACE("Enter NtUserShowWindow\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if (!(Window = UserGetWindowObject(hWnd)) || // FIXME:
|
if (!(Window = UserGetWindowObject(hWnd)) || // FIXME:
|
||||||
|
@ -2215,7 +2214,7 @@ NtUserShowWindow(HWND hWnd, LONG nCmdShow)
|
||||||
RETURN(ret);
|
RETURN(ret);
|
||||||
|
|
||||||
CLEANUP:
|
CLEANUP:
|
||||||
DPRINT("Leave NtUserShowWindow, ret=%i\n",_ret_);
|
TRACE("Leave NtUserShowWindow, ret=%i\n",_ret_);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
END_CLEANUP;
|
END_CLEANUP;
|
||||||
}
|
}
|
||||||
|
@ -2235,7 +2234,7 @@ NtUserGetMinMaxInfo(
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
USER_REFERENCE_ENTRY Ref;
|
USER_REFERENCE_ENTRY Ref;
|
||||||
|
|
||||||
DPRINT("Enter NtUserGetMinMaxInfo\n");
|
TRACE("Enter NtUserGetMinMaxInfo\n");
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
if(!(Window = UserGetWindowObject(hWnd)))
|
if(!(Window = UserGetWindowObject(hWnd)))
|
||||||
|
@ -2267,7 +2266,7 @@ NtUserGetMinMaxInfo(
|
||||||
cleanup:
|
cleanup:
|
||||||
if (Window) UserDerefObjectCo(Window);
|
if (Window) UserDerefObjectCo(Window);
|
||||||
|
|
||||||
DPRINT("Leave NtUserGetMinMaxInfo, ret=%i\n", ret);
|
TRACE("Leave NtUserGetMinMaxInfo, ret=%i\n", ret);
|
||||||
UserLeave();
|
UserLeave();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,8 +35,7 @@
|
||||||
|
|
||||||
#include <win32k.h>
|
#include <win32k.h>
|
||||||
|
|
||||||
#define NDEBUG
|
DBG_DEFAULT_CHANNEL(UserWinsta);
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
/* GLOBALS *******************************************************************/
|
/* GLOBALS *******************************************************************/
|
||||||
|
|
||||||
|
@ -80,7 +79,7 @@ InitWindowStationImpl(VOID)
|
||||||
&ObjectAttributes);
|
&ObjectAttributes);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Could not create \\Windows\\WindowStations directory "
|
TRACE("Could not create \\Windows\\WindowStations directory "
|
||||||
"(Status 0x%X)\n", Status);
|
"(Status 0x%X)\n", Status);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -117,7 +116,7 @@ IntWinStaObjectDelete(PWIN32_DELETEMETHOD_PARAMETERS Parameters)
|
||||||
{
|
{
|
||||||
PWINSTATION_OBJECT WinSta = (PWINSTATION_OBJECT)Parameters->Object;
|
PWINSTATION_OBJECT WinSta = (PWINSTATION_OBJECT)Parameters->Object;
|
||||||
|
|
||||||
DPRINT("Deleting window station (0x%X)\n", WinSta);
|
TRACE("Deleting window station (0x%X)\n", WinSta);
|
||||||
|
|
||||||
RtlDestroyAtomTable(WinSta->AtomTable);
|
RtlDestroyAtomTable(WinSta->AtomTable);
|
||||||
|
|
||||||
|
@ -278,7 +277,7 @@ IntValidateWindowStationHandle(
|
||||||
|
|
||||||
if (WindowStation == NULL)
|
if (WindowStation == NULL)
|
||||||
{
|
{
|
||||||
// DPRINT1("Invalid window station handle\n");
|
// ERR("Invalid window station handle\n");
|
||||||
EngSetLastError(ERROR_INVALID_HANDLE);
|
EngSetLastError(ERROR_INVALID_HANDLE);
|
||||||
return STATUS_INVALID_HANDLE;
|
return STATUS_INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
@ -454,7 +453,7 @@ NtUserCreateWindowStation(
|
||||||
|
|
||||||
if (! NT_SUCCESS(Status))
|
if (! NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("Failed reading capturing window station name\n");
|
ERR("Failed reading capturing window station name\n");
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -507,7 +506,7 @@ NtUserCreateWindowStation(
|
||||||
|
|
||||||
if (!IntSetupClipboard(WindowStationObject))
|
if (!IntSetupClipboard(WindowStationObject))
|
||||||
{
|
{
|
||||||
DPRINT1("WindowStation: Error Setting up the clipboard!!!\n");
|
ERR("WindowStation: Error Setting up the clipboard!!!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (InputWindowStation == NULL)
|
if (InputWindowStation == NULL)
|
||||||
|
@ -599,7 +598,7 @@ NtUserCloseWindowStation(
|
||||||
PWINSTATION_OBJECT Object;
|
PWINSTATION_OBJECT Object;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
DPRINT("About to close window station handle (0x%X)\n", hWinSta);
|
TRACE("About to close window station handle (0x%X)\n", hWinSta);
|
||||||
|
|
||||||
if (hWinSta == UserGetProcessWindowStation())
|
if (hWinSta == UserGetProcessWindowStation())
|
||||||
{
|
{
|
||||||
|
@ -614,13 +613,13 @@ NtUserCloseWindowStation(
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Validation of window station handle (0x%X) failed\n", hWinSta);
|
TRACE("Validation of window station handle (0x%X) failed\n", hWinSta);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ObDereferenceObject(Object);
|
ObDereferenceObject(Object);
|
||||||
|
|
||||||
DPRINT("Closing window station handle (0x%X)\n", hWinSta);
|
TRACE("Closing window station handle (0x%X)\n", hWinSta);
|
||||||
|
|
||||||
Status = ObCloseHandle(hWinSta, UserMode);
|
Status = ObCloseHandle(hWinSta, UserMode);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
@ -687,7 +686,7 @@ NtUserGetObjectInformation(
|
||||||
DWORD nDataSize = 0;
|
DWORD nDataSize = 0;
|
||||||
|
|
||||||
/* try windowstation */
|
/* try windowstation */
|
||||||
DPRINT("Trying to open window station 0x%x\n", hObject);
|
TRACE("Trying to open window station 0x%x\n", hObject);
|
||||||
Status = IntValidateWindowStationHandle(
|
Status = IntValidateWindowStationHandle(
|
||||||
hObject,
|
hObject,
|
||||||
UserMode,/*ExGetPreviousMode(),*/
|
UserMode,/*ExGetPreviousMode(),*/
|
||||||
|
@ -697,7 +696,7 @@ NtUserGetObjectInformation(
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status) && Status != STATUS_OBJECT_TYPE_MISMATCH)
|
if (!NT_SUCCESS(Status) && Status != STATUS_OBJECT_TYPE_MISMATCH)
|
||||||
{
|
{
|
||||||
DPRINT("Failed: 0x%x\n", Status);
|
TRACE("Failed: 0x%x\n", Status);
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -705,7 +704,7 @@ NtUserGetObjectInformation(
|
||||||
if (Status == STATUS_OBJECT_TYPE_MISMATCH)
|
if (Status == STATUS_OBJECT_TYPE_MISMATCH)
|
||||||
{
|
{
|
||||||
/* try desktop */
|
/* try desktop */
|
||||||
DPRINT("Trying to open desktop 0x%x\n", hObject);
|
TRACE("Trying to open desktop 0x%x\n", hObject);
|
||||||
Status = IntValidateDesktopHandle(
|
Status = IntValidateDesktopHandle(
|
||||||
hObject,
|
hObject,
|
||||||
UserMode,/*ExGetPreviousMode(),*/
|
UserMode,/*ExGetPreviousMode(),*/
|
||||||
|
@ -713,19 +712,19 @@ NtUserGetObjectInformation(
|
||||||
&DesktopObject);
|
&DesktopObject);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Failed: 0x%x\n", Status);
|
TRACE("Failed: 0x%x\n", Status);
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DPRINT("WinSta or Desktop opened!!\n");
|
TRACE("WinSta or Desktop opened!!\n");
|
||||||
|
|
||||||
/* get data */
|
/* get data */
|
||||||
switch (nIndex)
|
switch (nIndex)
|
||||||
{
|
{
|
||||||
case UOI_FLAGS:
|
case UOI_FLAGS:
|
||||||
Status = STATUS_NOT_IMPLEMENTED;
|
Status = STATUS_NOT_IMPLEMENTED;
|
||||||
DPRINT1("UOI_FLAGS unimplemented!\n");
|
ERR("UOI_FLAGS unimplemented!\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UOI_NAME:
|
case UOI_NAME:
|
||||||
|
@ -764,7 +763,7 @@ NtUserGetObjectInformation(
|
||||||
|
|
||||||
case UOI_USER_SID:
|
case UOI_USER_SID:
|
||||||
Status = STATUS_NOT_IMPLEMENTED;
|
Status = STATUS_NOT_IMPLEMENTED;
|
||||||
DPRINT1("UOI_USER_SID unimplemented!\n");
|
ERR("UOI_USER_SID unimplemented!\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -775,7 +774,7 @@ NtUserGetObjectInformation(
|
||||||
/* try to copy data to caller */
|
/* try to copy data to caller */
|
||||||
if (Status == STATUS_SUCCESS)
|
if (Status == STATUS_SUCCESS)
|
||||||
{
|
{
|
||||||
DPRINT("Trying to copy data to caller (len = %d, len needed = %d)\n", nLength, nDataSize);
|
TRACE("Trying to copy data to caller (len = %d, len needed = %d)\n", nLength, nDataSize);
|
||||||
*nLengthNeeded = nDataSize;
|
*nLengthNeeded = nDataSize;
|
||||||
if (nLength >= nDataSize)
|
if (nLength >= nDataSize)
|
||||||
Status = MmCopyToCaller(pvInformation, pvData, nDataSize);
|
Status = MmCopyToCaller(pvInformation, pvData, nDataSize);
|
||||||
|
@ -853,7 +852,7 @@ UserGetProcessWindowStation(VOID)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("Should use ObFindHandleForObject\n");
|
ERR("Should use ObFindHandleForObject\n");
|
||||||
pti = PsGetCurrentThreadWin32Thread();
|
pti = PsGetCurrentThreadWin32Thread();
|
||||||
Status = ObOpenObjectByPointer(pti->rpdesk->rpwinstaParent,
|
Status = ObOpenObjectByPointer(pti->rpdesk->rpwinstaParent,
|
||||||
0,
|
0,
|
||||||
|
@ -865,7 +864,7 @@ UserGetProcessWindowStation(VOID)
|
||||||
if (! NT_SUCCESS(Status))
|
if (! NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
DPRINT1("Unable to open handle for CSRSSs winsta, status 0x%08x\n",
|
ERR("Unable to open handle for CSRSSs winsta, status 0x%08x\n",
|
||||||
Status);
|
Status);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -950,7 +949,7 @@ UserSetProcessWindowStation(HWINSTA hWindowStation)
|
||||||
&NewWinSta);
|
&NewWinSta);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Validation of window station handle (0x%X) failed\n",
|
TRACE("Validation of window station handle (0x%X) failed\n",
|
||||||
hWindowStation);
|
hWindowStation);
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1029,12 +1028,12 @@ NtUserLockWindowStation(HWINSTA hWindowStation)
|
||||||
PWINSTATION_OBJECT Object;
|
PWINSTATION_OBJECT Object;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
DPRINT("About to set process window station with handle (0x%X)\n",
|
TRACE("About to set process window station with handle (0x%X)\n",
|
||||||
hWindowStation);
|
hWindowStation);
|
||||||
|
|
||||||
if(PsGetCurrentProcessWin32Process() != LogonProcess)
|
if(PsGetCurrentProcessWin32Process() != LogonProcess)
|
||||||
{
|
{
|
||||||
DPRINT1("Unauthorized process attempted to lock the window station!\n");
|
ERR("Unauthorized process attempted to lock the window station!\n");
|
||||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1046,7 +1045,7 @@ NtUserLockWindowStation(HWINSTA hWindowStation)
|
||||||
&Object);
|
&Object);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Validation of window station handle (0x%X) failed\n",
|
TRACE("Validation of window station handle (0x%X) failed\n",
|
||||||
hWindowStation);
|
hWindowStation);
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1074,12 +1073,12 @@ NtUserUnlockWindowStation(HWINSTA hWindowStation)
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
BOOL Ret;
|
BOOL Ret;
|
||||||
|
|
||||||
DPRINT("About to set process window station with handle (0x%X)\n",
|
TRACE("About to set process window station with handle (0x%X)\n",
|
||||||
hWindowStation);
|
hWindowStation);
|
||||||
|
|
||||||
if(PsGetCurrentProcessWin32Process() != LogonProcess)
|
if(PsGetCurrentProcessWin32Process() != LogonProcess)
|
||||||
{
|
{
|
||||||
DPRINT1("Unauthorized process attempted to unlock the window station!\n");
|
ERR("Unauthorized process attempted to unlock the window station!\n");
|
||||||
EngSetLastError(ERROR_ACCESS_DENIED);
|
EngSetLastError(ERROR_ACCESS_DENIED);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1091,7 +1090,7 @@ NtUserUnlockWindowStation(HWINSTA hWindowStation)
|
||||||
&Object);
|
&Object);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Validation of window station handle (0x%X) failed\n",
|
TRACE("Validation of window station handle (0x%X) failed\n",
|
||||||
hWindowStation);
|
hWindowStation);
|
||||||
SetLastNtError(Status);
|
SetLastNtError(Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1199,7 +1198,7 @@ BuildWindowStationNameList(
|
||||||
ReturnLength += DirEntry->Name.Length + sizeof(WCHAR);
|
ReturnLength += DirEntry->Name.Length + sizeof(WCHAR);
|
||||||
EntryCount++;
|
EntryCount++;
|
||||||
}
|
}
|
||||||
DPRINT("Required size: %d Entry count: %d\n", ReturnLength, EntryCount);
|
TRACE("Required size: %d Entry count: %d\n", ReturnLength, EntryCount);
|
||||||
if (NULL != pRequiredSize)
|
if (NULL != pRequiredSize)
|
||||||
{
|
{
|
||||||
Status = MmCopyToCaller(pRequiredSize, &ReturnLength, sizeof(ULONG));
|
Status = MmCopyToCaller(pRequiredSize, &ReturnLength, sizeof(ULONG));
|
||||||
|
@ -1316,7 +1315,7 @@ BuildDesktopNameList(
|
||||||
ReturnLength += ((PUNICODE_STRING)GET_DESKTOP_NAME(DesktopObject))->Length + sizeof(WCHAR);
|
ReturnLength += ((PUNICODE_STRING)GET_DESKTOP_NAME(DesktopObject))->Length + sizeof(WCHAR);
|
||||||
EntryCount++;
|
EntryCount++;
|
||||||
}
|
}
|
||||||
DPRINT("Required size: %d Entry count: %d\n", ReturnLength, EntryCount);
|
TRACE("Required size: %d Entry count: %d\n", ReturnLength, EntryCount);
|
||||||
if (NULL != pRequiredSize)
|
if (NULL != pRequiredSize)
|
||||||
{
|
{
|
||||||
Status = MmCopyToCaller(pRequiredSize, &ReturnLength, sizeof(ULONG));
|
Status = MmCopyToCaller(pRequiredSize, &ReturnLength, sizeof(ULONG));
|
||||||
|
|
|
@ -55,13 +55,16 @@ DBG_CHANNEL DbgChannels[DbgChCount]={
|
||||||
{L"GdiText", DbgChGdiText},
|
{L"GdiText", DbgChGdiText},
|
||||||
{L"GdiXFormObj", DbgChGdiXFormObj},
|
{L"GdiXFormObj", DbgChGdiXFormObj},
|
||||||
{L"UserAccel", DbgChUserAccel},
|
{L"UserAccel", DbgChUserAccel},
|
||||||
{L"UserCalproc", DbgChUserCalproc},
|
{L"UserCallback", DbgChUserCallback},
|
||||||
|
{L"UserCallProc", DbgChUserCallProc},
|
||||||
{L"UserCaret", DbgChUserCaret},
|
{L"UserCaret", DbgChUserCaret},
|
||||||
{L"UserClass", DbgChUserClass},
|
{L"UserClass", DbgChUserClass},
|
||||||
{L"UserClipbrd", DbgChUserClipbrd},
|
{L"UserClipbrd", DbgChUserClipbrd},
|
||||||
{L"UserCsr", DbgChUserCsr},
|
{L"UserCsr", DbgChUserCsr},
|
||||||
{L"UserDce", DbgChUserDce},
|
{L"UserDce", DbgChUserDce},
|
||||||
|
{L"UserDefwnd", DbgChUserDefwnd},
|
||||||
{L"UserDesktop", DbgChUserDesktop},
|
{L"UserDesktop", DbgChUserDesktop},
|
||||||
|
{L"UserDisplay",DbgChUserDisplay},
|
||||||
{L"UserEvent", DbgChUserEvent},
|
{L"UserEvent", DbgChUserEvent},
|
||||||
{L"UserFocus", DbgChUserFocus},
|
{L"UserFocus", DbgChUserFocus},
|
||||||
{L"UserHook", DbgChUserHook},
|
{L"UserHook", DbgChUserHook},
|
||||||
|
@ -72,20 +75,21 @@ DBG_CHANNEL DbgChannels[DbgChCount]={
|
||||||
{L"UserKbdLayout", DbgChUserKbdLayout},
|
{L"UserKbdLayout", DbgChUserKbdLayout},
|
||||||
{L"UserMenu", DbgChUserMenu},
|
{L"UserMenu", DbgChUserMenu},
|
||||||
{L"UserMetric", DbgChUserMetric},
|
{L"UserMetric", DbgChUserMetric},
|
||||||
|
{L"UserMisc", DbgChUserMisc},
|
||||||
{L"UserMonitor", DbgChUserMonitor},
|
{L"UserMonitor", DbgChUserMonitor},
|
||||||
{L"UserMsgGet", DbgChUserMsgGet},
|
{L"UserMsg", DbgChUserMsg},
|
||||||
{L"UserMsgQ", DbgChUserMsgQ},
|
{L"UserMsgQ", DbgChUserMsgQ},
|
||||||
{L"UserMsgSend", DbgChUserMsgSend},
|
|
||||||
{L"UserObj", DbgChUserObj},
|
{L"UserObj", DbgChUserObj},
|
||||||
|
{L"UserPainting", DbgChUserPainting},
|
||||||
{L"UserProcess", DbgChUserProcess},
|
{L"UserProcess", DbgChUserProcess},
|
||||||
{L"UserProp", DbgChUserProp},
|
{L"UserProp", DbgChUserProp},
|
||||||
{L"UserScrollbar", DbgChUserScrollbar},
|
{L"UserScrollbar", DbgChUserScrollbar},
|
||||||
{L"UserSysparam", DbgChUserSysparam},
|
{L"UserSysparams", DbgChUserSysparams},
|
||||||
{L"UserTimer", DbgChUserTimer},
|
{L"UserTimer", DbgChUserTimer},
|
||||||
{L"UserThread", DbgChUserThread},
|
{L"UserThread", DbgChUserThread},
|
||||||
|
{L"UserWinpos", DbgChUserWinpos},
|
||||||
{L"UserWinsta", DbgChUserWinsta},
|
{L"UserWinsta", DbgChUserWinsta},
|
||||||
{L"UserWnd", DbgChUserWnd},
|
{L"UserWnd", DbgChUserWnd}
|
||||||
{L"UserWndpos", DbgChUserWndpos}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef GDI_DEBUG
|
#ifdef GDI_DEBUG
|
||||||
|
@ -590,8 +594,6 @@ DbgAddDebugChannel(PPROCESSINFO ppi, WCHAR* channel, WCHAR* level, WCHAR op)
|
||||||
DBG_CHANNEL *ChannelEntry;
|
DBG_CHANNEL *ChannelEntry;
|
||||||
UINT iLevel, iChannel;
|
UINT iLevel, iChannel;
|
||||||
|
|
||||||
DbgPrint("Found channel %S,level %S, operation %C\n", channel, level, op);
|
|
||||||
|
|
||||||
ChannelEntry = (DBG_CHANNEL*)bsearch(channel,
|
ChannelEntry = (DBG_CHANNEL*)bsearch(channel,
|
||||||
DbgChannels,
|
DbgChannels,
|
||||||
DbgChCount,
|
DbgChCount,
|
||||||
|
@ -599,7 +601,6 @@ DbgAddDebugChannel(PPROCESSINFO ppi, WCHAR* channel, WCHAR* level, WCHAR op)
|
||||||
DbgCompareChannels);
|
DbgCompareChannels);
|
||||||
if(ChannelEntry == NULL)
|
if(ChannelEntry == NULL)
|
||||||
{
|
{
|
||||||
DbgPrint("Failed to find channel %S\n", channel);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue