- 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:
Giannis Adamopoulos 2011-08-21 12:38:52 +00:00
parent 68612f0ea5
commit 297cb8918d
42 changed files with 1023 additions and 1068 deletions

View file

@ -280,7 +280,7 @@ VOID APIENTRY MsqRemoveWindowMessagesFromQueue(PVOID pWindow); /* F*(&$ headers,
do { \
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) \
ObDereferenceObject((MsgQueue)->NewMessages); \
ExFreePoolWithTag((MsgQueue), USERTAG_Q); \

View file

@ -6,7 +6,7 @@ PMENU_OBJECT FASTCALL UserGetMenuObject(HMENU hMenu);
{ \
LONG ref = ((PHEAD)_obj_)->cLockObj;\
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); \
} \
}
@ -18,7 +18,7 @@ PMENU_OBJECT FASTCALL UserGetMenuObject(HMENU hMenu);
BOOL gotit=FALSE; \
LONG ref = ((PHEAD)_obj_)->cLockObj;\
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); \
} \
\
@ -33,7 +33,7 @@ PMENU_OBJECT FASTCALL UserGetMenuObject(HMENU hMenu);
}
#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);

View file

@ -74,13 +74,16 @@
DbgChGdiText,
DbgChGdiXFormObj,
DbgChUserAccel,
DbgChUserCalproc,
DbgChUserCallback,
DbgChUserCallProc,
DbgChUserCaret,
DbgChUserClass,
DbgChUserClipbrd,
DbgChUserCsr,
DbgChUserDce,
DbgChUserDefwnd,
DbgChUserDesktop,
DbgChUserDisplay,
DbgChUserEvent,
DbgChUserFocus,
DbgChUserHook,
@ -91,20 +94,21 @@
DbgChUserKbdLayout,
DbgChUserMenu,
DbgChUserMetric,
DbgChUserMisc,
DbgChUserMonitor,
DbgChUserMsgGet,
DbgChUserMsg,
DbgChUserMsgQ,
DbgChUserMsgSend,
DbgChUserObj,
DbgChUserPainting,
DbgChUserProcess,
DbgChUserProp,
DbgChUserScrollbar,
DbgChUserSysparam,
DbgChUserSysparams,
DbgChUserThread,
DbgChUserTimer,
DbgChUserWinsta,
DbgChUserWnd,
DbgChUserWndpos,
DbgChUserWinpos,
DbgChCount
};
@ -116,34 +120,34 @@
#define MAX_LEVEL ERR_LEVEL | FIXME_LEVEL | WARN_LEVEL | TRACE_LEVEL
/* the following assert is needed to make sure that the
debugging routines are not used before we get a ppi*/
#define DBG_GET_PPI (ASSERT(PsGetCurrentProcessWin32Process()), (PPROCESSINFO)PsGetCurrentProcessWin32Process())
#define DBG_GET_PPI ((PPROCESSINFO)PsGetCurrentProcessWin32Process())
#define DBG_DEFAULT_CHANNEL(x) static int DbgDefaultChannel = DbgCh##x;
#define DBG_ENABLE_CHANNEL(ppi,ch,level) ((ppi)->DbgChannelLevel[ch] |= level)
#define DBG_DISABLE_CHANNEL(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 { \
if(DBG_IS_CHANNEL_ENABLED(ppi,ch,level)) \
DbgPrint("(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__); \
#define DBG_PRINT(ppi,ch,level,fmt, ...) do { \
if((level == ERR_LEVEL) || (ppi && DBG_IS_CHANNEL_ENABLED(ppi,ch,level))) \
DbgPrint("(%s:%d) " fmt, __FILE__, __LINE__, ##__VA_ARGS__); \
}while(0);
#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 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 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 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 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 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 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 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 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 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 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 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 STUB DbgPrint("WARNING: %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__);
#else
#define DBG_GET_PPI
@ -169,6 +173,8 @@
#define FIXME_PPI(ppi,ch,fmt, ...)
#define WARN_PPI(ppi,ch,fmt, ...)
#define TRACE_PPI(ppi,ch,fmt, ...)
#define UNIMPLEMENTED
#endif
BOOL DbgInitDebugChannels();

View file

@ -32,8 +32,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserAccel);
UINT FASTCALL IntFindSubMenu(HMENU *hMenu, HMENU hSubTarget );
HMENU FASTCALL IntGetSubMenu( HMENU hMenu, int nPos);
@ -98,7 +97,7 @@ co_IntTranslateAccelerator(
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);
if (wParam != key)
@ -106,20 +105,20 @@ co_IntTranslateAccelerator(
return FALSE;
}
DPRINT("NtUserGetKeyState(VK_CONTROL) = 0x%x\n",UserGetKeyState(VK_CONTROL));
DPRINT("NtUserGetKeyState(VK_MENU) = 0x%x\n",UserGetKeyState(VK_MENU));
DPRINT("NtUserGetKeyState(VK_SHIFT) = 0x%x\n",UserGetKeyState(VK_SHIFT));
TRACE("NtUserGetKeyState(VK_CONTROL) = 0x%x\n",UserGetKeyState(VK_CONTROL));
TRACE("NtUserGetKeyState(VK_MENU) = 0x%x\n",UserGetKeyState(VK_MENU));
TRACE("NtUserGetKeyState(VK_SHIFT) = 0x%x\n",UserGetKeyState(VK_SHIFT));
if (UserGetKeyState(VK_CONTROL) & 0x8000) mask |= FCONTROL;
if (UserGetKeyState(VK_MENU) & 0x8000) mask |= FALT;
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 ( !(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;
}
}
@ -127,11 +126,11 @@ co_IntTranslateAccelerator(
{
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));
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
{
@ -139,14 +138,14 @@ co_IntTranslateAccelerator(
{
if ((fVirt & FALT) && (lParam & 0x20000000))
{ /* ^^ ALT pressed */
DPRINT("found accel for Alt-%c\n", LOWORD(wParam) & 0xff);
TRACE("found accel for Alt-%c\n", LOWORD(wParam) & 0xff);
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);
return FALSE;
@ -191,7 +190,7 @@ found:
if (hSubMenu != hSysMenu)
{
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));
}
uSysStat = IntGetMenuState(IntGetSubMenu(hSysMenu, 0), cmd, MF_BYCOMMAND);
@ -222,7 +221,7 @@ found:
if (hSubMenu != hMenu)
{
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));
}
uStat = IntGetMenuState(hMenu, cmd, MF_BYCOMMAND);
@ -264,12 +263,12 @@ found:
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);
}
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);
}
else
@ -283,14 +282,14 @@ found:
* #5: it's a menu option, but window is iconic
* #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)
{
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);
return TRUE;
@ -312,7 +311,7 @@ NtUserCopyAcceleratorTable(
BOOL Done = FALSE;
DECLARE_RETURN(int);
DPRINT("Enter NtUserCopyAcceleratorTable\n");
TRACE("Enter NtUserCopyAcceleratorTable\n");
UserEnterShared();
Accel = UserGetAccelObject(hAccel);
@ -346,7 +345,7 @@ NtUserCopyAcceleratorTable(
RETURN(Ret);
CLEANUP:
DPRINT("Leave NtUserCopyAcceleratorTable, ret=%i\n",_ret_);
TRACE("Leave NtUserCopyAcceleratorTable, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -362,7 +361,7 @@ NtUserCreateAcceleratorTable(
INT Index;
DECLARE_RETURN(HACCEL);
DPRINT("Enter NtUserCreateAcceleratorTable(Entries %p, EntriesCount %d)\n",
TRACE("Enter NtUserCreateAcceleratorTable(Entries %p, EntriesCount %d)\n",
Entries, EntriesCount);
UserEnterExclusive();
@ -420,7 +419,7 @@ NtUserCreateAcceleratorTable(
RETURN(hAccel);
CLEANUP:
DPRINT("Leave NtUserCreateAcceleratorTable(Entries %p, EntriesCount %d) = %x\n",
TRACE("Leave NtUserCreateAcceleratorTable(Entries %p, EntriesCount %d) = %x\n",
Entries, EntriesCount,_ret_);
UserLeave();
END_CLEANUP;
@ -439,7 +438,7 @@ NtUserDestroyAcceleratorTable(
FIXME: Destroy only tables created using CreateAcceleratorTable.
*/
DPRINT("NtUserDestroyAcceleratorTable(Table %x)\n", hAccel);
TRACE("NtUserDestroyAcceleratorTable(Table %x)\n", hAccel);
UserEnterExclusive();
if (!(Accel = UserGetAccelObject(hAccel)))
@ -458,7 +457,7 @@ NtUserDestroyAcceleratorTable(
RETURN( TRUE);
CLEANUP:
DPRINT("Leave NtUserDestroyAcceleratorTable(Table %x) = %i\n", hAccel,_ret_);
TRACE("Leave NtUserDestroyAcceleratorTable(Table %x) = %i\n", hAccel,_ret_);
UserLeave();
END_CLEANUP;
}
@ -476,7 +475,7 @@ NtUserTranslateAccelerator(
USER_REFERENCE_ENTRY AccelRef, WindowRef;
DECLARE_RETURN(int);
DPRINT("NtUserTranslateAccelerator(hWnd %x, Table %x, Message %p)\n",
TRACE("NtUserTranslateAccelerator(hWnd %x, Table %x, Message %p)\n",
hWnd, hAccel, Message);
UserEnterShared();
@ -517,7 +516,7 @@ NtUserTranslateAccelerator(
Accel->Table[i].fVirt, Accel->Table[i].key,
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);
RETURN( 1);
}
@ -533,7 +532,7 @@ CLEANUP:
if (Window) UserDerefObjectCo(Window);
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);
UserLeave();
END_CLEANUP;

View file

@ -16,8 +16,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserCallback);
/* CALLBACK MEMORY MANAGEMENT ************************************************/
@ -181,7 +180,7 @@ co_IntCallWindowProc(WNDPROC Proc,
Arguments = IntCbAllocateMemory(ArgumentLength);
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;
}
RtlMoveMemory((PVOID) ((char *) Arguments + sizeof(WINDOWPROC_CALLBACK_ARGUMENTS)),
@ -343,7 +342,7 @@ co_IntCallHookProc(INT HookId,
pti = PsGetCurrentThreadWin32Thread();
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;
}
@ -352,17 +351,17 @@ co_IntCallHookProc(INT HookId,
switch(HookId)
{
case WH_CBT:
DPRINT("WH_CBT: Code %d\n", Code);
TRACE("WH_CBT: Code %d\n", Code);
switch(Code)
{
case HCBT_CREATEWND:
pWnd = UserGetWindowObject((HWND) wParam);
if (!pWnd)
{
DPRINT1("WH_CBT HCBT_CREATEWND wParam bad hWnd!\n");
ERR("WH_CBT HCBT_CREATEWND wParam bad hWnd!\n");
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
// except class which point to kernel space if not an atom.
// Found by, Olaf Siejka
@ -389,7 +388,7 @@ co_IntCallHookProc(INT HookId,
case HCBT_QS:
break;
default:
DPRINT1("Trying to call unsupported CBT hook %d\n", Code);
ERR("Trying to call unsupported CBT hook %d\n", Code);
goto Fault_Exit;
}
break;
@ -418,14 +417,14 @@ co_IntCallHookProc(INT HookId,
case WH_SHELL:
break;
default:
DPRINT1("Trying to call unsupported window hook %d\n", HookId);
ERR("Trying to call unsupported window hook %d\n", HookId);
goto Fault_Exit;
}
Argument = IntCbAllocateMemory(ArgumentLength);
if (NULL == Argument)
{
DPRINT1("HookProc callback failed: out of memory\n");
ERR("HookProc callback failed: out of memory\n");
goto Fault_Exit;
}
Common = (PHOOKPROC_CALLBACK_ARGUMENTS) Argument;
@ -527,12 +526,12 @@ co_IntCallHookProc(INT HookId,
}
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))
{
DPRINT1("Failure to make Callback! Status 0x%x",Status);
ERR("Failure to make Callback! Status 0x%x",Status);
goto Fault_Exit;
}
/* Support write backs... SEH is in UserCallNextHookEx. */
@ -566,7 +565,7 @@ co_IntCallHookProc(INT HookId,
Fault_Exit:
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);
@ -598,7 +597,7 @@ co_IntCallEventProc(HWINEVENTHOOK hook,
Argument = IntCbAllocateMemory(ArgumentLength);
if (NULL == Argument)
{
DPRINT1("EventProc callback failed: out of memory\n");
ERR("EventProc callback failed: out of memory\n");
return 0;
}
Common = (PEVENTPROC_CALLBACK_ARGUMENTS) Argument;
@ -655,7 +654,7 @@ co_IntCallLoadMenu( HINSTANCE hModule,
Argument = IntCbAllocateMemory(ArgumentLength);
if (NULL == Argument)
{
DPRINT1("LoadMenu callback failed: out of memory\n");
ERR("LoadMenu callback failed: out of memory\n");
return 0;
}
Common = (PLOADMENU_CALLBACK_ARGUMENTS) Argument;

View file

@ -13,8 +13,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserCaret);
/* DEFINES *****************************************************************/
@ -336,7 +335,7 @@ NtUserCreateCaret(
PUSER_MESSAGE_QUEUE ThreadQueue;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserCreateCaret\n");
TRACE("Enter NtUserCreateCaret\n");
UserEnterExclusive();
if(!(Window = UserGetWindowObject(hWnd)))
@ -385,7 +384,7 @@ NtUserCreateCaret(
RETURN(TRUE);
CLEANUP:
DPRINT("Leave NtUserCreateCaret, ret=%i\n",_ret_);
TRACE("Leave NtUserCreateCaret, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -396,13 +395,13 @@ NtUserGetCaretBlinkTime(VOID)
{
DECLARE_RETURN(UINT);
DPRINT("Enter NtUserGetCaretBlinkTime\n");
TRACE("Enter NtUserGetCaretBlinkTime\n");
UserEnterShared();
RETURN(IntGetCaretBlinkTime());
CLEANUP:
DPRINT("Leave NtUserGetCaretBlinkTime, ret=%i\n",_ret_);
TRACE("Leave NtUserGetCaretBlinkTime, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -417,7 +416,7 @@ NtUserGetCaretPos(
NTSTATUS Status;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserGetCaretPos\n");
TRACE("Enter NtUserGetCaretPos\n");
UserEnterShared();
pti = PsGetCurrentThreadWin32Thread();
@ -433,7 +432,7 @@ NtUserGetCaretPos(
RETURN(TRUE);
CLEANUP:
DPRINT("Leave NtUserGetCaretPos, ret=%i\n",_ret_);
TRACE("Leave NtUserGetCaretPos, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -447,7 +446,7 @@ NtUserShowCaret(HWND hWnd OPTIONAL)
DECLARE_RETURN(BOOL);
BOOL ret;
DPRINT("Enter NtUserShowCaret\n");
TRACE("Enter NtUserShowCaret\n");
UserEnterExclusive();
if(hWnd && !(Window = UserGetWindowObject(hWnd)))
@ -464,7 +463,7 @@ NtUserShowCaret(HWND hWnd OPTIONAL)
RETURN(ret);
CLEANUP:
DPRINT("Leave NtUserShowCaret, ret=%i\n",_ret_);
TRACE("Leave NtUserShowCaret, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -478,7 +477,7 @@ NtUserHideCaret(HWND hWnd OPTIONAL)
DECLARE_RETURN(BOOL);
BOOL ret;
DPRINT("Enter NtUserHideCaret\n");
TRACE("Enter NtUserHideCaret\n");
UserEnterExclusive();
if(hWnd && !(Window = UserGetWindowObject(hWnd)))
@ -495,7 +494,7 @@ NtUserHideCaret(HWND hWnd OPTIONAL)
RETURN(ret);
CLEANUP:
DPRINT("Leave NtUserHideCaret, ret=%i\n",_ret_);
TRACE("Leave NtUserHideCaret, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}

View file

@ -11,8 +11,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserClass);
REGISTER_SYSCLASS DefaultServerClasses[] =
{
@ -507,7 +506,7 @@ IntGetClassForDesktop(IN OUT PCLS BaseClass,
/* simply clone the class */
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 */
if ( Class->hModule != hModClient &&
@ -515,7 +514,7 @@ IntGetClassForDesktop(IN OUT PCLS BaseClass,
Class->fnid >= FNID_BUTTON )
{
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 */
@ -633,7 +632,7 @@ IntDereferenceClass(IN OUT PCLS 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,
link the first clone in if possible. If there are no clones
then leave the class on the desktop heap. It will get moved
@ -671,7 +670,7 @@ IntDereferenceClass(IN OUT PCLS Class,
}
else
{
DPRINT("IntDereferenceClass1 0x%x\n", Class);
TRACE("IntDereferenceClass1 0x%x\n", Class);
/* locate the cloned class and unlink it */
PrevLink = &BaseClass->pclsClone;
@ -828,7 +827,7 @@ IntCheckProcessDesktopClasses(IN PDESKTOP Desktop,
&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);
}
@ -852,13 +851,13 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
PWSTR pszMenuName = NULL;
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);
if (!IntRegisterClassAtom(ClassName,
&Atom))
{
DPRINT1("Failed to register class atom!\n");
ERR("Failed to register class atom!\n");
return NULL;
}
@ -948,7 +947,7 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
FALSE);
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()... */
_SEH2_LEAVE;
@ -1007,7 +1006,7 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed creating the class: 0x%x\n", Status);
ERR("Failed creating the class: 0x%x\n", Status);
SetLastNtError(Status);
@ -1024,7 +1023,7 @@ IntCreateClass(IN CONST WNDCLASSEXW* lpwcx,
else
{
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)
UserHeapFree(pszMenuName);
@ -1034,6 +1033,9 @@ NoMem:
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;
}
@ -1159,7 +1161,7 @@ IntGetClassAtom(IN PUNICODE_STRING ClassName,
&pi->pclsPrivateList,
Link);
if (Class != NULL)
{ DPRINT("Step 1: 0x%x\n",Class );
{ TRACE("Step 1: 0x%x\n",Class );
goto FoundClass;
}
@ -1170,7 +1172,7 @@ IntGetClassAtom(IN PUNICODE_STRING ClassName,
&pi->pclsPublicList,
Link);
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;
}
@ -1180,7 +1182,7 @@ IntGetClassAtom(IN PUNICODE_STRING ClassName,
&pi->pclsPrivateList,
Link);
if (Class != NULL)
{ DPRINT("Step 3: 0x%x\n",Class );
{ TRACE("Step 3: 0x%x\n",Class );
goto FoundClass;
}
@ -1193,7 +1195,7 @@ IntGetClassAtom(IN PUNICODE_STRING ClassName,
{
EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST);
return (RTL_ATOM)0;
}else{DPRINT("Step 4: 0x%x\n",Class );}
}else{TRACE("Step 4: 0x%x\n",Class );}
FoundClass:
*BaseClass = Class;
@ -1218,7 +1220,7 @@ IntGetAndReferenceClass(PUNICODE_STRING ClassName, HINSTANCE hInstance)
/* Check the class. */
DPRINT("Class %wZ\n", ClassName);
TRACE("Finding Class %wZ for hInstance 0x%x\n", ClassName, hInstance);
ClassAtom = IntGetClassAtom(ClassName,
hInstance,
@ -1230,23 +1232,24 @@ IntGetAndReferenceClass(PUNICODE_STRING ClassName, HINSTANCE hInstance)
{
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
{
DPRINT1("Class \"%wZ\" not found\n", ClassName);
ERR("Class \"%wZ\" not found\n", ClassName);
}
EngSetLastError(ERROR_CANNOT_FIND_WND_CLASS);
return NULL;
}
DPRINT("ClassAtom %x\n", ClassAtom);
TRACE("Referencing Class 0x%x with atom 0x%x\n", Class, ClassAtom);
Class = IntReferenceClass(Class,
ClassLink,
pti->rpdesk);
if (Class == NULL)
{
DPRINT1("Failed to reference window class!\n");
ERR("Failed to reference window class!\n");
return NULL;
}
@ -1285,7 +1288,7 @@ UserRegisterClass(IN CONST WNDCLASSEXW* lpwcx,
if (Class != NULL && !Class->Global)
{
// 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);
return (RTL_ATOM)0;
}
@ -1299,7 +1302,7 @@ UserRegisterClass(IN CONST WNDCLASSEXW* lpwcx,
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);
return (RTL_ATOM)0;
}
@ -1332,7 +1335,7 @@ UserRegisterClass(IN CONST WNDCLASSEXW* lpwcx,
}
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;
@ -1350,7 +1353,7 @@ UserUnregisterClass(IN PUNICODE_STRING ClassName,
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! */
ClassAtom = IntGetClassAtom(ClassName,
@ -1360,7 +1363,7 @@ UserUnregisterClass(IN PUNICODE_STRING ClassName,
&Link);
if (ClassAtom == (RTL_ATOM)0)
{
DPRINT("UserUnregisterClass: No Class found.\n");
TRACE("UserUnregisterClass: No Class found.\n");
return FALSE;
}
@ -1369,7 +1372,7 @@ UserUnregisterClass(IN PUNICODE_STRING ClassName,
if (Class->cWndReferenceCount != 0 ||
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);
return FALSE;
}
@ -1382,13 +1385,13 @@ UserUnregisterClass(IN PUNICODE_STRING ClassName,
if (NT_SUCCESS(IntDeregisterClassAtom(Class->atomClassName)))
{
DPRINT("Class 0x%x\n", Class);
DPRINT("UserUnregisterClass: Good Exit!\n");
TRACE("Class 0x%x\n", Class);
TRACE("UserUnregisterClass: Good Exit!\n");
/* finally free the resources */
IntDestroyClass(Class);
return TRUE;
}
DPRINT1("UserUnregisterClass: Can not deregister Class Atom.\n");
ERR("UserUnregisterClass: Can not deregister Class Atom.\n");
return FALSE;
}
@ -1582,7 +1585,7 @@ IntSetClassMenuName(IN PCLS Class,
}
else
{
DPRINT1("Failed to copy class menu name!\n");
ERR("Failed to copy class menu name!\n");
UserHeapFree(strBufW);
}
}
@ -1633,7 +1636,7 @@ UserSetClassLongPtr(IN PCLS Class,
{
PULONG_PTR Data;
DPRINT("SetClassLong(%d, %x)\n", Index, NewLong);
TRACE("SetClassLong(%d, %x)\n", Index, NewLong);
if (Index + sizeof(ULONG_PTR) < Index ||
Index + sizeof(ULONG_PTR) > Class->cbclsExtra)
@ -1756,7 +1759,7 @@ UserSetClassLongPtr(IN PCLS Class,
if (!IntSetClassMenuName(Class,
Value))
{
DPRINT1("Setting the class menu name failed!\n");
ERR("Setting the class menu name failed!\n");
}
/* FIXME - really return NULL? Wine does so... */
@ -1941,7 +1944,7 @@ UserRegisterSystemClasses(VOID)
}
else
{
DPRINT1("!!! Registering system class failed!\n");
ERR("!!! Registering system class failed!\n");
Ret = FALSE;
}
}
@ -1979,14 +1982,14 @@ NtUserRegisterClassExWOW(
if (Flags & ~(CSF_ANSIPROC))
{
DPRINT1("NtUserRegisterClassExWOW Bad Flags!\n");
ERR("NtUserRegisterClassExWOW Bad Flags!\n");
EngSetLastError(ERROR_INVALID_FLAGS);
return Ret;
}
UserEnterExclusive();
DPRINT("NtUserRegisterClassExWOW ClsN %wZ\n",ClassName);
TRACE("NtUserRegisterClassExWOW ClsN %wZ\n",ClassName);
if ( !(ppi->W32PF_flags & W32PF_CLASSESREGISTERED ))
{
@ -1998,7 +2001,7 @@ NtUserRegisterClassExWOW(
/* Probe the parameters and basic parameter checks */
if (ProbeForReadUint(&lpwcx->cbSize) != sizeof(WNDCLASSEXW))
{
DPRINT1("NtUserRegisterClassExWOW Wrong cbSize!\n");
ERR("NtUserRegisterClassExWOW Wrong cbSize!\n");
goto InvalidParameter;
}
@ -2027,7 +2030,7 @@ NtUserRegisterClassExWOW(
CapturedClassInfo.cbWndExtra < 0 ||
CapturedClassInfo.hInstance == NULL)
{
DPRINT1("NtUserRegisterClassExWOW Invalid Parameter Error!\n");
ERR("NtUserRegisterClassExWOW Invalid Parameter Error!\n");
goto InvalidParameter;
}
@ -2041,7 +2044,7 @@ NtUserRegisterClassExWOW(
{
if (!IS_ATOM(CapturedName.Buffer))
{
DPRINT1("NtUserRegisterClassExWOW ClassName Error!\n");
ERR("NtUserRegisterClassExWOW ClassName Error!\n");
goto InvalidParameter;
}
}
@ -2055,7 +2058,7 @@ NtUserRegisterClassExWOW(
else if (CapturedMenuName.Buffer != NULL &&
!IS_INTRESOURCE(CapturedMenuName.Buffer))
{
DPRINT1("NtUserRegisterClassExWOW MenuName Error!\n");
ERR("NtUserRegisterClassExWOW MenuName Error!\n");
InvalidParameter:
EngSetLastError(ERROR_INVALID_PARAMETER);
_SEH2_LEAVE;
@ -2064,10 +2067,10 @@ InvalidParameter:
if (IsCallProcHandle(lpwcx->lpfnWndProc))
{// Never seen this yet, but I'm sure it's a little haxxy trick!
// 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 */
Ret = UserRegisterClass(&CapturedClassInfo,
@ -2078,14 +2081,14 @@ InvalidParameter:
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
DPRINT1("NtUserRegisterClassExWOW Exception Error!\n");
ERR("NtUserRegisterClassExWOW Exception Error!\n");
SetLastNtError(_SEH2_GetExceptionCode());
}
_SEH2_END;
/*
if (!Ret)
{
DPRINT1("NtUserRegisterClassExWOW Null Return!\n");
ERR("NtUserRegisterClassExWOW Null Return!\n");
}
*/
UserLeave();
@ -2266,9 +2269,13 @@ NtUserGetClassInfo(
CapturedClassName = ProbeForReadUnicodeString(ClassName);
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
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)
{
@ -2296,7 +2303,7 @@ NtUserGetClassInfo(
{
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);
Ret = FALSE;
_SEH2_LEAVE;
@ -2323,7 +2330,7 @@ NtUserGetClassInfo(
if (Ret)
{
DPRINT("GetClassInfo(%wZ, 0x%x)\n", ClassName, hInstance);
TRACE("GetClassInfo(%wZ, 0x%x)\n", SafeClassName, hInstance);
ClassAtom = IntGetClassAtom( &SafeClassName,
hInstance,
ppi,
@ -2460,7 +2467,7 @@ NtUserGetWOWClass(HINSTANCE hInstance,
{
if (!IS_ATOM(ClassName->Buffer))
{
DPRINT1("NtUserGetWOWClass() got ClassName instead of Atom!\n");
ERR("NtUserGetWOWClass() got ClassName instead of Atom!\n");
Hit = TRUE;
}
else

View file

@ -9,8 +9,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserClipbrd);
#define DATA_DELAYED_RENDER 0
#define DATA_SYNTHESIZED_RENDER -1
@ -60,7 +59,7 @@ VOID FASTCALL printChain(VOID)
PCLIPBOARDCHAINELEMENT wce2 = WindowsChain;
while (wce2)
{
DPRINT1("chain: %p\n", wce2->window->head.h);
ERR("chain: %p\n", wce2->window->head.h);
wce2 = wce2->next;
}
}
@ -496,7 +495,7 @@ NtUserCloseClipboard(VOID)
/* commented because it makes a crash in co_MsqSendMessage
ASSERT(WindowsChain->window);
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);
*/
}
@ -550,7 +549,7 @@ NtUserChangeClipboardChain(HWND hWndRemove, HWND hWndNewNext)
/* WindowsChain->window may be NULL */
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);
}
@ -600,7 +599,7 @@ NtUserEmptyClipboard(VOID)
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);
}
@ -920,7 +919,7 @@ NtUserSetClipboardData(UINT uFormat, HANDLE hMem, DWORD size)
hCBData = ExAllocatePoolWithTag(PagedPool, size, USERTAG_CLIPBOARD);
memcpy(hCBData, hMem, size);
intAddFormatedData(uFormat, hCBData, size);
DPRINT1("Data stored\n");
ERR("Data stored\n");
}
sendDrawClipboardMsg = TRUE;
@ -1047,7 +1046,7 @@ NtUserSetClipboardData(UINT uFormat, HANDLE hMem, DWORD size)
delayedRender = TRUE;
sendDrawClipboardMsg = TRUE;
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))
{
DPRINT1("No WINSTA_ACCESSCLIPBOARD access\n");
ERR("No WINSTA_ACCESSCLIPBOARD access\n");
SetLastNtError(Status);
return 0;
}

View file

@ -38,8 +38,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserIcon);
static PAGED_LOOKASIDE_LIST gProcessLookasideList;
static LIST_ENTRY gCurIconList;
@ -232,7 +231,7 @@ IntCreateCurIconHandle()
if (! ReferenceCurIconByProcess(CurIcon))
{
DPRINT1("Failed to add process\n");
ERR("Failed to add process\n");
UserDeleteObject(hCurIcon, otCursorIcon);
UserDereferenceObject(CurIcon);
return NULL;
@ -259,13 +258,13 @@ IntDestroyCurIconObject(PCURICON_OBJECT CurIcon, BOOL ProcessCleanup)
Current = CONTAINING_RECORD(CurIcon->ProcessList.Flink, CURICON_PROCESS, ListEntry);
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;
}
}
else if (! ProcessCleanup)
{
DPRINT("Trying to destroy shared icon/cursor\n");
TRACE("Trying to destroy shared icon/cursor\n");
return FALSE;
}
@ -379,7 +378,7 @@ NtUserGetIconInfo(
BOOL Ret = FALSE;
DWORD colorBpp = 0;
DPRINT("Enter NtUserGetIconInfo\n");
TRACE("Enter NtUserGetIconInfo\n");
UserEnterExclusive();
if (!IconInfo)
@ -437,7 +436,7 @@ NtUserGetIconInfo(
UserDereferenceObject(CurIcon);
leave:
DPRINT("Leave NtUserGetIconInfo, ret=%i\n", Ret);
TRACE("Leave NtUserGetIconInfo, ret=%i\n", Ret);
UserLeave();
return Ret;
@ -459,7 +458,7 @@ NtUserGetIconSize(
NTSTATUS Status = STATUS_SUCCESS;
BOOL bRet = FALSE;
DPRINT("Enter NtUserGetIconSize\n");
TRACE("Enter NtUserGetIconSize\n");
UserEnterExclusive();
if (!(CurIcon = UserGetCurIconObject(hCurIcon)))
@ -488,7 +487,7 @@ NtUserGetIconSize(
UserDereferenceObject(CurIcon);
cleanup:
DPRINT("Leave NtUserGetIconSize, ret=%i\n", bRet);
TRACE("Leave NtUserGetIconSize, ret=%i\n", bRet);
UserLeave();
return bRet;
}
@ -509,7 +508,7 @@ NtUserGetCursorInfo(
BOOL Ret = FALSE;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserGetCursorInfo\n");
TRACE("Enter NtUserGetCursorInfo\n");
UserEnterExclusive();
CurInfo = IntGetSysCursorInfo();
@ -547,7 +546,7 @@ NtUserGetCursorInfo(
RETURN(Ret);
CLEANUP:
DPRINT("Leave NtUserGetCursorInfo, ret=%i\n",_ret_);
TRACE("Leave NtUserGetCursorInfo, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -635,7 +634,7 @@ NtUserDestroyCursor(
BOOL ret;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserDestroyCursorIcon\n");
TRACE("Enter NtUserDestroyCursorIcon\n");
UserEnterExclusive();
if (!(CurIcon = UserGetCurIconObject(hCurIcon)))
@ -649,7 +648,7 @@ NtUserDestroyCursor(
RETURN(ret);
CLEANUP:
DPRINT("Leave NtUserDestroyCursorIcon, ret=%i\n",_ret_);
TRACE("Leave NtUserDestroyCursorIcon, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -670,7 +669,7 @@ NtUserFindExistingCursorIcon(
HANDLE Ret = (HANDLE)0;
DECLARE_RETURN(HICON);
DPRINT("Enter NtUserFindExistingCursorIcon\n");
TRACE("Enter NtUserFindExistingCursorIcon\n");
UserEnterExclusive();
CurIcon = IntFindExistingCurIconObject(hModule, hRsrc, cx, cy);
@ -686,7 +685,7 @@ NtUserFindExistingCursorIcon(
RETURN((HANDLE)0);
CLEANUP:
DPRINT("Leave NtUserFindExistingCursorIcon, ret=%i\n",_ret_);
TRACE("Leave NtUserFindExistingCursorIcon, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -706,7 +705,7 @@ NtUserGetClipCursor(
NTSTATUS Status;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserGetClipCursor\n");
TRACE("Enter NtUserGetClipCursor\n");
UserEnterExclusive();
if (!lpRect)
@ -735,7 +734,7 @@ NtUserGetClipCursor(
RETURN(TRUE);
CLEANUP:
DPRINT("Leave NtUserGetClipCursor, ret=%i\n",_ret_);
TRACE("Leave NtUserGetClipCursor, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -752,7 +751,7 @@ NtUserSetCursor(
PCURICON_OBJECT pcurOld, pcurNew;
HCURSOR hOldCursor = NULL;
DPRINT("Enter NtUserSetCursor\n");
TRACE("Enter NtUserSetCursor\n");
UserEnterExclusive();
if (hCursor)
@ -798,7 +797,7 @@ NtUserSetCursorContents(
BOOL Ret = FALSE;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserSetCursorContents\n");
TRACE("Enter NtUserSetCursorContents\n");
UserEnterExclusive();
if (!(CurIcon = UserGetCurIconObject(hCurIcon)))
@ -864,7 +863,7 @@ done:
RETURN(Ret);
CLEANUP:
DPRINT("Leave NtUserSetCursorContents, ret=%i\n",_ret_);
TRACE("Leave NtUserSetCursorContents, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -888,7 +887,7 @@ NtUserSetCursorIconData(
BOOL Ret = FALSE;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserSetCursorIconData\n");
TRACE("Enter NtUserSetCursorIconData\n");
UserEnterExclusive();
if (!(CurIcon = UserGetCurIconObject(Handle)))
@ -947,7 +946,7 @@ NtUserSetCursorIconData(
RETURN(Ret);
CLEANUP:
DPRINT("Leave NtUserSetCursorIconData, ret=%i\n",_ret_);
TRACE("Leave NtUserSetCursorIconData, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -968,7 +967,7 @@ NtUserSetCursorIconData(
BOOL Ret = FALSE;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserSetCursorIconData\n");
TRACE("Enter NtUserSetCursorIconData\n");
UserEnterExclusive();
if (!(CurIcon = UserGetCurIconObject(hCurIcon)))
@ -1030,7 +1029,7 @@ done:
CLEANUP:
DPRINT("Leave NtUserSetCursorIconData, ret=%i\n",_ret_);
TRACE("Leave NtUserSetCursorIconData, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1066,7 +1065,7 @@ UserDrawIconEx(
hbmColor = pIcon->IconInfo.hbmColor;
if (istepIfAniCur)
DPRINT1("NtUserDrawIconEx: istepIfAniCur is not supported!\n");
ERR("NtUserDrawIconEx: istepIfAniCur is not supported!\n");
if (!hbmMask || !GreGetObject(hbmMask, sizeof(BITMAP), (PVOID)&bm))
{
@ -1080,7 +1079,7 @@ UserDrawIconEx(
if(!(hMemDC = NtGdiCreateCompatibleDC(hDc)))
{
DPRINT1("NtGdiCreateCompatibleDC failed!\n");
ERR("NtGdiCreateCompatibleDC failed!\n");
return FALSE;
}
@ -1133,14 +1132,14 @@ UserDrawIconEx(
hDestDC = NtGdiCreateCompatibleDC(hDc);
if(!hDestDC)
{
DPRINT1("NtGdiCreateCompatibleDC failed!\n");
ERR("NtGdiCreateCompatibleDC failed!\n");
Ret = FALSE;
goto Cleanup ;
}
hOffBmp = NtGdiCreateCompatibleBitmap(hDc, cxWidth, cyHeight);
if(!hOffBmp)
{
DPRINT1("NtGdiCreateCompatibleBitmap failed!\n");
ERR("NtGdiCreateCompatibleBitmap failed!\n");
goto Cleanup ;
}
hOldOffBmp = NtGdiSelectBitmap(hDestDC, hOffBmp);
@ -1166,14 +1165,14 @@ UserDrawIconEx(
hMemBmp = BITMAP_CopyBitmap(hbmColor);
if(!hMemBmp)
{
DPRINT1("BITMAP_CopyBitmap failed!");
ERR("BITMAP_CopyBitmap failed!");
goto CleanupAlpha;
}
psurf = SURFACE_ShareLockSurface(hMemBmp);
if(!psurf)
{
DPRINT1("SURFACE_LockSurface failed!\n");
ERR("SURFACE_LockSurface failed!\n");
goto CleanupAlpha;
}
@ -1318,12 +1317,12 @@ NtUserDrawIconEx(
PCURICON_OBJECT pIcon;
BOOL Ret;
DPRINT("Enter NtUserDrawIconEx\n");
TRACE("Enter NtUserDrawIconEx\n");
UserEnterExclusive();
if (!(pIcon = UserGetCurIconObject(hIcon)))
{
DPRINT1("UserGetCurIconObject() failed!\n");
ERR("UserGetCurIconObject() failed!\n");
UserLeave();
return FALSE;
}

View file

@ -9,8 +9,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserDefwnd);
// Client Shutdown messages
#define MCS_SHUTDOWNTIMERS 1
@ -114,7 +113,7 @@ DefWndHandleSysCommand(PWND pWnd, WPARAM wParam, LPARAM lParam)
switch (wParam & 0xfff0)
{
case SC_SCREENSAVE:
DPRINT1("Screensaver Called!\n");
ERR("Screensaver Called!\n");
UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_START_SCREENSAVE, 0); // always lParam 0 == not Secure
break;
@ -145,7 +144,7 @@ IntDefWindowProc(
{
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);
break;
}

View file

@ -12,8 +12,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserDesktop);
static
VOID
@ -157,7 +156,7 @@ IntDesktopObjectDelete(PWIN32_DELETEMETHOD_PARAMETERS Parameters)
{
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 */
RemoveEntryList(&Desktop->ListEntry);
@ -362,7 +361,7 @@ IntParseDesktopPath(PEPROCESS Process,
if(!NT_SUCCESS(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;
}
}
@ -399,7 +398,7 @@ IntParseDesktopPath(PEPROCESS Process,
NtClose(*hWinSta);
*hWinSta = NULL;
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;
}
}
@ -473,13 +472,13 @@ IntGetDesktopObjectHandle(PDESKTOP DesktopObject)
if(!NT_SUCCESS(Status))
{
/* unable to create a handle */
DPRINT1("Unable to create a desktop handle\n");
ERR("Unable to create a desktop handle\n");
return NULL;
}
}
else
{
DPRINT1("Got handle: %lx\n", Ret);
ERR("Got handle: %lx\n", Ret);
}
return Ret;
@ -491,7 +490,7 @@ IntGetFocusMessageQueue(VOID)
PDESKTOP pdo = IntGetActiveDesktop();
if (!pdo)
{
DPRINT("No active desktop\n");
TRACE("No active desktop\n");
return(NULL);
}
return (PUSER_MESSAGE_QUEUE)pdo->ActiveMessageQueue;
@ -504,14 +503,14 @@ IntSetFocusMessageQueue(PUSER_MESSAGE_QUEUE NewQueue)
PDESKTOP pdo = IntGetActiveDesktop();
if (!pdo)
{
DPRINT("No active desktop\n");
TRACE("No active desktop\n");
return;
}
if(NewQueue != NULL)
{
if(NewQueue->Desktop != NULL)
{
DPRINT("Message Queue already attached to another desktop!\n");
TRACE("Message Queue already attached to another desktop!\n");
return;
}
IntReferenceMessageQueue(NewQueue);
@ -530,7 +529,7 @@ HWND FASTCALL IntGetDesktopWindow(VOID)
PDESKTOP pdo = IntGetActiveDesktop();
if (!pdo)
{
DPRINT("No active desktop\n");
TRACE("No active desktop\n");
return NULL;
}
return pdo->DesktopWindow;
@ -542,7 +541,7 @@ PWND FASTCALL UserGetDesktopWindow(VOID)
if (!pdo)
{
DPRINT("No active desktop\n");
TRACE("No active desktop\n");
return NULL;
}
@ -555,7 +554,7 @@ HWND FASTCALL IntGetMessageWindow(VOID)
if (!pdo)
{
DPRINT("No active desktop\n");
TRACE("No active desktop\n");
return NULL;
}
return pdo->spwndMessage->head.h;
@ -567,7 +566,7 @@ HWND FASTCALL IntGetCurrentThreadDesktopWindow(VOID)
PDESKTOP pdo = pti->rpdesk;
if (NULL == pdo)
{
DPRINT1("Thread doesn't have a desktop\n");
ERR("Thread doesn't have a desktop\n");
return NULL;
}
return pdo->DesktopWindow;
@ -592,13 +591,13 @@ BOOL FASTCALL IntDesktopUpdatePerUserSettings(BOOL bEnable)
QueryTable, NULL, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT("RtlQueryRegistryValues failed for PaintDesktopVersion (%x)\n",
TRACE("RtlQueryRegistryValues failed for PaintDesktopVersion (%x)\n",
Status);
g_PaintDesktopVersion = FALSE;
return FALSE;
}
DPRINT("PaintDesktopVersion = %d\n", g_PaintDesktopVersion);
TRACE("PaintDesktopVersion = %d\n", g_PaintDesktopVersion);
return TRUE;
}
@ -744,14 +743,14 @@ VOID co_IntShellHookNotify(WPARAM Message, LPARAM lParam)
gpsi->uiShellMsg = IntAddAtom(L"SHELLHOOK");
DPRINT("MsgType = %x\n", gpsi->uiShellMsg);
TRACE("MsgType = %x\n", gpsi->uiShellMsg);
if (!gpsi->uiShellMsg)
DPRINT1("LastError: %x\n", EngGetLastError());
ERR("LastError: %x\n", EngGetLastError());
}
if (!Desktop)
{
DPRINT("IntShellHookNotify: No desktop!\n");
TRACE("IntShellHookNotify: No desktop!\n");
return;
}
@ -762,7 +761,7 @@ VOID co_IntShellHookNotify(WPARAM Message, LPARAM lParam)
for (; *cursor; cursor++)
{
DPRINT("Sending notify\n");
TRACE("Sending notify\n");
co_IntPostOrSendMessage(*cursor,
gpsi->uiShellMsg,
Message,
@ -788,7 +787,7 @@ BOOL IntRegisterShellHookWindow(HWND hWnd)
PDESKTOP Desktop = pti->rpdesk;
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
* list.
@ -903,7 +902,7 @@ NtUserCreateDesktop(
PTHREADINFO ptiCurrent;
DECLARE_RETURN(HDESK);
DPRINT("Enter NtUserCreateDesktop\n");
TRACE("Enter NtUserCreateDesktop\n");
UserEnterExclusive();
ptiCurrent = PsGetCurrentThreadWin32Thread();
@ -919,7 +918,7 @@ NtUserCreateDesktop(
* Try to open already existing desktop
*/
DPRINT("Trying to open desktop (%wZ)\n", &DesktopName);
TRACE("Trying to open desktop (%wZ)\n", &DesktopName);
Status = ObOpenObjectByName(
ObjectAttributes,
@ -950,7 +949,7 @@ NtUserCreateDesktop(
if (! NT_SUCCESS(Status))
{
DPRINT1("Failed reading Object Attributes from user space.\n");
ERR("Failed reading Object Attributes from user space.\n");
SetLastNtError(Status);
RETURN( NULL);
}
@ -971,7 +970,7 @@ NtUserCreateDesktop(
if (DesktopObject->pheapDesktop == NULL)
{
ObDereferenceObject(DesktopObject);
DPRINT1("Failed to create desktop heap!\n");
ERR("Failed to create desktop heap!\n");
RETURN(NULL);
}
@ -984,7 +983,7 @@ NtUserCreateDesktop(
if (DesktopObject->pDeskInfo == NULL)
{
ObDereferenceObject(DesktopObject);
DPRINT1("Failed to create the DESKTOP structure!\n");
ERR("Failed to create the DESKTOP structure!\n");
RETURN(NULL);
}
@ -1010,7 +1009,7 @@ NtUserCreateDesktop(
#if 0
if (! NT_SUCCESS(Status))
{
DPRINT1("Failed to create desktop handle\n");
ERR("Failed to create desktop handle\n");
SetLastNtError(Status);
RETURN( NULL);
}
@ -1031,7 +1030,7 @@ NtUserCreateDesktop(
(HANDLE*)&Request.Data.CreateDesktopRequest.DesktopHandle);
if (! NT_SUCCESS(Status))
{
DPRINT1("Failed to create desktop handle for CSRSS\n");
ERR("Failed to create desktop handle for CSRSS\n");
ZwClose(Desktop);
SetLastNtError(Status);
RETURN( NULL);
@ -1041,7 +1040,7 @@ NtUserCreateDesktop(
if (! NT_SUCCESS(Status))
{
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);
SetLastNtError(Status);
RETURN( NULL);
@ -1067,7 +1066,7 @@ NtUserCreateDesktop(
pWndDesktop = co_UserCreateWindowEx(&Cs, &ClassName, &WindowName);
if (!pWnd)
{
DPRINT1("Failed to create Desktop window handle\n");
ERR("Failed to create Desktop window handle\n");
}
else
{
@ -1095,7 +1094,7 @@ NtUserCreateDesktop(
pWnd = co_UserCreateWindowEx(&Cs, &ClassName, &WindowName);
if (!pWnd)
{
DPRINT1("Failed to create Message window handle\n");
ERR("Failed to create Message window handle\n");
}
else
{
@ -1118,7 +1117,7 @@ CLEANUP:
ExFreePoolWithTag(DesktopName.Buffer, TAG_STRING);
}
if (!NoHooks && ptiCurrent) ptiCurrent->TIF_flags &= ~TIF_DISABLEHOOKS;
DPRINT("Leave NtUserCreateDesktop, ret=%i\n",_ret_);
TRACE("Leave NtUserCreateDesktop, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1205,10 +1204,10 @@ NtUserOpenInputDesktop(
HDESK Desktop;
DECLARE_RETURN(HDESK);
DPRINT("Enter NtUserOpenInputDesktop\n");
TRACE("Enter NtUserOpenInputDesktop\n");
UserEnterExclusive();
DPRINT("About to open input desktop\n");
TRACE("About to open input desktop\n");
/* Get a pointer to the desktop object */
@ -1220,7 +1219,7 @@ NtUserOpenInputDesktop(
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);
}
@ -1239,7 +1238,7 @@ NtUserOpenInputDesktop(
if (NT_SUCCESS(Status))
{
DPRINT("Successfully opened input desktop\n");
TRACE("Successfully opened input desktop\n");
RETURN((HDESK)Desktop);
}
@ -1247,7 +1246,7 @@ NtUserOpenInputDesktop(
RETURN((HDESK)0);
CLEANUP:
DPRINT("Leave NtUserOpenInputDesktop, ret=%i\n",_ret_);
TRACE("Leave NtUserOpenInputDesktop, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1281,10 +1280,10 @@ NtUserCloseDesktop(HDESK hDesktop)
NTSTATUS Status;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserCloseDesktop\n");
TRACE("Enter NtUserCloseDesktop\n");
UserEnterExclusive();
DPRINT("About to close desktop handle (0x%X)\n", hDesktop);
TRACE("About to close desktop handle (0x%X)\n", hDesktop);
Status = IntValidateDesktopHandle(
hDesktop,
@ -1294,13 +1293,13 @@ NtUserCloseDesktop(HDESK hDesktop)
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);
}
ObDereferenceObject(Object);
DPRINT("Closing desktop handle (0x%X)\n", hDesktop);
TRACE("Closing desktop handle (0x%X)\n", hDesktop);
Status = ZwClose(hDesktop);
if (!NT_SUCCESS(Status))
@ -1312,7 +1311,7 @@ NtUserCloseDesktop(HDESK hDesktop)
RETURN(TRUE);
CLEANUP:
DPRINT("Leave NtUserCloseDesktop, ret=%i\n",_ret_);
TRACE("Leave NtUserCloseDesktop, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1353,7 +1352,7 @@ NtUserPaintDesktop(HDC hDC)
DECLARE_RETURN(BOOL);
UserEnterExclusive();
DPRINT("Enter NtUserPaintDesktop\n");
TRACE("Enter NtUserPaintDesktop\n");
GdiGetClipBox(hDC, &Rect);
@ -1549,7 +1548,7 @@ NtUserPaintDesktop(HDC hDC)
RETURN(TRUE);
CLEANUP:
DPRINT("Leave NtUserPaintDesktop, ret=%i\n",_ret_);
TRACE("Leave NtUserPaintDesktop, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1579,9 +1578,9 @@ NtUserSwitchDesktop(HDESK hDesktop)
DECLARE_RETURN(BOOL);
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(
hDesktop,
@ -1591,7 +1590,7 @@ NtUserSwitchDesktop(HDESK hDesktop)
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);
}
@ -1603,14 +1602,14 @@ NtUserSwitchDesktop(HDESK hDesktop)
LogonProcess != NULL && LogonProcess != PsGetCurrentProcessWin32Process())
{
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);
}
if(DesktopObject->rpwinstaParent != InputWindowStation)
{
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);
}
@ -1630,7 +1629,7 @@ NtUserSwitchDesktop(HDESK hDesktop)
RETURN(TRUE);
CLEANUP:
DPRINT("Leave NtUserSwitchDesktop, ret=%i\n",_ret_);
TRACE("Leave NtUserSwitchDesktop, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1653,7 +1652,7 @@ NtUserGetThreadDesktop(DWORD dwThreadId, DWORD Unknown1)
DECLARE_RETURN(HDESK);
UserEnterExclusive();
DPRINT("Enter NtUserGetThreadDesktop\n");
TRACE("Enter NtUserGetThreadDesktop\n");
if(!dwThreadId)
{
@ -1682,7 +1681,7 @@ NtUserGetThreadDesktop(DWORD dwThreadId, DWORD Unknown1)
!(DesktopObject = ((PTHREADINFO)Thread->Tcb.Win32Thread)->rpdesk))
{
ObDereferenceObject(Thread);
DPRINT1("Desktop information of thread 0x%x broken!?\n", dwThreadId);
ERR("Desktop information of thread 0x%x broken!?\n", dwThreadId);
RETURN(NULL);
}
@ -1716,7 +1715,7 @@ NtUserGetThreadDesktop(DWORD dwThreadId, DWORD Unknown1)
RETURN(Ret);
CLEANUP:
DPRINT("Leave NtUserGetThreadDesktop, ret=%i\n",_ret_);
TRACE("Leave NtUserGetThreadDesktop, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1729,7 +1728,7 @@ IntUnmapDesktopView(IN PDESKTOP DesktopObject)
PW32HEAP_USER_MAPPING HeapMapping, *PrevLink;
NTSTATUS Status = STATUS_SUCCESS;
DPRINT("DO %p\n");
TRACE("DO %p\n");
CurrentWin32Process = PsGetCurrentProcessWin32Process();
PrevLink = &CurrentWin32Process->HeapMappings.Next;
@ -1796,7 +1795,7 @@ IntMapDesktopView(IN PDESKTOP DesktopObject)
}
/* 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;
Status = MmMapViewOfSection(DesktopObject->hsectionDesktop,
PsGetCurrentProcess(),
@ -1810,7 +1809,7 @@ IntMapDesktopView(IN PDESKTOP DesktopObject)
PAGE_EXECUTE_READ); /* would prefer PAGE_READONLY, but thanks to RTL heaps... */
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to map desktop\n");
ERR("Failed to map desktop\n");
return Status;
}
@ -1820,7 +1819,7 @@ IntMapDesktopView(IN PDESKTOP DesktopObject)
{
MmUnmapViewOfSection(PsGetCurrentProcess(),
UserBase);
DPRINT1("UserHeapAlloc() failed!\n");
ERR("UserHeapAlloc() failed!\n");
return STATUS_NO_MEMORY;
}
@ -1847,7 +1846,7 @@ IntSetThreadDesktop(IN HDESK hDesktop,
BOOL MapHeap;
CLIENTTHREADINFO ctiSave;
DPRINT("IntSetThreadDesktop() , FOF=%d\n", FreeOnFailure);
TRACE("IntSetThreadDesktop() , FOF=%d\n", FreeOnFailure);
MapHeap = (PsGetCurrentProcess() != PsInitialSystemProcess);
W32Thread = PsGetCurrentThreadWin32Thread();
@ -1862,7 +1861,7 @@ IntSetThreadDesktop(IN HDESK hDesktop,
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;
}
@ -1877,7 +1876,7 @@ IntSetThreadDesktop(IN HDESK hDesktop,
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);
return FALSE;
}
@ -1904,14 +1903,14 @@ IntSetThreadDesktop(IN HDESK hDesktop,
if (W32Thread->pcti && OldDesktop && NtCurrentTeb())
{
RtlCopyMemory(&ctiSave, W32Thread->pcti, sizeof(CLIENTTHREADINFO));
DPRINT("Free ClientThreadInfo\n");
TRACE("Free ClientThreadInfo\n");
DesktopHeapFree(OldDesktop, W32Thread->pcti);
W32Thread->pcti = NULL;
}
if (!W32Thread->pcti && DesktopObject && NtCurrentTeb())
{
DPRINT("Allocate ClientThreadInfo\n");
TRACE("Allocate ClientThreadInfo\n");
W32Thread->pcti = DesktopHeapAlloc( DesktopObject,
sizeof(CLIENTTHREADINFO));
RtlCopyMemory(W32Thread->pcti, &ctiSave, sizeof(CLIENTTHREADINFO));
@ -1932,7 +1931,7 @@ IntSetThreadDesktop(IN HDESK hDesktop,
!IntCheckProcessDesktopClasses(OldDesktop,
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,
unmap the view and return the error */

View file

@ -10,8 +10,7 @@
#include <intrin.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserDisplay);
BOOL InitSysParams();
@ -81,14 +80,14 @@ InitDisplayDriver(
HKEY hkey;
DEVMODEW dmDefault;
DPRINT1("InitDisplayDriver(%S, %S);\n",
ERR("InitDisplayDriver(%S, %S);\n",
pwszDeviceName, pwszRegKey);
/* Open the driver's registry key */
Status = RegOpenKey(pwszRegKey, &hkey);
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to open registry key: %ls\n", pwszRegKey);
ERR("Failed to open registry key: %ls\n", pwszRegKey);
return NULL;
}
@ -101,7 +100,7 @@ InitDisplayDriver(
&cbSize);
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);
return NULL;
}
@ -159,7 +158,7 @@ InitVideo()
ULONG cbValue;
HKEY hkey;
DPRINT("----------------------------- InitVideo() -------------------------------\n");
TRACE("----------------------------- InitVideo() -------------------------------\n");
/* Open the key for the boot command line */
Status = RegOpenKey(L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Control", &hkey);
@ -172,7 +171,7 @@ InitVideo()
/* Check if VGA mode is requested. */
if (wcsstr(awcBuffer, L"/BASEVIDEO") != 0)
{
DPRINT1("VGA mode requested.\n");
ERR("VGA mode requested.\n");
gbBaseVideo = TRUE;
}
}
@ -184,7 +183,7 @@ InitVideo()
Status = RegOpenKey(KEY_VIDEO, &hkey);
if (!NT_SUCCESS(Status))
{
DPRINT1("Could not open device registry key!\n");
ERR("Could not open device registry key!\n");
return Status;
}
@ -194,16 +193,16 @@ InitVideo()
if (NT_SUCCESS(Status))
{
iVGACompatible = _wtoi(&awcDeviceName[13]);
DPRINT1("VGA adapter = %ld\n", iVGACompatible);
ERR("VGA adapter = %ld\n", iVGACompatible);
}
/* Get the maximum mumber of adapters */
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 */
for (iDevNum = 0; iDevNum <= ulMaxObjectNumber; iDevNum++)
@ -216,7 +215,7 @@ InitVideo()
Status = RegQueryValue(hkey, awcDeviceName, REG_SZ, awcBuffer, &cbValue);
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;
}
@ -229,7 +228,7 @@ InitVideo()
{
/* Set the VGA device as primary */
gpVgaGraphicsDevice = pGraphicsDevice;
DPRINT1("gpVgaGraphicsDevice = %p\n", gpVgaGraphicsDevice);
ERR("gpVgaGraphicsDevice = %p\n", gpVgaGraphicsDevice);
}
/* Set the first one as primary device */
@ -243,7 +242,7 @@ InitVideo()
/* Check if we had any success */
if (!gpPrimaryGraphicsDevice)
{
DPRINT1("No usable display driver was found.\n");
ERR("No usable display driver was found.\n");
return STATUS_UNSUCCESSFUL;
}
@ -257,7 +256,7 @@ InitVideo()
}
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)
{
/* No device found */
DPRINT1("No GRAPHICS_DEVICE found\n");
ERR("No GRAPHICS_DEVICE found\n");
return STATUS_UNSUCCESSFUL;
}
@ -293,7 +292,7 @@ UserEnumDisplayDevices(
if (!NT_SUCCESS(Status))
{
/* No device found */
DPRINT1("Could not open reg key\n");
ERR("Could not open reg key\n");
return STATUS_UNSUCCESSFUL;
}
@ -332,7 +331,7 @@ NtUserEnumDisplayDevices(
DISPLAY_DEVICEW dispdev;
NTSTATUS Status;
DPRINT("Enter NtUserEnumDisplayDevices(%wZ, %ld)\n",
TRACE("Enter NtUserEnumDisplayDevices(%wZ, %ld)\n",
pustrDevice, iDevNum);
// FIXME: HACK, desk.cpl passes broken crap
@ -404,7 +403,7 @@ NtUserEnumDisplayDevices(
_SEH2_END
}
DPRINT1("Leave NtUserEnumDisplayDevices, Status = 0x%lx\n", Status);
ERR("Leave NtUserEnumDisplayDevices, Status = 0x%lx\n", Status);
/* Return the result */
// return Status;
return NT_SUCCESS(Status); // FIXME
@ -423,7 +422,7 @@ UserEnumCurrentDisplaySettings(
if (!ppdev)
{
/* No device found */
DPRINT1("No PDEV found!\n");
ERR("No PDEV found!\n");
return STATUS_UNSUCCESSFUL;
}
@ -445,7 +444,7 @@ UserEnumDisplaySettings(
PDEVMODEENTRY pdmentry;
ULONG i, iFoundMode;
DPRINT("Enter UserEnumDisplaySettings('%ls', %ld)\n",
TRACE("Enter UserEnumDisplaySettings('%ls', %ld)\n",
pustrDevice ? pustrDevice->Buffer : NULL, iModeNum);
/* Ask gdi for the GRAPHICS_DEVICE */
@ -454,7 +453,7 @@ UserEnumDisplaySettings(
if (!pGraphicsDevice)
{
/* No device found */
DPRINT1("No device found!\n");
ERR("No device found!\n");
return STATUS_UNSUCCESSFUL;
}
@ -551,7 +550,7 @@ NtUserEnumDisplaySettings(
ULONG cbSize, cbExtra;
DEVMODEW dmReg, *pdm;
DPRINT("Enter NtUserEnumDisplaySettings(%ls, %ld)\n",
TRACE("Enter NtUserEnumDisplaySettings(%ls, %ld)\n",
pustrDevice ? pustrDevice->Buffer : 0, iModeNum);
if (pustrDevice)
@ -658,7 +657,7 @@ UserChangeDisplaySettings(
Status = UserEnumRegistryDisplaySettings(pustrDevice, &dm);
if (!NT_SUCCESS(Status))
{
DPRINT1("Could not load registry settings\n");
ERR("Could not load registry settings\n");
return DISP_CHANGE_BADPARAM;
}
}
@ -670,7 +669,7 @@ UserChangeDisplaySettings(
/* Check params */
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;
}
@ -678,7 +677,7 @@ UserChangeDisplaySettings(
ppdev = EngpGetPDEV(pustrDevice);
if (!ppdev)
{
DPRINT1("failed to get PDEV\n");
ERR("failed to get PDEV\n");
return DISP_CHANGE_BADPARAM;
}
@ -696,7 +695,7 @@ UserChangeDisplaySettings(
pdm = PDEVOBJ_pdmMatchDevMode(ppdev, &dm);
if (!pdm)
{
DPRINT1("Could not find a matching DEVMODE\n");
ERR("Could not find a matching DEVMODE\n");
lResult = DISP_CHANGE_BADMODE;
goto leave;
}
@ -722,7 +721,7 @@ UserChangeDisplaySettings(
}
else
{
DPRINT1("Could not open registry key\n");
ERR("Could not open registry key\n");
lResult = DISP_CHANGE_NOTUPDATED;
}
}
@ -730,7 +729,7 @@ UserChangeDisplaySettings(
/* Check if DEVMODE matches the current mode */
if (pdm == ppdev->pdmwDev && !(flags & CDS_RESET))
{
DPRINT1("DEVMODE matches, nothing to do\n");
ERR("DEVMODE matches, nothing to do\n");
goto leave;
}
@ -752,7 +751,7 @@ UserChangeDisplaySettings(
/* Check for failure */
if (!ulResult)
{
DPRINT1("failed to set mode\n");
ERR("failed to set mode\n");
lResult = (lResult == DISP_CHANGE_NOTUPDATED) ?
DISP_CHANGE_FAILED : DISP_CHANGE_RESTART;
@ -875,7 +874,7 @@ NtUserChangeDisplaySettings(
if (dmLocal.dmDriverExtra > 0)
{
/* FIXME: TODO */
DPRINT1("lpDevMode->dmDriverExtra is IGNORED!\n");
ERR("lpDevMode->dmDriverExtra is IGNORED!\n");
dmLocal.dmDriverExtra = 0;
}

View file

@ -8,8 +8,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserEvent);
typedef struct _EVENTPACK
{
@ -62,7 +61,7 @@ FASTCALL
IntSetSrvEventMask( UINT EventMin, UINT EventMax)
{
UINT event;
DPRINT("SetSrvEventMask 1\n");
TRACE("SetSrvEventMask 1\n");
for ( event = EventMin; event <= EventMax; event++)
{
if ((event >= EVENT_SYSTEM_SOUND && event <= EVENT_SYSTEM_MINIMIZEEND) ||
@ -90,7 +89,7 @@ IntSetSrvEventMask( UINT EventMin, UINT EventMax)
}
if (!gpsi->dwInstalledEventHooks)
gpsi->dwInstalledEventHooks |= SRV_EVENT_RUNNING; // Set something.
DPRINT("SetSrvEventMask 2 : %x\n", gpsi->dwInstalledEventHooks);
TRACE("SetSrvEventMask 2 : %x\n", gpsi->dwInstalledEventHooks);
}
static
@ -138,7 +137,7 @@ IntRemoveEvent(PEVENTHOOK pEH)
{
if (pEH)
{
DPRINT("IntRemoveEvent pEH 0x%x\n",pEH);
TRACE("IntRemoveEvent pEH 0x%x\n",pEH);
KeEnterCriticalRegion();
RemoveEntryList(&pEH->Chain);
GlobalEvents->Counts--;
@ -226,7 +225,7 @@ IntNotifyWinEvent(
PLIST_ENTRY pLE;
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;
@ -259,7 +258,7 @@ IntNotifyWinEvent(
// Send message to the thread if pEH is not current.
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,
Event,
UserHMGetHandle(pWnd),
@ -268,7 +267,7 @@ IntNotifyWinEvent(
}
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),
Event,
UserHMGetHandle(pWnd),
@ -336,7 +335,7 @@ NtUserSetWinEventHook(
HANDLE Handle;
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();

View file

@ -20,8 +20,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserFocus);
HWND FASTCALL
IntGetCaptureWindow(VOID)
@ -112,10 +111,10 @@ co_IntSendActivateMessages(HWND hWndPrev, HWND hWnd, BOOL MouseActivate)
HANDLE OldTID = IntGetWndThreadId(WindowPrev);
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)
{
DPRINT("Widow was minimized\n");
TRACE("Widow was minimized\n");
}
if (OldTID != NewTID)
@ -214,18 +213,18 @@ co_IntSetForegroundAndFocusWindow(PWND Wnd, PWND FocusWindow, BOOL MouseActivate
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)
{
DPRINT("Failed - Child\n");
TRACE("Failed - Child\n");
return FALSE;
}
if (0 == (Wnd->style & WS_VISIBLE) &&
Wnd->head.pti->pEThread->ThreadsProcess != CsrProcess)
{
DPRINT("Failed - Invisible\n");
TRACE("Failed - Invisible\n");
return FALSE;
}
@ -238,7 +237,7 @@ co_IntSetForegroundAndFocusWindow(PWND Wnd, PWND FocusWindow, BOOL MouseActivate
if (hWndPrev == hWnd)
{
DPRINT("Failed - Same\n");
TRACE("Failed - Same\n");
return TRUE;
}
@ -360,7 +359,7 @@ co_IntSetActiveWindow(PWND Wnd OPTIONAL)
cbt.hWndActive = hWndPrev;
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;
}
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))
{
DPRINT1("SetFocusWindow 1 WH_CBT Call Hook return!\n");
ERR("SetFocusWindow 1 WH_CBT Call Hook return!\n");
return 0;
}
ThreadQueue->FocusWindow = Window->head.h;
TRACE("Focus: %d -> %d\n", hWndPrev, Window->head.h);
co_IntSendKillFocusMessages(hWndPrev, Window->head.h);
co_IntSendSetFocusMessages(hWndPrev, Window->head.h);
@ -412,7 +412,7 @@ co_IntSetFocusWindow(PWND Window OPTIONAL)
ThreadQueue->FocusWindow = 0;
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;
}
@ -443,13 +443,13 @@ NtUserGetForegroundWindow(VOID)
{
DECLARE_RETURN(HWND);
DPRINT("Enter NtUserGetForegroundWindow\n");
TRACE("Enter NtUserGetForegroundWindow\n");
UserEnterExclusive();
RETURN( UserGetForegroundWindow());
CLEANUP:
DPRINT("Leave NtUserGetForegroundWindow, ret=%i\n",_ret_);
TRACE("Leave NtUserGetForegroundWindow, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -472,7 +472,7 @@ NtUserSetActiveWindow(HWND hWnd)
USER_REFERENCE_ENTRY Ref;
DECLARE_RETURN(HWND);
DPRINT("Enter NtUserSetActiveWindow(%x)\n", hWnd);
TRACE("Enter NtUserSetActiveWindow(%x)\n", hWnd);
UserEnterExclusive();
if (hWnd)
@ -508,7 +508,7 @@ NtUserSetActiveWindow(HWND hWnd)
}
CLEANUP:
DPRINT("Leave NtUserSetActiveWindow, ret=%i\n",_ret_);
TRACE("Leave NtUserSetActiveWindow, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -523,14 +523,14 @@ IntGetCapture(VOID)
PUSER_MESSAGE_QUEUE ThreadQueue;
DECLARE_RETURN(HWND);
DPRINT("Enter IntGetCapture\n");
TRACE("Enter IntGetCapture\n");
pti = PsGetCurrentThreadWin32Thread();
ThreadQueue = pti->MessageQueue;
RETURN( ThreadQueue ? ThreadQueue->CaptureWindow : 0);
CLEANUP:
DPRINT("Leave IntGetCapture, ret=%i\n",_ret_);
TRACE("Leave IntGetCapture, ret=%i\n",_ret_);
END_CLEANUP;
}
@ -626,13 +626,13 @@ NtUserSetCapture(HWND hWnd)
{
DECLARE_RETURN(HWND);
DPRINT("Enter NtUserSetCapture(%x)\n", hWnd);
TRACE("Enter NtUserSetCapture(%x)\n", hWnd);
UserEnterExclusive();
RETURN( co_UserSetCapture(hWnd));
CLEANUP:
DPRINT("Leave NtUserSetCapture, ret=%i\n",_ret_);
TRACE("Leave NtUserSetCapture, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -697,7 +697,7 @@ NtUserSetFocus(HWND hWnd)
DECLARE_RETURN(HWND);
HWND ret;
DPRINT("Enter NtUserSetFocus(%x)\n", hWnd);
TRACE("Enter NtUserSetFocus(%x)\n", hWnd);
UserEnterExclusive();
if (hWnd)
@ -719,7 +719,7 @@ NtUserSetFocus(HWND hWnd)
}
CLEANUP:
DPRINT("Leave NtUserSetFocus, ret=%i\n",_ret_);
TRACE("Leave NtUserSetFocus, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}

View file

@ -35,9 +35,6 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
/* GLOBALS *******************************************************************/
static LONG NrGuiAppsRunning = 0;
@ -104,8 +101,6 @@ IntUserManualGuiCheck(LONG Check)
{
PPROCESSINFO W32Data;
DPRINT("Enter IntUserManualGuiCheck\n");
W32Data = PsGetCurrentProcessWin32Process();
if (0 == Check)
{
@ -125,9 +120,6 @@ IntUserManualGuiCheck(LONG Check)
RemoveGuiApp(W32Data);
}
}
DPRINT("Leave IntUserManualGuiCheck\n");
}
INIT_FUNCTION

View file

@ -15,8 +15,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserHook);
typedef struct _HOOKPACK
{
@ -31,9 +30,9 @@ static
LRESULT
FASTCALL
co_IntCallLowLevelHook(PHOOK Hook,
INT Code,
WPARAM wParam,
LPARAM lParam)
INT Code,
WPARAM wParam,
LPARAM lParam)
{
NTSTATUS Status;
PTHREADINFO pti;
@ -99,7 +98,7 @@ co_IntCallLowLevelHook(PHOOK Hook,
&uResult);
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);
ExFreePoolWithTag(pHP, TAG_HOOK);
}
@ -159,7 +158,7 @@ co_HOOK_CallHookNext( PHOOK Hook,
WPARAM wParam,
LPARAM lParam)
{
DPRINT("Calling Next HOOK %d\n", Hook->HookId);
TRACE("Calling Next HOOK %d\n", Hook->HookId);
return co_IntCallHookProc( Hook->HookId,
Code,
@ -174,10 +173,10 @@ static
LRESULT
FASTCALL
co_IntCallDebugHook(PHOOK Hook,
int Code,
WPARAM wParam,
LPARAM lParam,
BOOL Ansi)
int Code,
WPARAM wParam,
LPARAM lParam,
BOOL Ansi)
{
LRESULT lResult = 0;
ULONG Size;
@ -205,7 +204,7 @@ co_IntCallDebugHook(PHOOK Hook,
if (BadChk)
{
DPRINT1("HOOK WH_DEBUG read from lParam ERROR!\n");
ERR("HOOK WH_DEBUG read from lParam ERROR!\n");
return lResult;
}
}
@ -290,7 +289,7 @@ co_IntCallDebugHook(PHOOK Hook,
if (BadChk)
{
DPRINT1("HOOK WH_DEBUG read from Debug.lParam ERROR!\n");
ERR("HOOK WH_DEBUG read from Debug.lParam ERROR!\n");
ExFreePool(HooklParam);
return lResult;
}
@ -307,10 +306,10 @@ static
LRESULT
FASTCALL
co_UserCallNextHookEx(PHOOK Hook,
int Code,
WPARAM wParam,
LPARAM lParam,
BOOL Ansi)
int Code,
WPARAM wParam,
LPARAM lParam,
BOOL Ansi)
{
LRESULT lResult = 0;
BOOL BadChk = FALSE;
@ -340,7 +339,7 @@ co_UserCallNextHookEx(PHOOK Hook,
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)
{
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)
{
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)
{
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)
{
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:
DPRINT("HOOK WH_CBT!\n");
TRACE("HOOK WH_CBT!\n");
switch (Code)
{
case HCBT_CREATEWND:
{
LPCBT_CREATEWNDW pcbtcww = (LPCBT_CREATEWNDW)lParam;
DPRINT("HOOK HCBT_CREATEWND\n");
TRACE("HOOK HCBT_CREATEWND\n");
_SEH2_TRY
{
if (Ansi)
@ -543,7 +542,7 @@ co_UserCallNextHookEx(PHOOK Hook,
if (BadChk)
{
DPRINT1("HOOK HCBT_CREATEWND write ERROR!\n");
ERR("HOOK HCBT_CREATEWND write ERROR!\n");
}
/* The next call handles the structures. */
if (!BadChk && Hook->Proc)
@ -557,7 +556,7 @@ co_UserCallNextHookEx(PHOOK Hook,
{
RECTL rt;
DPRINT("HOOK HCBT_MOVESIZE\n");
TRACE("HOOK HCBT_MOVESIZE\n");
if (lParam)
{
@ -579,7 +578,7 @@ co_UserCallNextHookEx(PHOOK Hook,
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;
DPRINT("HOOK HCBT_ACTIVATE\n");
TRACE("HOOK HCBT_ACTIVATE\n");
if (lParam)
{
_SEH2_TRY
@ -615,7 +614,7 @@ co_UserCallNextHookEx(PHOOK Hook,
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. */
default:
DPRINT("HOOK HCBT_ %d\n",Code);
TRACE("HOOK HCBT_ %d\n",Code);
lResult = co_HOOK_CallHookNext(Hook, Code, wParam, lParam);
break;
}
@ -663,7 +662,7 @@ co_UserCallNextHookEx(PHOOK Hook,
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)
{
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;
default:
DPRINT1("Unsupported HOOK Id -> %d\n",Hook->HookId);
ERR("Unsupported HOOK Id -> %d\n",Hook->HookId);
break;
}
return lResult;
@ -756,21 +755,21 @@ IntGetGlobalHookHandles(PDESKTOP pdo, int HookId)
pLastHead = &pdo->pDeskInfo->aphkStart[HOOKID_TO_INDEX(HookId)];
for (pElem = pLastHead->Flink; pElem != pLastHead; pElem = pElem->Flink)
++cHooks;
pList = ExAllocatePoolWithTag(PagedPool, (cHooks + 1) * sizeof(HHOOK), TAG_HOOK);
if(!pList)
{
EngSetLastError(ERROR_NOT_ENOUGH_MEMORY);
return NULL;
}
}
for (pElem = pLastHead->Flink; pElem != pLastHead; pElem = pElem->Flink)
{
{
pHook = CONTAINING_RECORD(pElem, HOOK, Chain);
pList[i++] = pHook->head.h;
}
pList[i] = NULL;
return pList;
}
@ -877,7 +876,7 @@ HOOK_DestroyThreadHooks(PETHREAD Thread)
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;
}
@ -904,7 +903,7 @@ HOOK_DestroyThreadHooks(PETHREAD Thread)
for (HookId = WH_MINHOOK; HookId <= WH_MAXHOOK; HookId++)
{
PLIST_ENTRY pGLE = &pdo->pDeskInfo->aphkStart[HOOKID_TO_INDEX(HookId)];
pElem = pGLE->Flink;
while (pElem != pGLE)
{
@ -950,7 +949,7 @@ co_HOOK_CallHooks( INT HookId,
*/
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;
}
}
@ -961,19 +960,19 @@ co_HOOK_CallHooks( INT HookId,
if ( pti->TIF_flags & (TIF_INCLEANUP|TIF_DISABLEHOOKS))
{
DPRINT("Hook Thread dead %d\n", HookId);
TRACE("Hook Thread dead %d\n", HookId);
goto Exit;
}
if ( ISITHOOKED(HookId) )
{
DPRINT("Local Hooker %d\n", HookId);
TRACE("Local Hooker %d\n", HookId);
Local = TRUE;
}
if ( pdo->pDeskInfo->fsHooks & HOOKID_TO_FLAG(HookId) )
{
DPRINT("Global Hooker %d\n", HookId);
TRACE("Global Hooker %d\n", HookId);
Global = TRUE;
}
@ -989,7 +988,7 @@ co_HOOK_CallHooks( INT HookId,
pLastHead = &pti->aphkStart[HOOKID_TO_INDEX(HookId)];
if (IsListEmpty(pLastHead))
{
DPRINT1("No Local Hook Found!\n");
ERR("No Local Hook Found!\n");
goto Exit;
}
@ -1061,7 +1060,7 @@ co_HOOK_CallHooks( INT HookId,
Hook = (PHOOK)UserGetObject(gHandleTable, pHookHandles[i], otHook);
if(!Hook)
{
DPRINT1("Invalid hook!\n");
ERR("Invalid hook!\n");
continue;
}
UserRefObjectCo(Hook, &Ref);
@ -1071,7 +1070,7 @@ co_HOOK_CallHooks( INT HookId,
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;
}
@ -1085,12 +1084,13 @@ co_HOOK_CallHooks( INT HookId,
HookId == WH_KEYBOARD_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);
}
}
else
{ /* Make the direct call. */
TRACE("Local Hook calling to Thread! %d\n",HookId );
Result = co_IntCallHookProc( HookId,
Code,
wParam,
@ -1102,7 +1102,7 @@ co_HOOK_CallHooks( INT HookId,
UserDerefObjectCo(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:
return Result;
@ -1172,7 +1172,7 @@ NtUserCallNextHookEx( int Code,
LRESULT lResult = 0;
DECLARE_RETURN(LRESULT);
DPRINT("Enter NtUserCallNextHookEx\n");
TRACE("Enter NtUserCallNextHookEx\n");
UserEnterExclusive();
pti = GetW32ThreadInfo();
@ -1204,7 +1204,7 @@ NtUserCallNextHookEx( int Code,
RETURN( lResult);
CLEANUP:
DPRINT("Leave NtUserCallNextHookEx, ret=%i\n",_ret_);
TRACE("Leave NtUserCallNextHookEx, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1247,7 +1247,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
PTHREADINFO pti, ptiHook = NULL;
DECLARE_RETURN(HHOOK);
DPRINT("Enter NtUserSetWindowsHookEx\n");
TRACE("Enter NtUserSetWindowsHookEx\n");
UserEnterExclusive();
pti = PsGetCurrentThreadWin32Thread();
@ -1272,7 +1272,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
HookId == WH_MOUSE_LL ||
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 */
EngSetLastError(ERROR_GLOBAL_ONLY_HOOK);
RETURN( NULL);
@ -1280,7 +1280,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
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);
RETURN( NULL);
}
@ -1291,7 +1291,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
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);
RETURN( NULL);
}
@ -1308,7 +1308,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
HookId == WH_FOREGROUNDIDLE ||
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);
RETURN( NULL);
}
@ -1342,7 +1342,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
HookId == WH_FOREGROUNDIDLE ||
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);
RETURN( NULL);
}
@ -1375,7 +1375,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
Hook->Proc = HookProc;
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 */
{
@ -1395,7 +1395,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
DPRINT1("Problem writing to Local ClientInfo!\n");
ERR("Problem writing to Local ClientInfo!\n");
}
_SEH2_END;
}
@ -1409,7 +1409,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
DPRINT1("Problem writing to Remote ClientInfo!\n");
ERR("Problem writing to Remote ClientInfo!\n");
}
_SEH2_END;
KeDetachProcess();
@ -1470,11 +1470,11 @@ NtUserSetWindowsHookEx( HINSTANCE Mod,
else
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);
CLEANUP:
DPRINT("Leave NtUserSetWindowsHookEx, ret=%i\n",_ret_);
TRACE("Leave NtUserSetWindowsHookEx, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1486,12 +1486,12 @@ NtUserUnhookWindowsHookEx(HHOOK Hook)
PHOOK HookObj;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserUnhookWindowsHookEx\n");
TRACE("Enter NtUserUnhookWindowsHookEx\n");
UserEnterExclusive();
if (!(HookObj = IntGetHookObject(Hook)))
{
DPRINT1("Invalid handle passed to NtUserUnhookWindowsHookEx\n");
ERR("Invalid handle passed to NtUserUnhookWindowsHookEx\n");
/* SetLastNtError(Status); */
RETURN( FALSE);
}
@ -1505,7 +1505,7 @@ NtUserUnhookWindowsHookEx(HHOOK Hook)
RETURN( TRUE);
CLEANUP:
DPRINT("Leave NtUserUnhookWindowsHookEx, ret=%i\n",_ret_);
TRACE("Leave NtUserUnhookWindowsHookEx, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}

View file

@ -42,8 +42,7 @@ windows/threads on destops not belonging to WinSta0 to set hotkeys (recieve noti
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserHotkey);
/* GLOBALS *******************************************************************/
@ -157,7 +156,7 @@ DefWndGetHotKey( HWND hwnd )
{
PHOT_KEY_ITEM HotKeyItem;
DPRINT1("DefWndGetHotKey\n");
ERR("DefWndGetHotKey\n");
if (IsListEmpty(&gHotkeyList)) return 0;
@ -181,7 +180,7 @@ DefWndSetHotKey( PWND pWnd, WPARAM wParam )
BOOL HaveSameWnd = FALSE;
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.
if (pWnd->style & WS_CHILD) return 0;
@ -269,7 +268,7 @@ NtUserRegisterHotKey(HWND hWnd,
PETHREAD HotKeyThread;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserRegisterHotKey\n");
TRACE("Enter NtUserRegisterHotKey\n");
UserEnterExclusive();
if (hWnd == NULL)
@ -308,7 +307,7 @@ NtUserRegisterHotKey(HWND hWnd,
RETURN( TRUE);
CLEANUP:
DPRINT("Leave NtUserRegisterHotKey, ret=%i\n",_ret_);
TRACE("Leave NtUserRegisterHotKey, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -321,7 +320,7 @@ NtUserUnregisterHotKey(HWND hWnd, int id)
PWND Window;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserUnregisterHotKey\n");
TRACE("Enter NtUserUnregisterHotKey\n");
UserEnterExclusive();
if(!(Window = UserGetWindowObject(hWnd)))
@ -343,7 +342,7 @@ NtUserUnregisterHotKey(HWND hWnd, int id)
RETURN( FALSE);
CLEANUP:
DPRINT("Leave NtUserUnregisterHotKey, ret=%i\n",_ret_);
TRACE("Leave NtUserUnregisterHotKey, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}

View file

@ -13,8 +13,7 @@
#include <win32k.h>
#include <ntddkbd.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserInput);
extern BYTE gQueueKeyStateTable[];
extern NTSTATUS Win32kInitWin32Thread(PETHREAD Thread);
@ -85,14 +84,14 @@ VOID FASTCALL DoTheScreenSaver(VOID)
TO = 1000 * gspv.iScrSaverTimeout;
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->W32PF_flags & W32PF_IDLESCREENSAVER))
{
ppiScrnSaver->W32PF_flags |= W32PF_IDLESCREENSAVER;
DPRINT1("Screensaver is Idle\n");
ERR("Screensaver is Idle\n");
}
}
else
@ -237,13 +236,13 @@ MouseThreadMain(PVOID StartContext)
Status = Win32kInitWin32Thread(PsGetCurrentThread());
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);
}
ptiMouse = PsGetCurrentThreadWin32Thread();
ptiMouse->TIF_flags |= TIF_SYSTEMTHREAD;
DPRINT("Mouse Thread 0x%x \n", ptiMouse);
TRACE("Mouse Thread 0x%x \n", ptiMouse);
KeSetPriorityThread(&PsGetCurrentThread()->Tcb,
LOW_REALTIME_PRIORITY + 3);
@ -253,13 +252,13 @@ MouseThreadMain(PVOID StartContext)
/*
* 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,
0,
KernelMode,
TRUE,
NULL);
DPRINT("Mouse Input Thread Starting...\n");
TRACE("Mouse Input Thread Starting...\n");
/*FIXME: Does mouse attributes need to be used for anything */
Status = NtDeviceIoControlFile(MouseDeviceHandle,
@ -272,7 +271,7 @@ MouseThreadMain(PVOID StartContext)
NULL, 0);
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))
{
DPRINT1("Win32K: Failed to read from mouse.\n");
ERR("Win32K: Failed to read from mouse.\n");
return; //(Status);
}
DPRINT("MouseEvent\n");
TRACE("MouseEvent\n");
IntLastInputTick(TRUE);
UserEnterExclusive();
@ -313,7 +312,7 @@ MouseThreadMain(PVOID StartContext)
UserLeave();
}
DPRINT("Mouse Input Thread Stopped...\n");
TRACE("Mouse Input Thread Stopped...\n");
}
}
@ -469,7 +468,7 @@ IntKeyboardSendWinKeyMsg()
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;
}
@ -485,7 +484,7 @@ IntKeyboardSendWinKeyMsg()
static VOID APIENTRY
co_IntKeyboardSendAltKeyMsg()
{
DPRINT1("co_IntKeyboardSendAltKeyMsg\n");
ERR("co_IntKeyboardSendAltKeyMsg\n");
// co_MsqPostKeyboardMessage(WM_SYSCOMMAND,SC_KEYMENU,0); // This sends everything into a msg loop!
}
@ -538,13 +537,13 @@ KeyboardThreadMain(PVOID StartContext)
Status = Win32kInitWin32Thread(PsGetCurrentThread());
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);
}
ptiKeyboard = PsGetCurrentThreadWin32Thread();
ptiKeyboard->TIF_flags |= TIF_SYSTEMTHREAD;
DPRINT("Keyboard Thread 0x%x \n", ptiKeyboard);
TRACE("Keyboard Thread 0x%x \n", ptiKeyboard);
KeSetPriorityThread(&PsGetCurrentThread()->Tcb,
LOW_REALTIME_PRIORITY + 3);
@ -557,14 +556,14 @@ KeyboardThreadMain(PVOID StartContext)
/*
* 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,
0,
KernelMode,
TRUE,
NULL);
DPRINT( "Keyboard Input Thread Starting...\n" );
TRACE( "Keyboard Input Thread Starting...\n" );
/*
* Receive and process keyboard input.
*/
@ -580,7 +579,7 @@ KeyboardThreadMain(PVOID StartContext)
HWND hWnd;
int id;
DPRINT("KeyInput @ %08x\n", &KeyInput);
TRACE("KeyInput @ %08x\n", &KeyInput);
Status = NtReadFile (KeyboardDeviceHandle,
NULL,
@ -603,11 +602,11 @@ KeyboardThreadMain(PVOID StartContext)
}
if(!NT_SUCCESS(Status))
{
DPRINT1("Win32K: Failed to read from mouse.\n");
ERR("Win32K: Failed to read from mouse.\n");
return; //(Status);
}
DPRINT("KeyRaw: %s %04x\n",
TRACE("KeyRaw: %s %04x\n",
(KeyInput.Flags & KEY_BREAK) ? "up" : "down",
KeyInput.MakeCode );
@ -616,7 +615,7 @@ KeyboardThreadMain(PVOID StartContext)
if (!NT_SUCCESS(Status))
{
DPRINT1("Win32K: Failed to read from keyboard.\n");
ERR("Win32K: Failed to read from keyboard.\n");
return; //(Status);
}
@ -687,7 +686,7 @@ KeyboardThreadMain(PVOID StartContext)
sizeof(KEYBOARD_INPUT_DATA),
NULL,
NULL);
DPRINT("KeyRaw: %s %04x\n",
TRACE("KeyRaw: %s %04x\n",
(NextKeyInput.Flags & KEY_BREAK) ? "up":"down",
NextKeyInput.MakeCode );
@ -853,7 +852,7 @@ KeyboardThreadMain(PVOID StartContext)
{
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,
hWnd,
(WPARAM)id,
@ -883,7 +882,7 @@ KeyboardThreadMain(PVOID StartContext)
}
KeyboardEscape:
DPRINT( "KeyboardInput Thread Stopped...\n" );
TRACE( "KeyboardInput Thread Stopped...\n" );
}
}
@ -916,13 +915,13 @@ RawInputThreadMain(PVOID StartContext)
Status = Win32kInitWin32Thread(PsGetCurrentThread());
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);
}
ptiRawInput = PsGetCurrentThreadWin32Thread();
ptiRawInput->TIF_flags |= TIF_SYSTEMTHREAD;
DPRINT("Raw Input Thread 0x%x \n", ptiRawInput);
TRACE("Raw Input Thread 0x%x \n", ptiRawInput);
KeSetPriorityThread(&PsGetCurrentThread()->Tcb,
LOW_REALTIME_PRIORITY + 3);
@ -936,7 +935,7 @@ RawInputThreadMain(PVOID StartContext)
//
for(;;)
{
DPRINT( "Raw Input Thread Waiting for start event\n" );
TRACE( "Raw Input Thread Waiting for start event\n" );
Status = KeWaitForMultipleObjects( 2,
Objects,
@ -946,11 +945,11 @@ RawInputThreadMain(PVOID StartContext)
TRUE,
NULL,
NULL);
DPRINT( "Raw Input Thread Starting...\n" );
TRACE( "Raw Input Thread Starting...\n" );
ProcessTimers();
}
DPRINT1("Raw Input Thread Exit!\n");
ERR("Raw Input Thread Exit!\n");
}
INIT_FUNCTION
@ -965,7 +964,7 @@ InitInputImpl(VOID)
MasterTimer = ExAllocatePoolWithTag(NonPagedPool, sizeof(KTIMER), USERTAG_SYSTEM);
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);
return STATUS_UNSUCCESSFUL;
}
@ -974,7 +973,7 @@ InitInputImpl(VOID)
/* Initialize the default keyboard layout */
if(!UserInitDefaultKeyboardLayout())
{
DPRINT1("Failed to initialize default keyboard layout!\n");
ERR("Failed to initialize default keyboard layout!\n");
}
Status = PsCreateSystemThread(&RawInputThreadHandle,
@ -986,7 +985,7 @@ InitInputImpl(VOID)
NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("Win32K: Failed to create raw thread.\n");
ERR("Win32K: Failed to create raw thread.\n");
}
Status = PsCreateSystemThread(&KeyboardThreadHandle,
@ -998,7 +997,7 @@ InitInputImpl(VOID)
NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("Win32K: Failed to create keyboard thread.\n");
ERR("Win32K: Failed to create keyboard thread.\n");
}
Status = PsCreateSystemThread(&MouseThreadHandle,
@ -1010,7 +1009,7 @@ InitInputImpl(VOID)
NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("Win32K: Failed to create mouse thread.\n");
ERR("Win32K: Failed to create mouse thread.\n");
}
InputThreadsRunning = TRUE;
@ -1075,13 +1074,13 @@ NtUserBlockInput(
{
DECLARE_RETURN(BOOLEAN);
DPRINT("Enter NtUserBlockInput\n");
TRACE("Enter NtUserBlockInput\n");
UserEnterExclusive();
RETURN( IntBlockInput(PsGetCurrentThreadWin32Thread(), BlockIt));
CLEANUP:
DPRINT("Leave NtUserBlockInput, ret=%i\n",_ret_);
TRACE("Leave NtUserBlockInput, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1392,7 +1391,7 @@ IntKeyboardInput(KEYBDINPUT *ki, BOOL Injected)
KbdHookData.dwExtraInfo = ki->dwExtraInfo;
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);
return FALSE;
@ -1400,7 +1399,7 @@ IntKeyboardInput(KEYBDINPUT *ki, BOOL Injected)
if (FocusMessageQueue == NULL)
{
DPRINT("No focus message queue\n");
TRACE("No focus message queue\n");
return FALSE;
}
@ -1408,7 +1407,7 @@ IntKeyboardInput(KEYBDINPUT *ki, BOOL Injected)
if (FocusMessageQueue->FocusWindow != (HWND)0)
{
Msg.hwnd = FocusMessageQueue->FocusWindow;
DPRINT("Msg.hwnd = %x\n", Msg.hwnd);
TRACE("Msg.hwnd = %x\n", Msg.hwnd);
FocusMessageQueue->Desktop->pDeskInfo->LastInputWasKbd = TRUE;
@ -1418,7 +1417,7 @@ IntKeyboardInput(KEYBDINPUT *ki, BOOL Injected)
}
else
{
DPRINT("Invalid focus window handle\n");
TRACE("Invalid focus window handle\n");
}
return TRUE;
@ -1486,7 +1485,7 @@ NtUserSendInput(
UINT cnt;
DECLARE_RETURN(UINT);
DPRINT("Enter NtUserSendInput\n");
TRACE("Enter NtUserSendInput\n");
UserEnterExclusive();
W32Thread = PsGetCurrentThreadWin32Thread();
@ -1546,7 +1545,7 @@ NtUserSendInput(
#ifndef NDEBUG
default:
DPRINT1("SendInput(): Invalid input type: 0x%x\n", SafeInput.type);
ERR("SendInput(): Invalid input type: 0x%x\n", SafeInput.type);
break;
#endif
@ -1556,7 +1555,7 @@ NtUserSendInput(
RETURN( cnt);
CLEANUP:
DPRINT("Leave NtUserSendInput, ret=%i\n",_ret_);
TRACE("Leave NtUserSendInput, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1621,7 +1620,7 @@ IntTrackMouseEvent(
lpEventTrack->dwFlags & TME_NONCLIENT ? WM_NCMOUSELEAVE : WM_MOUSELEAVE,
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;
}
@ -1676,7 +1675,7 @@ NtUserTrackMouseEvent(
TRACKMOUSEEVENT saveTME;
BOOL Ret = FALSE;
DPRINT("Enter NtUserTrackMouseEvent\n");
TRACE("Enter NtUserTrackMouseEvent\n");
UserEnterExclusive();
_SEH2_TRY
@ -1724,7 +1723,7 @@ NtUserTrackMouseEvent(
}
Exit:
DPRINT("Leave NtUserTrackMouseEvent, ret=%i\n",Ret);
TRACE("Leave NtUserTrackMouseEvent, ret=%i\n",Ret);
UserLeave();
return Ret;
}
@ -1746,7 +1745,7 @@ NtUserGetMouseMovePointsEx(
INT Count = -1;
DECLARE_RETURN(DWORD);
DPRINT("Enter NtUserGetMouseMovePointsEx\n");
TRACE("Enter NtUserGetMouseMovePointsEx\n");
UserEnterExclusive();
if ((cbSize != sizeof(MOUSEMOVEPOINT)) || (nBufPoints < 0) || (nBufPoints > 64))
@ -1832,7 +1831,7 @@ NtUserGetMouseMovePointsEx(
RETURN( Count);
CLEANUP:
DPRINT("Leave NtUserGetMouseMovePointsEx, ret=%i\n",_ret_);
TRACE("Leave NtUserGetMouseMovePointsEx, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}

View file

@ -14,8 +14,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserKbdLayout);
PKBL KBLList = NULL; // Keyboard layout list.
@ -145,22 +144,22 @@ static BOOL UserLoadKbdDll(WCHAR *wsKLID,
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;
}
DPRINT("Read registry and got %wZ\n", &LayoutFile);
TRACE("Read registry and got %wZ\n", &LayoutFile);
RtlInitUnicodeString(&FullLayoutPath, LayoutPathBuffer);
FullLayoutPath.MaximumLength = sizeof(LayoutPathBuffer);
RtlAppendUnicodeStringToString(&FullLayoutPath, &LayoutFile);
DPRINT("Loading Keyboard DLL %wZ\n", &FullLayoutPath);
TRACE("Loading Keyboard DLL %wZ\n", &FullLayoutPath);
ExFreePoolWithTag(LayoutFile.Buffer, TAG_STRING);
*phModule = EngLoadImage(FullLayoutPath.Buffer);
if(*phModule)
{
DPRINT("Loaded %wZ\n", &FullLayoutPath);
TRACE("Loaded %wZ\n", &FullLayoutPath);
RtlInitAnsiString( &kbdProcedureName, "KbdLayerDescriptor" );
layerDescGetFn = EngFindImageProcAddress(*phModule, "KbdLayerDescriptor");
@ -171,19 +170,19 @@ static BOOL UserLoadKbdDll(WCHAR *wsKLID,
}
else
{
DPRINT1("Error: %wZ has no KbdLayerDescriptor()\n", &FullLayoutPath);
ERR("Error: %wZ has no KbdLayerDescriptor()\n", &FullLayoutPath);
}
if(!layerDescGetFn || !*pKbdTables)
{
DPRINT1("Failed to load the keyboard layout.\n");
ERR("Failed to load the keyboard layout.\n");
EngUnloadImage(*phModule);
return FALSE;
}
}
else
{
DPRINT1("Failed to load dll %wZ\n", &FullLayoutPath);
ERR("Failed to load dll %wZ\n", &FullLayoutPath);
return FALSE;
}
@ -200,7 +199,7 @@ static PKBL UserLoadDllAndCreateKbl(DWORD LocaleId)
if(!NewKbl)
{
DPRINT1("%s: Can't allocate memory!\n", __FUNCTION__);
ERR("%s: Can't allocate memory!\n", __FUNCTION__);
return NULL;
}
@ -208,7 +207,7 @@ static PKBL UserLoadDllAndCreateKbl(DWORD LocaleId)
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);
return NULL;
}
@ -241,21 +240,21 @@ BOOL UserInitDefaultKeyboardLayout()
Status = ZwQueryDefaultLocale(FALSE, &LocaleId);
if (!NT_SUCCESS(Status))
{
DPRINT1("Could not get default locale (%08lx).\n", Status);
ERR("Could not get default locale (%08lx).\n", Status);
}
else
{
DPRINT("DefaultLocale = %08lx\n", LocaleId);
TRACE("DefaultLocale = %08lx\n", 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;
if(!(KBLList = UserLoadDllAndCreateKbl(LocaleId)))
{
DPRINT1("Failed to load any Keyboard Layout\n");
ERR("Failed to load any Keyboard Layout\n");
return FALSE;
}
}
@ -323,20 +322,19 @@ PKBL W32kGetDefaultKeyLayout(VOID)
ExFreePoolWithTag(LayoutLocaleIdString.Buffer, TAG_STRING);
}
else
DPRINT1("ReadRegistryValue failed! (%08lx).\n", Status);
ERR("ReadRegistryValue failed! (%08lx).\n", Status);
}
else
DPRINT1("RtlAppendUnicodeToString failed! (%08lx)\n", Status);
ERR("RtlAppendUnicodeToString failed! (%08lx)\n", Status);
RtlFreeUnicodeString(&CurrentUserPath);
}
else
DPRINT1("RtlFormatCurrentUserKeyPath failed! (%08lx)\n", Status);
ERR("RtlFormatCurrentUserKeyPath failed! (%08lx)\n", Status);
if(!LayoutLocaleId)
{
// This block is only reached in case of a failure, so use DPRINT1 here
DPRINT1("Assuming default locale for the keyboard layout (0x409 - US)\n");
ERR("Assuming default locale for the keyboard layout (0x409 - US)\n");
LayoutLocaleId = 0x409;
}
@ -351,12 +349,12 @@ PKBL W32kGetDefaultKeyLayout(VOID)
pKbl = (PKBL) pKbl->List.Flink;
} while(pKbl != KBLList);
DPRINT("Loading new default keyboard layout.\n");
TRACE("Loading new default keyboard layout.\n");
pKbl = UserLoadDllAndCreateKbl(LayoutLocaleId);
if(!pKbl)
{
DPRINT("Failed to load %x!!! Returning any availableKL.\n", LayoutLocaleId);
TRACE("Failed to load %x!!! Returning any availableKL.\n", LayoutLocaleId);
return KBLList;
}
@ -383,7 +381,7 @@ BOOL UserUnloadKbl(PKBL pKbl)
if(pKbl->Flags & KBL_PRELOAD)
{
DPRINT1("Attempted to unload preloaded keyboard layout.\n");
ERR("Attempted to unload preloaded keyboard layout.\n");
return FALSE;
}
@ -654,7 +652,7 @@ NtUserActivateKeyboardLayout(
}
else
{
DPRINT1("%s: Invalid HKL %x!\n", __FUNCTION__, hKl);
ERR("%s: Invalid HKL %x!\n", __FUNCTION__, hKl);
}
the_end:
@ -678,7 +676,7 @@ NtUserUnloadKeyboardLayout(
}
else
{
DPRINT1("%s: Invalid HKL %x!\n", __FUNCTION__, hKl);
ERR("%s: Invalid HKL %x!\n", __FUNCTION__, hKl);
}
UserLeave();

View file

@ -30,8 +30,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserKbd);
BYTE gQueueKeyStateTable[256];
@ -215,7 +214,7 @@ static DWORD ModBits( PKBDTABLES pkKT, PBYTE KeyState )
ModBits |= NUMLOCK_BIT;
}
DPRINT( "Current Mod Bits: %x\n", ModBits );
TRACE( "Current Mod Bits: %x\n", ModBits );
return ModBits;
}
@ -236,7 +235,7 @@ static BOOL TryToTranslateChar(WORD wVirtKey,
CapsState = 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)
{
@ -270,7 +269,7 @@ static BOOL TryToTranslateChar(WORD wVirtKey,
*pbLigature = vkPtr->wch[CapsMod] == WCH_LGTR;
*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,
CapsMod, CapsState, *pwcTranslatedChar);
@ -279,8 +278,8 @@ static BOOL TryToTranslateChar(WORD wVirtKey,
vkPtr = (PVK_TO_WCHARS10)(((BYTE *)vkPtr) + size_this_entry);
if( vkPtr->VirtualKey != 0xff )
{
DPRINT( "Found dead key with no trailer in the table.\n" );
DPRINT( "VK: %04x, ADDR: %p\n", wVirtKey, vkPtr );
TRACE( "Found dead key with no trailer in the table.\n" );
TRACE( "VK: %04x, ADDR: %p\n", wVirtKey, vkPtr );
return FALSE;
}
*pwcTranslatedChar = vkPtr->wch[CapsMod];
@ -319,7 +318,7 @@ ToUnicodeInner(UINT wVirtKey,
{
if( bLigature )
{
DPRINT("Not handling ligature (yet)\n" );
TRACE("Not handling ligature (yet)\n" );
return 0;
}
@ -383,13 +382,13 @@ NtUserGetAsyncKeyState(
{
DECLARE_RETURN(SHORT);
DPRINT("Enter NtUserGetAsyncKeyState\n");
TRACE("Enter NtUserGetAsyncKeyState\n");
UserEnterExclusive();
RETURN((SHORT)UserGetAsyncKeyState(key));
CLEANUP:
DPRINT("Leave NtUserGetAsyncKeyState, ret=%i\n",_ret_);
TRACE("Leave NtUserGetAsyncKeyState, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -412,7 +411,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
pWndMsg = UserGetWindowObject(lpMsg->hwnd);
if (!pWndMsg) // Must have a window!
{
DPRINT1("No Window for Translate.\n");
ERR("No Window for Translate.\n");
return FALSE;
}
@ -429,7 +428,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
/* All messages have to contain the cursor point. */
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)
{
@ -457,7 +456,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
{
ULONG i;
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++ )
{
@ -471,7 +470,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
}
}
DPRINT("FINAL CHAR: %c\n", wp[0]);
TRACE("FINAL CHAR: %c\n", wp[0]);
}
if (dead_char)
@ -486,7 +485,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
NewMsg.hwnd = lpMsg->hwnd;
NewMsg.wParam = wp[0];
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);
Result = TRUE;
}
@ -501,7 +500,7 @@ IntTranslateKbdMessage(LPMSG lpMsg,
MsqPostMessage(pti->MessageQueue, &NewMsg, FALSE, QS_KEY);
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;
}
@ -524,7 +523,7 @@ UINT ScanToVk( UINT Code, BOOL ExtKey, PKBDTABLES pkKT )
{
if( !pkKT )
{
DPRINT("ScanToVk: No layout\n");
TRACE("ScanToVk: No layout\n");
return 0;
}
@ -623,7 +622,7 @@ NtUserMapVirtualKeyEx( UINT Code, UINT Type, DWORD keyboardId, HKL dwhkl )
PKBDTABLES keyLayout;
DECLARE_RETURN(UINT);
DPRINT("Enter NtUserMapVirtualKeyEx\n");
TRACE("Enter NtUserMapVirtualKeyEx\n");
UserEnterExclusive();
pti = PsGetCurrentThreadWin32Thread();
@ -635,7 +634,7 @@ NtUserMapVirtualKeyEx( UINT Code, UINT Type, DWORD keyboardId, HKL dwhkl )
RETURN(IntMapVirtualKeyEx( Code, Type, keyLayout ));
CLEANUP:
DPRINT("Leave NtUserMapVirtualKeyEx, ret=%i\n",_ret_);
TRACE("Leave NtUserMapVirtualKeyEx, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -658,7 +657,7 @@ NtUserToUnicodeEx(
int ret = 0;
DECLARE_RETURN(int);
DPRINT("Enter NtUserSetKeyboardState\n");
TRACE("Enter NtUserSetKeyboardState\n");
UserEnterShared();//fixme: this syscall doesnt seem to need any locking...
/* Key up? */
@ -671,7 +670,7 @@ NtUserToUnicodeEx(
lpKeyState,
sizeof(KeyStateBuf))) )
{
DPRINT1( "Couldn't copy key state from caller.\n" );
ERR( "Couldn't copy key state from caller.\n" );
RETURN(0);
}
@ -681,7 +680,7 @@ NtUserToUnicodeEx(
OutPwszBuff = ExAllocatePoolWithTag(NonPagedPool,sizeof(WCHAR) * cchBuff, TAG_STRING);
if( !OutPwszBuff )
{
DPRINT1( "ExAllocatePoolWithTag(%d) failed\n", sizeof(WCHAR) * cchBuff);
ERR( "ExAllocatePoolWithTag(%d) failed\n", sizeof(WCHAR) * cchBuff);
RETURN(0);
}
RtlZeroMemory( OutPwszBuff, sizeof( WCHAR ) * cchBuff );
@ -702,7 +701,7 @@ NtUserToUnicodeEx(
RETURN(ret);
CLEANUP:
DPRINT("Leave NtUserSetKeyboardState, ret=%i\n",_ret_);
TRACE("Leave NtUserSetKeyboardState, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -729,7 +728,7 @@ NtUserGetKeyNameText( LONG lParam, LPWSTR lpString, int nSize )
VSC_LPWSTR *KeyNames;
DECLARE_RETURN(DWORD);
DPRINT("Enter NtUserGetKeyNameText\n");
TRACE("Enter NtUserGetKeyNameText\n");
UserEnterShared();
pti = PsGetCurrentThreadWin32Thread();
@ -808,7 +807,7 @@ NtUserGetKeyNameText( LONG lParam, LPWSTR lpString, int nSize )
RETURN(ret);
CLEANUP:
DPRINT("Leave NtUserGetKeyNameText, ret=%i\n",_ret_);
TRACE("Leave NtUserGetKeyNameText, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -858,7 +857,7 @@ W32kKeyProcessMessage(LPMSG Msg,
*
* Shift and the LP_EXT_BIT cancel. */
ScanCode = (Msg->lParam >> 16) & 0xff;
DPRINT("ScanCode %04x\n",ScanCode);
TRACE("ScanCode %04x\n",ScanCode);
BaseMapping = Msg->wParam =
IntMapVirtualKeyEx( ScanCode, 1, KeyboardLayout );
@ -887,7 +886,7 @@ W32kKeyProcessMessage(LPMSG Msg,
if (!VscVkTable)
{
DPRINT1("somethings wrong, Prefix=0x%x", Prefix);
ERR("somethings wrong, Prefix=0x%x", Prefix);
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
* 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 */
return 12; /* We're doing an 101 for now, so return 12 F-keys */
default:
DPRINT1("Unknown type!\n");
ERR("Unknown type!\n");
return 0; /* The book says 0 here, so 0 */
}
}
@ -985,7 +984,7 @@ NtUserVkKeyScanEx(
PKBL pkbl = NULL;
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();
if (UsehKL)
@ -1019,7 +1018,7 @@ NtUserVkKeyScanEx(
if(vkPtr->wch[CapsState] == wChar)
{
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);
Ret = ((CapsMod << 8)|(vkPtr->VirtualKey & 0xff));
goto Exit;

View file

@ -11,8 +11,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserMenu);
PMENU_OBJECT FASTCALL
IntGetSystemMenu(PWND Window, BOOL bRevert, BOOL RetMenu);
@ -711,14 +710,14 @@ IntSetMenuItemInfo(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, PROSMENUITEMINF
}
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);
}
if (lpmii->fMask & MIIM_TYPE)
{
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 */
SetLastNtError( ERROR_INVALID_PARAMETER);
return FALSE;
@ -748,7 +747,7 @@ IntSetMenuItemInfo(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, PROSMENUITEMINF
{
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);
return FALSE;
}
@ -919,7 +918,7 @@ IntInsertMenuItem(PMENU_OBJECT MenuObject, UINT uItem, BOOL fByPosition,
pos = IntInsertMenuItemToList(SubMenu, MenuItem, pos);
DPRINT("IntInsertMenuItemToList = %i\n", pos);
TRACE("IntInsertMenuItemToList = %i\n", pos);
return (pos >= 0);
}
@ -1559,7 +1558,7 @@ NtUserCheckMenuItem(
PMENU_OBJECT Menu;
DECLARE_RETURN(DWORD);
DPRINT("Enter NtUserCheckMenuItem\n");
TRACE("Enter NtUserCheckMenuItem\n");
UserEnterExclusive();
if(!(Menu = UserGetMenuObject(hMenu)))
@ -1570,7 +1569,7 @@ NtUserCheckMenuItem(
RETURN( IntCheckMenuItem(Menu, uIDCheckItem, uCheck));
CLEANUP:
DPRINT("Leave NtUserCheckMenuItem, ret=%i\n",_ret_);
TRACE("Leave NtUserCheckMenuItem, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1597,7 +1596,7 @@ HMENU FASTCALL UserCreateMenu(BOOL PopupMenu)
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);
SetLastNtError(Status);
return (HMENU)0;
@ -1626,7 +1625,7 @@ NtUserDeleteMenu(
PMENU_OBJECT Menu;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserDeleteMenu\n");
TRACE("Enter NtUserDeleteMenu\n");
UserEnterExclusive();
if(!(Menu = UserGetMenuObject(hMenu)))
@ -1637,7 +1636,7 @@ NtUserDeleteMenu(
RETURN( IntRemoveMenuItem(Menu, uPosition, uFlags, TRUE));
CLEANUP:
DPRINT("Leave NtUserDeleteMenu, ret=%i\n",_ret_);
TRACE("Leave NtUserDeleteMenu, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1655,7 +1654,7 @@ NtUserGetTitleBarInfo(
DECLARE_RETURN(BOOLEAN);
BOOLEAN retValue = TRUE;
DPRINT("Enter NtUserGetTitleBarInfo\n");
TRACE("Enter NtUserGetTitleBarInfo\n");
UserEnterExclusive();
/* Vaildate the windows handle */
@ -1704,7 +1703,7 @@ NtUserGetTitleBarInfo(
RETURN( retValue );
CLEANUP:
DPRINT("Leave NtUserGetTitleBarInfo, ret=%i\n",_ret_);
TRACE("Leave NtUserGetTitleBarInfo, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1740,7 +1739,7 @@ NtUserDestroyMenu(
PMENU_OBJECT Menu;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserDestroyMenu\n");
TRACE("Enter NtUserDestroyMenu\n");
UserEnterExclusive();
if(!(Menu = UserGetMenuObject(hMenu)))
@ -1757,7 +1756,7 @@ NtUserDestroyMenu(
RETURN( IntDestroyMenuObject(Menu, TRUE, TRUE));
CLEANUP:
DPRINT("Leave NtUserDestroyMenu, ret=%i\n",_ret_);
TRACE("Leave NtUserDestroyMenu, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1774,7 +1773,7 @@ NtUserEnableMenuItem(
PMENU_OBJECT Menu;
DECLARE_RETURN(UINT);
DPRINT("Enter NtUserEnableMenuItem\n");
TRACE("Enter NtUserEnableMenuItem\n");
UserEnterExclusive();
if(!(Menu = UserGetMenuObject(hMenu)))
@ -1785,7 +1784,7 @@ NtUserEnableMenuItem(
RETURN( IntEnableMenuItem(Menu, uIDEnableItem, uEnable));
CLEANUP:
DPRINT("Leave NtUserEnableMenuItem, ret=%i\n",_ret_);
TRACE("Leave NtUserEnableMenuItem, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1810,7 +1809,7 @@ NtUserGetMenuBarInfo(
MENUBARINFO kmbi;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserGetMenuBarInfo\n");
TRACE("Enter NtUserGetMenuBarInfo\n");
UserEnterShared();
if (!(WindowObject = UserGetWindowObject(hwnd)))
@ -1867,7 +1866,7 @@ NtUserGetMenuBarInfo(
Rect.bottom = Offset.y;
Rect.top = Offset.y - MenuObject->MenuInfo.Height;
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);
}
if (idItem)
@ -1879,7 +1878,7 @@ NtUserGetMenuBarInfo(
kmbi.fBarFocused = TRUE;
SubMenuObject = UserGetMenuObject(MenuObject->MenuItemList->hSubMenu);
if(SubMenuObject) kmbi.hwndMenu = SubMenuObject->MenuInfo.Wnd;
DPRINT("OBJID_MENU, idItem = %d\n",idItem);
TRACE("OBJID_MENU, idItem = %d\n",idItem);
break;
}
case OBJID_CLIENT:
@ -1890,7 +1889,7 @@ NtUserGetMenuBarInfo(
else
{
Res = FALSE;
DPRINT1("OBJID_CLIENT, No SubMenu!\n");
ERR("OBJID_CLIENT, No SubMenu!\n");
break;
}
if (idItem)
@ -1931,7 +1930,7 @@ NtUserGetMenuBarInfo(
kmbi.fBarFocused = TRUE;
XSubMenuObject = UserGetMenuObject(SubMenuObject->MenuItemList->hSubMenu);
if (XSubMenuObject) kmbi.hwndMenu = XSubMenuObject->MenuInfo.Wnd;
DPRINT("OBJID_CLIENT, idItem = %d\n",idItem);
TRACE("OBJID_CLIENT, idItem = %d\n",idItem);
break;
}
case OBJID_SYSMENU:
@ -1981,12 +1980,12 @@ NtUserGetMenuBarInfo(
kmbi.fBarFocused = TRUE;
SubMenuObject = UserGetMenuObject(SysMenuObject->MenuItemList->hSubMenu);
if(SubMenuObject) kmbi.hwndMenu = SubMenuObject->MenuInfo.Wnd;
DPRINT("OBJID_SYSMENU, idItem = %d\n",idItem);
TRACE("OBJID_SYSMENU, idItem = %d\n",idItem);
break;
}
default:
Res = FALSE;
DPRINT1("Unknown idObject = %d, idItem = %d\n",idObject,idItem);
ERR("Unknown idObject = %d, idItem = %d\n",idObject,idItem);
}
if (Res)
{
@ -2000,7 +1999,7 @@ NtUserGetMenuBarInfo(
RETURN(Res);
CLEANUP:
DPRINT("Leave NtUserGetMenuBarInfo, ret=%i\n",_ret_);
TRACE("Leave NtUserGetMenuBarInfo, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2017,7 +2016,7 @@ NtUserGetMenuIndex(
PMENU_ITEM MenuItem;
DECLARE_RETURN(UINT);
DPRINT("Enter NtUserGetMenuIndex\n");
TRACE("Enter NtUserGetMenuIndex\n");
UserEnterShared();
if ( !(Menu = UserGetMenuObject(hMenu)) ||
@ -2035,7 +2034,7 @@ NtUserGetMenuIndex(
RETURN(0xFFFFFFFF);
CLEANUP:
DPRINT("Leave NtUserGetMenuIndex, ret=%i\n",_ret_);
TRACE("Leave NtUserGetMenuIndex, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2058,7 +2057,7 @@ NtUserGetMenuItemRect(
PMENU_ITEM MenuItem;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserGetMenuItemRect\n");
TRACE("Enter NtUserGetMenuItemRect\n");
UserEnterShared();
if (!(Menu = UserGetMenuObject(hMenu)))
@ -2105,7 +2104,7 @@ NtUserGetMenuItemRect(
RETURN( TRUE);
CLEANUP:
DPRINT("Leave NtUserGetMenuItemRect, ret=%i\n",_ret_);
TRACE("Leave NtUserGetMenuItemRect, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2124,7 +2123,7 @@ NtUserHiliteMenuItem(
PWND Window;
DECLARE_RETURN(BOOLEAN);
DPRINT("Enter NtUserHiliteMenuItem\n");
TRACE("Enter NtUserHiliteMenuItem\n");
UserEnterExclusive();
if(!(Window = UserGetWindowObject(hWnd)))
@ -2147,7 +2146,7 @@ NtUserHiliteMenuItem(
RETURN(FALSE);
CLEANUP:
DPRINT("Leave NtUserHiliteMenuItem, ret=%i\n",_ret_);
TRACE("Leave NtUserHiliteMenuItem, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2221,7 +2220,7 @@ NtUserMenuItemFromPoint(
int i;
DECLARE_RETURN(int);
DPRINT("Enter NtUserMenuItemFromPoint\n");
TRACE("Enter NtUserMenuItemFromPoint\n");
UserEnterExclusive();
if (!(Menu = UserGetMenuObject(hMenu)))
@ -2250,7 +2249,7 @@ NtUserMenuItemFromPoint(
RETURN( (mi ? i : NO_SELECTED_ITEM));
CLEANUP:
DPRINT("Leave NtUserMenuItemFromPoint, ret=%i\n",_ret_);
TRACE("Leave NtUserMenuItemFromPoint, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2342,7 +2341,7 @@ NtUserRemoveMenu(
PMENU_OBJECT Menu;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserRemoveMenu\n");
TRACE("Enter NtUserRemoveMenu\n");
UserEnterExclusive();
if(!(Menu = UserGetMenuObject(hMenu)))
@ -2353,7 +2352,7 @@ NtUserRemoveMenu(
RETURN(IntRemoveMenuItem(Menu, uPosition, uFlags, FALSE));
CLEANUP:
DPRINT("Leave NtUserRemoveMenu, ret=%i\n",_ret_);
TRACE("Leave NtUserRemoveMenu, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
@ -2370,7 +2369,7 @@ NtUserSetMenuContextHelpId(
PMENU_OBJECT Menu;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserSetMenuContextHelpId\n");
TRACE("Enter NtUserSetMenuContextHelpId\n");
UserEnterExclusive();
if(!(Menu = UserGetMenuObject(hMenu)))
@ -2381,7 +2380,7 @@ NtUserSetMenuContextHelpId(
RETURN(IntSetMenuContextHelpId(Menu, dwContextHelpId));
CLEANUP:
DPRINT("Leave NtUserSetMenuContextHelpId, ret=%i\n",_ret_);
TRACE("Leave NtUserSetMenuContextHelpId, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2398,7 +2397,7 @@ NtUserSetMenuDefaultItem(
PMENU_OBJECT Menu;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserSetMenuDefaultItem\n");
TRACE("Enter NtUserSetMenuDefaultItem\n");
UserEnterExclusive();
if(!(Menu = UserGetMenuObject(hMenu)))
@ -2409,7 +2408,7 @@ NtUserSetMenuDefaultItem(
RETURN( UserSetMenuDefaultItem(Menu, uItem, fByPos));
CLEANUP:
DPRINT("Leave NtUserSetMenuDefaultItem, ret=%i\n",_ret_);
TRACE("Leave NtUserSetMenuDefaultItem, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2424,7 +2423,7 @@ NtUserSetMenuFlagRtoL(
PMENU_OBJECT Menu;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserSetMenuFlagRtoL\n");
TRACE("Enter NtUserSetMenuFlagRtoL\n");
UserEnterExclusive();
if(!(Menu = UserGetMenuObject(hMenu)))
@ -2435,7 +2434,7 @@ NtUserSetMenuFlagRtoL(
RETURN(IntSetMenuFlagRtoL(Menu));
CLEANUP:
DPRINT("Leave NtUserSetMenuFlagRtoL, ret=%i\n",_ret_);
TRACE("Leave NtUserSetMenuFlagRtoL, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2451,7 +2450,7 @@ NtUserThunkedMenuInfo(
PMENU_OBJECT Menu;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserThunkedMenuInfo\n");
TRACE("Enter NtUserThunkedMenuInfo\n");
UserEnterExclusive();
if (!(Menu = UserGetMenuObject(hMenu)))
@ -2462,7 +2461,7 @@ NtUserThunkedMenuInfo(
RETURN(UserMenuInfo(Menu, (PROSMENUINFO)lpcmi, TRUE));
CLEANUP:
DPRINT("Leave NtUserThunkedMenuInfo, ret=%i\n",_ret_);
TRACE("Leave NtUserThunkedMenuInfo, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2484,7 +2483,7 @@ NtUserThunkedMenuItemInfo(
UNICODE_STRING lstrCaption;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserThunkedMenuItemInfo\n");
TRACE("Enter NtUserThunkedMenuItemInfo\n");
UserEnterExclusive();
/* lpszCaption may be NULL, check for it and call RtlInitUnicodeString()
@ -2506,7 +2505,7 @@ NtUserThunkedMenuItemInfo(
lpszCaption);
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);
RETURN(FALSE);
}
@ -2517,7 +2516,7 @@ NtUserThunkedMenuItemInfo(
RETURN( UserMenuItemInfo(Menu, uItem, fByPosition, (PROSMENUITEMINFO)lpmii, TRUE));
CLEANUP:
DPRINT("Leave NtUserThunkedMenuItemInfo, ret=%i\n",_ret_);
TRACE("Leave NtUserThunkedMenuItemInfo, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2538,7 +2537,7 @@ NtUserBuildMenuItemList(
PMENU_OBJECT Menu;
DECLARE_RETURN(DWORD);
DPRINT("Enter NtUserBuildMenuItemList\n");
TRACE("Enter NtUserBuildMenuItemList\n");
UserEnterExclusive();
if(!(Menu = UserGetMenuObject(hMenu)))
@ -2558,7 +2557,7 @@ NtUserBuildMenuItemList(
RETURN( res);
CLEANUP:
DPRINT("Leave NtUserBuildMenuItemList, ret=%i\n",_ret_);
TRACE("Leave NtUserBuildMenuItemList, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2576,7 +2575,7 @@ NtUserGetMenuDefaultItem(
DWORD gismc = 0;
DECLARE_RETURN(UINT);
DPRINT("Enter NtUserGetMenuDefaultItem\n");
TRACE("Enter NtUserGetMenuDefaultItem\n");
UserEnterExclusive();
if(!(Menu = UserGetMenuObject(hMenu)))
@ -2587,7 +2586,7 @@ NtUserGetMenuDefaultItem(
RETURN( IntGetMenuDefaultItem(Menu, fByPos, gmdiFlags, &gismc));
CLEANUP:
DPRINT("Leave NtUserGetMenuDefaultItem, ret=%i\n",_ret_);
TRACE("Leave NtUserGetMenuDefaultItem, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2605,7 +2604,7 @@ NtUserMenuInfo(
PMENU_OBJECT Menu;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserMenuInfo\n");
TRACE("Enter NtUserMenuInfo\n");
UserEnterShared();
if (!(Menu = UserGetMenuObject(hMenu)))
@ -2616,7 +2615,7 @@ NtUserMenuInfo(
RETURN(UserMenuInfo(Menu, UnsafeMenuInfo, SetOrGet));
CLEANUP:
DPRINT("Leave NtUserMenuInfo, ret=%i\n",_ret_);
TRACE("Leave NtUserMenuInfo, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2636,7 +2635,7 @@ NtUserMenuItemInfo(
PMENU_OBJECT Menu;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserMenuItemInfo\n");
TRACE("Enter NtUserMenuItemInfo\n");
UserEnterExclusive();
if (!(Menu = UserGetMenuObject(hMenu)))
@ -2647,7 +2646,7 @@ NtUserMenuItemInfo(
RETURN( UserMenuItemInfo(Menu, Item, ByPosition, UnsafeItemInfo, SetOrGet));
CLEANUP:
DPRINT("Leave NtUserMenuItemInfo, ret=%i\n",_ret_);
TRACE("Leave NtUserMenuItemInfo, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;

View file

@ -12,8 +12,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserMsg);
BOOLEAN NTAPI PsGetProcessExitProcessCalled(PEPROCESS Process);
@ -223,7 +222,7 @@ MsgMemorySize(PMSGMEMORY MsgMemoryEntry, WPARAM wParam, LPARAM lParam)
}
_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;
}
_SEH2_END;
@ -260,7 +259,7 @@ PackParam(LPARAM *lParamPacked, UINT Msg, WPARAM wParam, LPARAM lParam, BOOL Non
if (NULL == PackedNcCalcsize)
{
DPRINT1("Not enough memory to pack lParam\n");
ERR("Not enough memory to pack lParam\n");
return STATUS_NO_MEMORY;
}
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);
if (NULL == PackedCs)
{
DPRINT1("Not enough memory to pack lParam\n");
ERR("Not enough memory to pack lParam\n");
return STATUS_NO_MEMORY;
}
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);
if (!size)
{
DPRINT1("No size for lParamPacked\n");
ERR("No size for lParamPacked\n");
return STATUS_SUCCESS;
}
PackedData = ExAllocatePoolWithTag(NonPagedPool, size, TAG_MSG);
@ -421,7 +420,7 @@ CopyMsgToKernelMem(MSG *KernelModeMsg, MSG *UserModeMsg, PMSGMEMORY MsgMemoryEnt
KernelMem = ExAllocatePoolWithTag(PagedPool, Size, TAG_MSG);
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;
}
KernelModeMsg->lParam = (LPARAM) KernelMem;
@ -432,7 +431,7 @@ CopyMsgToKernelMem(MSG *KernelModeMsg, MSG *UserModeMsg, PMSGMEMORY MsgMemoryEnt
Status = MmCopyFromCaller(KernelMem, (PVOID) UserModeMsg->lParam, Size);
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);
return Status;
}
@ -477,7 +476,7 @@ CopyMsgToUserMem(MSG *UserModeMsg, MSG *KernelModeMsg)
Status = MmCopyToCaller((PVOID) UserModeMsg->lParam, (PVOID) KernelModeMsg->lParam, Size);
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);
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 )
{
DPRINT("InputIdleEvent\n");
TRACE("InputIdleEvent\n");
KeSetEvent( ppi->InputIdleEvent, IO_NO_INCREMENT, FALSE);
}
}
@ -533,7 +532,7 @@ IdlePong(VOID)
{
PPROCESSINFO ppi = PsGetCurrentProcessWin32Process();
DPRINT("IdlePong ppi 0x%x\n",ppi);
TRACE("IdlePong ppi 0x%x\n",ppi);
if ( ppi && ppi->InputIdleEvent )
{
KeClearEvent(ppi->InputIdleEvent);
@ -860,7 +859,7 @@ co_IntWaitMessage( PWND Window,
if (!NT_SUCCESS(Status))
{
SetLastNtError(Status);
DPRINT1("Exit co_IntWaitMessage on error!\n");
ERR("Exit co_IntWaitMessage on error!\n");
return FALSE;
}
if (Status == STATUS_USER_APC || Status == STATUS_TIMEOUT)
@ -1124,13 +1123,13 @@ UserPostMessage( HWND Wnd,
pti = Window->head.pti;
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;
}
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? */
return FALSE;
}
@ -1214,7 +1213,7 @@ co_IntSendMessageTimeoutSingle( HWND hWnd,
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);
}
@ -1234,7 +1233,7 @@ co_IntSendMessageTimeoutSingle( HWND hWnd,
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);
}
@ -1251,7 +1250,7 @@ co_IntSendMessageTimeoutSingle( HWND hWnd,
if (Window->state & WNDS_DESTROYED)
{
/* 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);
}
@ -1395,7 +1394,7 @@ co_IntSendMessageWithCallBack( HWND hWnd,
if (Window->state & WNDS_DESTROYED)
{
/* 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);
}
@ -1419,7 +1418,7 @@ co_IntSendMessageWithCallBack( HWND hWnd,
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);
}
@ -1465,14 +1464,14 @@ co_IntSendMessageWithCallBack( HWND hWnd,
{
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);
}
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);
}
@ -1578,7 +1577,7 @@ co_IntDoSendMessage( HWND hWnd,
/* Check for an exiting window. */
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 */
@ -1740,7 +1739,7 @@ NtUserDragDetect(
WORD wDragWidth, wDragHeight;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserDragDetect(%x)\n", hWnd);
TRACE("Enter NtUserDragDetect(%x)\n", hWnd);
UserEnterExclusive();
wDragWidth = UserGetSystemMetrics(SM_CXDRAG);
@ -1794,7 +1793,7 @@ NtUserDragDetect(
RETURN( FALSE);
CLEANUP:
DPRINT("Leave NtUserDragDetect, ret=%i\n",_ret_);
TRACE("Leave NtUserDragDetect, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1839,9 +1838,9 @@ NtUserWaitMessage(VOID)
BOOL ret;
UserEnterExclusive();
DPRINT("NtUserWaitMessage Enter\n");
TRACE("NtUserWaitMessage Enter\n");
ret = co_IntWaitMessage(NULL, 0, 0);
DPRINT("NtUserWaitMessage Leave\n");
TRACE("NtUserWaitMessage Leave\n");
UserLeave();
return ret;
@ -2165,7 +2164,7 @@ NtUserMessageCall( HWND hWnd,
if (!(Ret = co_IntSendMessageWithCallBack(hWnd, Msg, wParam, lParam,
CallBackInfo.CallBack, CallBackInfo.Context, &uResult)))
{
DPRINT1("Callback failure!\n");
ERR("Callback failure!\n");
}
}
break;
@ -2261,7 +2260,7 @@ NtUserMessageCall( HWND hWnd,
CWP.message = Msg;
CWP.wParam = wParam;
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,
HC_ACTION,
@ -2387,8 +2386,8 @@ NtUserWaitForInputIdle( IN HANDLE hProcess,
pti->pClientInfo->dwTIFlags = pti->TIF_flags;
}
DPRINT("WFII: ppi 0x%x\n",W32Process);
DPRINT("WFII: waiting for %p\n", Handles[1] );
TRACE("WFII: ppi 0x%x\n",W32Process);
TRACE("WFII: waiting for %p\n", Handles[1] );
do
{
UserLeave();
@ -2418,17 +2417,17 @@ NtUserWaitForInputIdle( IN HANDLE hProcess,
{
MSG Msg;
co_IntGetPeekMessage( &Msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE, FALSE);
DPRINT1("WFII: WAIT 2\n");
ERR("WFII: WAIT 2\n");
}
break;
case STATUS_TIMEOUT:
DPRINT1("WFII: timeout\n");
ERR("WFII: timeout\n");
case WAIT_FAILED:
goto WaitExit;
default:
DPRINT1("WFII: finished\n");
ERR("WFII: finished\n");
Status = STATUS_SUCCESS;
goto WaitExit;
}

View file

@ -11,9 +11,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserSysparams);
static BOOL Setup = FALSE;
@ -80,7 +78,7 @@ InitMetrics(VOID)
#endif
/* 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);
piSysMet[SM_CXMIN] = 3 * max(gspv.ncm.iCaptionWidth, 8) // 112
@ -185,7 +183,7 @@ UserGetSystemMetrics(ULONG Index)
{
ASSERT(gpsi);
ASSERT(Setup);
DPRINT("UserGetSystemMetrics(%d)\n", Index);
TRACE("UserGetSystemMetrics(%d)\n", Index);
/* Get metrics from array */
if (Index < SM_CMETRICS)
@ -206,7 +204,7 @@ UserGetSystemMetrics(ULONG Index)
return 0; // FIXME
}
DPRINT1("UserGetSystemMetrics() called with invalid index %d\n", Index);
ERR("UserGetSystemMetrics() called with invalid index %d\n", Index);
return 0;
}

View file

@ -10,9 +10,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserMisc);
SHORT
FASTCALL
@ -56,7 +54,7 @@ IntGdiGetLanguageID(VOID)
}
ZwClose(KeyHandle);
}
DPRINT("Language ID = %x\n",Ret);
TRACE("Language ID = %x\n",Ret);
return (SHORT) Ret;
}
@ -69,7 +67,7 @@ NtUserGetThreadState(
{
DWORD_PTR ret = 0;
DPRINT("Enter NtUserGetThreadState\n");
TRACE("Enter NtUserGetThreadState\n");
if (Routine != THREADSTATE_GETTHREADINFO)
{
UserEnterShared();
@ -104,7 +102,7 @@ NtUserGetThreadState(
{
PUSER_SENT_MESSAGE Message =
((PTHREADINFO)PsGetCurrentThreadWin32Thread())->pusmCurrent;
DPRINT1("THREADSTATE_INSENDMESSAGE\n");
ERR("THREADSTATE_INSENDMESSAGE\n");
ret = ISMEX_NOSEND;
if (Message)
@ -144,7 +142,7 @@ NtUserGetThreadState(
break;
}
DPRINT("Leave NtUserGetThreadState, ret=%i\n", ret);
TRACE("Leave NtUserGetThreadState, ret=%i\n", ret);
UserLeave();
return ret;
@ -183,13 +181,13 @@ NtUserGetDoubleClickTime(VOID)
{
UINT Result;
DPRINT("Enter NtUserGetDoubleClickTime\n");
TRACE("Enter NtUserGetDoubleClickTime\n");
UserEnterShared();
// FIXME: Check if this works on non-interactive winsta
Result = gspv.iDblClickTime;
DPRINT("Leave NtUserGetDoubleClickTime, ret=%i\n", Result);
TRACE("Leave NtUserGetDoubleClickTime, ret=%i\n", Result);
UserLeave();
return Result;
}
@ -210,7 +208,7 @@ NtUserGetGUIThreadInfo(
DECLARE_RETURN(BOOLEAN);
DPRINT("Enter NtUserGetGUIThreadInfo\n");
TRACE("Enter NtUserGetGUIThreadInfo\n");
UserEnterShared();
Status = MmCopyFromCaller(&SafeGui, lpgui, sizeof(DWORD));
@ -296,7 +294,7 @@ NtUserGetGUIThreadInfo(
RETURN( TRUE);
CLEANUP:
DPRINT("Leave NtUserGetGUIThreadInfo, ret=%i\n",_ret_);
TRACE("Leave NtUserGetGUIThreadInfo, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -314,7 +312,7 @@ NtUserGetGuiResources(
DWORD Ret = 0;
DECLARE_RETURN(DWORD);
DPRINT("Enter NtUserGetGuiResources\n");
TRACE("Enter NtUserGetGuiResources\n");
UserEnterShared();
Status = ObReferenceObjectByHandle(hProcess,
@ -362,7 +360,7 @@ NtUserGetGuiResources(
RETURN( Ret);
CLEANUP:
DPRINT("Leave NtUserGetGuiResources, ret=%i\n",_ret_);
TRACE("Leave NtUserGetGuiResources, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}

View file

@ -12,6 +12,8 @@
#include <win32k.h>
DBG_DEFAULT_CHANNEL(UserMonitor);
/* FIXME: find include file for these */
#define MONITORINFOF_PRIMARY 1
#define MONITOR_DEFAULTTONULL 0
@ -33,7 +35,7 @@ NTSTATUS
NTAPI
InitMonitorImpl()
{
DPRINT("Initializing monitor implementation...\n");
TRACE("Initializing monitor implementation...\n");
return STATUS_SUCCESS;
}
@ -41,7 +43,7 @@ InitMonitorImpl()
NTSTATUS
CleanupMonitorImpl()
{
DPRINT("Cleaning up monitor implementation...\n");
TRACE("Cleaning up monitor implementation...\n");
/* FIXME: Destroy monitor objects? */
return STATUS_SUCCESS;
@ -137,20 +139,20 @@ IntAttachMonitor(IN PDEVOBJ *pGdiDevice,
PMONITOR Monitor;
WCHAR Buffer[CCHDEVICENAME];
DPRINT("Attaching monitor...\n");
TRACE("Attaching monitor...\n");
/* create new monitor object */
Monitor = IntCreateMonitorObject();
if (Monitor == NULL)
{
DPRINT("Couldnt create monitor object\n");
TRACE("Couldnt create monitor object\n");
return STATUS_INSUFFICIENT_RESOURCES;
}
_snwprintf(Buffer, CCHDEVICENAME, L"\\\\.\\DISPLAY%d", DisplayNumber + 1);
if (!RtlCreateUnicodeString(&Monitor->DeviceName, Buffer))
{
DPRINT("Couldn't duplicate monitor name!\n");
TRACE("Couldn't duplicate monitor name!\n");
UserDereferenceObject(Monitor);
UserDeleteObject(UserHMGetHandle(Monitor), otMonitor);
return STATUS_INSUFFICIENT_RESOURCES;
@ -161,14 +163,14 @@ IntAttachMonitor(IN PDEVOBJ *pGdiDevice,
if (gMonitorList == NULL)
{
DPRINT("Primary monitor is beeing attached\n");
TRACE("Primary monitor is beeing attached\n");
Monitor->IsPrimary = TRUE;
gMonitorList = Monitor;
}
else
{
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)
{
p->Next = Monitor;
@ -362,7 +364,7 @@ IntGetMonitorsFromRect(OPTIONAL IN LPCRECTL pRect,
MonitorRect = Monitor->rcMonitor;
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);
if (flags == MONITOR_DEFAULTTOPRIMARY && Monitor->IsPrimary)
@ -494,7 +496,7 @@ NtUserEnumDisplayMonitors(
status = MmCopyFromCaller(&rect, pRect, sizeof (RECT));
if (!NT_SUCCESS(status))
{
DPRINT("MmCopyFromCaller() failed!\n");
TRACE("MmCopyFromCaller() failed!\n");
SetLastNtError(status);
return -1;
}
@ -509,7 +511,7 @@ NtUserEnumDisplayMonitors(
dc = DC_LockDc(hDC);
if (dc == NULL)
{
DPRINT("DC_LockDc() failed!\n");
TRACE("DC_LockDc() failed!\n");
/* FIXME: setlasterror? */
return -1;
}
@ -518,7 +520,7 @@ NtUserEnumDisplayMonitors(
if (regionType == 0)
{
DPRINT("NtGdiGetRgnBox() failed!\n");
TRACE("NtGdiGetRgnBox() failed!\n");
return -1;
}
if (regionType == NULLREGION)
@ -555,7 +557,7 @@ NtUserEnumDisplayMonitors(
if (numMonitors == 0 || listSize == 0 ||
(hMonitorList == NULL && monitorRectList == NULL))
{
DPRINT("numMonitors = %d\n", numMonitors);
TRACE("numMonitors = %d\n", numMonitors);
return numMonitors;
}
@ -653,13 +655,13 @@ NtUserGetMonitorInfo(
NTSTATUS Status;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserGetMonitorInfo\n");
TRACE("Enter NtUserGetMonitorInfo\n");
UserEnterShared();
/* get monitor object */
if (!(Monitor = UserGetMonitorObject(hMonitor)))
{
DPRINT("Couldnt find monitor 0x%lx\n", hMonitor);
TRACE("Couldnt find monitor 0x%lx\n", hMonitor);
RETURN(FALSE);
}
@ -704,17 +706,17 @@ NtUserGetMonitorInfo(
Status = MmCopyToCaller(pMonitorInfo, &MonitorInfo, MonitorInfo.cbSize);
if (!NT_SUCCESS(Status))
{
DPRINT("GetMonitorInfo: MmCopyToCaller failed\n");
TRACE("GetMonitorInfo: MmCopyToCaller failed\n");
SetLastNtError(Status);
RETURN(FALSE);
}
DPRINT("GetMonitorInfo: success\n");
TRACE("GetMonitorInfo: success\n");
RETURN(TRUE);
CLEANUP:
DPRINT("Leave NtUserGetMonitorInfo, ret=%i\n",_ret_);
TRACE("Leave NtUserGetMonitorInfo, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -864,7 +866,7 @@ NtUserMonitorFromWindow(
RECTL Rect;
DECLARE_RETURN(HMONITOR);
DPRINT("Enter NtUserMonitorFromWindow\n");
TRACE("Enter NtUserMonitorFromWindow\n");
UserEnterShared();
if (!(Window = UserGetWindowObject(hWnd)))
@ -885,7 +887,7 @@ NtUserMonitorFromWindow(
RETURN(hMonitor);
CLEANUP:
DPRINT("Leave NtUserMonitorFromWindow, ret=%i\n",_ret_);
TRACE("Leave NtUserMonitorFromWindow, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}

View file

@ -14,8 +14,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserMsgQ);
VOID FASTCALL DoTheScreenSaver(VOID);
@ -61,7 +60,7 @@ IntChildrenWindowFromPoint(PWND pWndTop, INT x, INT y)
{
if (pWnd->state2 & WNDS2_INDESTROY || pWnd->state & WNDS_DESTROYED )
{
DPRINT("The Window is in DESTROY!\n");
TRACE("The Window is in DESTROY!\n");
continue;
}
@ -93,7 +92,7 @@ IntTopLevelWindowFromPoint(INT x, INT y)
{
if (pWnd->state2 & WNDS2_INDESTROY || pWnd->state & WNDS_DESTROYED)
{
DPRINT("The Window is in DESTROY!\n");
TRACE("The Window is in DESTROY!\n");
continue;
}
@ -158,7 +157,7 @@ UserSetCursor(
{
/* Remove the cursor */
GreMovePointer(hdcScreen, -1, -1);
DPRINT("Removing pointer!\n");
TRACE("Removing pointer!\n");
}
IntGetSysCursorInfo()->CurrentCursorObject = NewCursor;
}
@ -204,13 +203,13 @@ int UserShowCursor(BOOL bShow)
{
/* Show the pointer */
GreMovePointer(hdcScreen, gpsi->ptCursor.x, gpsi->ptCursor.y);
DPRINT("Showing pointer!\n");
TRACE("Showing pointer!\n");
}
else
{
/* Remove the pointer */
GreMovePointer(hdcScreen, -1, -1);
DPRINT("Removing pointer!\n");
TRACE("Removing pointer!\n");
}
/* Update global info */
@ -245,7 +244,7 @@ DWORD FASTCALL UserGetKeyState(DWORD key)
/* change the input key state for a given key */
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)
{
@ -267,7 +266,7 @@ static void update_input_key_state( PUSER_MESSAGE_QUEUE MessageQueue, MSG* msg )
UCHAR key;
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)
{
@ -349,7 +348,7 @@ IntMsqSetWakeMask(DWORD WakeMask)
if ( (Win32Thread->pcti->fsChangeBits & 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!
return MessageEventHandle;
}
@ -600,7 +599,7 @@ co_MsqInsertMouseMessage(MSG* Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook
}
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);
}
}
@ -631,7 +630,7 @@ co_MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
LARGE_INTEGER LargeTickCount;
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);
// 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;
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);
return;
}
if (FocusMessageQueue == NULL)
{
DPRINT("No focus message queue\n");
TRACE("No focus message queue\n");
return;
}
if (FocusMessageQueue->FocusWindow != (HWND)0)
{
Msg.hwnd = FocusMessageQueue->FocusWindow;
DPRINT("Msg.hwnd = %x\n", Msg.hwnd);
TRACE("Msg.hwnd = %x\n", Msg.hwnd);
FocusMessageQueue->Desktop->pDeskInfo->LastInputWasKbd = TRUE;
@ -686,7 +685,7 @@ co_MsqPostKeyboardMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
}
else
{
DPRINT("Invalid focus window handle\n");
TRACE("Invalid focus window handle\n");
}
return;
@ -830,7 +829,7 @@ co_MsqDispatchOneSentMessage(PUSER_MESSAGE_QUEUE MessageQueue)
/* The message has not been processed yet, reinsert it. */
RemoveEntryList(&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);
}
}
@ -958,7 +957,7 @@ MsqRemoveWindowMessagesFromQueue(PVOID pWindow)
ListEntry);
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);
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)))
{
DPRINT1("MsqSendMessage(): Not enough memory to allocate a message");
ERR("MsqSendMessage(): Not enough memory to allocate a message");
return STATUS_INSUFFICIENT_RESOURCES;
}
@ -1126,7 +1125,7 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
Entry = Entry->Flink;
}
DPRINT("MsqSendMessage (blocked) timed out 1\n");
TRACE("MsqSendMessage (blocked) timed out 1\n");
}
while (co_MsqDispatchOneSentMessage(ThreadQueue))
;
@ -1186,7 +1185,7 @@ co_MsqSendMessage(PUSER_MESSAGE_QUEUE MessageQueue,
Entry = Entry->Flink;
}
DPRINT("MsqSendMessage timed out 2\n");
TRACE("MsqSendMessage timed out 2\n");
break;
}
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);
}
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)
{
@ -1375,7 +1374,7 @@ BOOL co_IntProcessMouseMessage(MSG* msg, BOOL* RemoveMessages, UINT first, UINT
if (!((first == 0 && last == 0) || (message >= first || message <= last)))
{
DPRINT("Message out of range!!!\n");
TRACE("Message out of range!!!\n");
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)))
{
DPRINT("Message out of range!!!\n");
TRACE("Message out of range!!!\n");
RETURN(FALSE);
}
}
@ -1444,7 +1443,7 @@ BOOL co_IntProcessMouseMessage(MSG* msg, BOOL* RemoveMessages, UINT first, UINT
hook.dwExtraInfo = 0/*extra_info*/;
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 */
*RemoveMessages = TRUE;
@ -1513,7 +1512,7 @@ BOOL co_IntProcessMouseMessage(MSG* msg, BOOL* RemoveMessages, UINT first, UINT
if(!co_IntMouseActivateWindow(pwndMsg)) eatMsg = TRUE;
break;
default:
DPRINT1( "unknown WM_MOUSEACTIVATE code %d\n", ret );
ERR( "unknown WM_MOUSEACTIVATE code %d\n", ret );
break;
}
}
@ -1575,7 +1574,7 @@ BOOL co_IntProcessKeyboardMessage(MSG* Msg, BOOL* RemoveMessages)
HCBT_KEYSKIPPED,
LOWORD(Msg->wParam),
Msg->lParam );
DPRINT1("KeyboardMessage WH_CBT Call Hook return!\n");
ERR("KeyboardMessage WH_CBT Call Hook return!\n");
return FALSE;
}
return TRUE;
@ -1793,7 +1792,7 @@ CALLBACK
HungAppSysTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
{
DoTheScreenSaver();
DPRINT("HungAppSysTimerProc\n");
TRACE("HungAppSysTimerProc\n");
// Process list of windows that are hung and waiting.
}
@ -1872,7 +1871,7 @@ MsqCleanupMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue)
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 */
if ((CurrentSentMessage->SenderQueue)
&& (CurrentSentMessage->DispatchingListEntry.Flink != NULL))
@ -1924,7 +1923,7 @@ MsqCleanupMessageQueue(PUSER_MESSAGE_QUEUE MessageQueue)
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 */
if (CurrentSentMessage->CompletionEvent != NULL)

View file

@ -9,8 +9,7 @@
*/
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserMisc);
DWORD
APIENTRY
@ -19,7 +18,7 @@ NtUserAssociateInputContext(
DWORD dwUnknown2,
DWORD dwUnknown3)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -105,7 +104,7 @@ NtUserBuildHimcList(
DWORD dwUnknown3,
DWORD dwUnknown4)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -115,7 +114,7 @@ NtUserConvertMemHandle(
DWORD Unknown0,
DWORD Unknown1)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -128,7 +127,7 @@ NtUserCreateLocalMemHandle(
DWORD Unknown2,
DWORD Unknown3)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -140,7 +139,7 @@ NtUserDdeGetQualityOfService(
IN HWND hWndServer,
OUT PSECURITY_QUALITY_OF_SERVICE pqosPrev)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -154,7 +153,7 @@ NtUserDdeInitialize(
DWORD Unknown3,
DWORD Unknown4)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -166,7 +165,7 @@ NtUserDdeSetQualityOfService(
IN PSECURITY_QUALITY_OF_SERVICE pqosNew,
OUT PSECURITY_QUALITY_OF_SERVICE pqosPrev)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -181,7 +180,7 @@ NtUserDragObject(
HCURSOR hc1
)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -194,7 +193,7 @@ NtUserDrawAnimatedRects(
RECT *lprcFrom,
RECT *lprcTo)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -204,7 +203,7 @@ APIENTRY
NtUserEvent(
DWORD Unknown0)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -215,7 +214,7 @@ NtUserExcludeUpdateRgn(
HDC hDC,
HWND hWnd)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -230,7 +229,7 @@ NtUserGetAltTabInfo(
UINT cchItemText,
BOOL Ansi)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -242,7 +241,7 @@ NtUserGetControlBrush(
HDC hdc,
UINT ctlType)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -259,7 +258,7 @@ NtUserGetControlColor(
HDC hdc,
UINT CtlMsg) // Wine PaintRect: WM_CTLCOLORMSGBOX + hbrush
{
UNIMPLEMENTED
STUB
return 0;
}
@ -272,7 +271,7 @@ NtUserGetImeHotKey(
DWORD Unknown2,
DWORD Unknown3)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -283,7 +282,7 @@ NtUserImpersonateDdeClientWindow(
HWND hWndClient,
HWND hWndServer)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -297,7 +296,7 @@ NtUserInitializeClientPfnArrays(
HINSTANCE hmodUser)
{
NTSTATUS Status = STATUS_SUCCESS;
DPRINT("Enter NtUserInitializeClientPfnArrays User32 0x%x\n",hmodUser);
TRACE("Enter NtUserInitializeClientPfnArrays User32 0x%x\n",hmodUser);
if (ClientPfnInit) return Status;
@ -327,7 +326,7 @@ NtUserInitializeClientPfnArrays(
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed reading Client Pfns from user space.\n");
ERR("Failed reading Client Pfns from user space.\n");
SetLastNtError(Status);
}
@ -351,7 +350,7 @@ NtUserInitTask(
DWORD Unknown10,
DWORD Unknown11)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -360,7 +359,7 @@ BOOL
APIENTRY
NtUserLockWorkStation(VOID)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -369,7 +368,7 @@ DWORD
APIENTRY
NtUserMNDragLeave(VOID)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -380,7 +379,7 @@ NtUserMNDragOver(
DWORD Unknown0,
DWORD Unknown1)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -391,7 +390,7 @@ NtUserModifyUserStartupInfoFlags(
DWORD Unknown0,
DWORD Unknown1)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -403,7 +402,7 @@ NtUserNotifyIMEStatus(
DWORD Unknown1,
DWORD Unknown2)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -417,7 +416,7 @@ NtUserQueryUserCounters(
DWORD Unknown3,
DWORD Unknown4)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -427,7 +426,7 @@ APIENTRY
NtUserRegisterTasklist(
DWORD Unknown0)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -438,7 +437,7 @@ NtUserSetConsoleReserveKeys(
DWORD Unknown0,
DWORD Unknown1)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -449,7 +448,7 @@ NtUserSetDbgTag(
DWORD Unknown0,
DWORD Unknown1)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -463,7 +462,7 @@ NtUserSetImeHotKey(
DWORD Unknown3,
DWORD Unknown4)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -475,7 +474,7 @@ NtUserSetRipFlags(
DWORD Unknown0,
DWORD Unknown1)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -534,7 +533,7 @@ NtUserUpdateInputContext(
DWORD Unknown1,
DWORD Unknown2)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -546,7 +545,7 @@ NtUserUpdateInstance(
DWORD Unknown1,
DWORD Unknown2)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -558,7 +557,7 @@ NtUserUserHandleGrantAccess(
IN HANDLE hJob,
IN BOOL bGrant)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -568,7 +567,7 @@ APIENTRY
NtUserWaitForMsgAndEvent(
DWORD Unknown0)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -583,7 +582,7 @@ NtUserWin32PoolAllocationStats(
DWORD Unknown4,
DWORD Unknown5)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -592,7 +591,7 @@ DWORD
APIENTRY
NtUserYieldTask(VOID)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -604,7 +603,7 @@ NtUserCheckImeHotKey(
DWORD dwUnknown1,
DWORD dwUnknown2)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -615,7 +614,7 @@ NtUserConsoleControl(
DWORD dwUnknown2,
DWORD dwUnknown3)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -624,7 +623,7 @@ APIENTRY
NtUserCreateInputContext(
DWORD dwUnknown1)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -633,7 +632,7 @@ APIENTRY
NtUserDestroyInputContext(
DWORD dwUnknown1)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -642,7 +641,7 @@ APIENTRY
NtUserDisableThreadIme(
DWORD dwUnknown1)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -651,7 +650,7 @@ APIENTRY
NtUserGetAppImeLevel(
DWORD dwUnknown1)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -661,7 +660,7 @@ NtUserGetAtomName(
ATOM nAtom,
LPWSTR lpBuffer)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -671,7 +670,7 @@ NtUserGetImeInfoEx(
DWORD dwUnknown1,
DWORD dwUnknown2)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -682,7 +681,7 @@ NtUserGetRawInputBuffer(
PUINT pcbSize,
UINT cbSizeHeader)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -695,7 +694,7 @@ NtUserGetRawInputData(
PUINT pcbSize,
UINT cbSizeHeader)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -708,7 +707,7 @@ NtUserGetRawInputDeviceInfo(
PUINT pcbSize
)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -719,7 +718,7 @@ NtUserGetRawInputDeviceList(
PUINT puiNumDevices,
UINT cbSize)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -730,7 +729,7 @@ NtUserGetRegisteredRawInputDevices(
PUINT puiNumDevices,
UINT cbSize)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -741,7 +740,7 @@ NtUserHardErrorControl(
DWORD dwUnknown2,
DWORD dwUnknown3)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -756,7 +755,7 @@ NtUserMinMaximize(
UINT SwFlags;
PWND pWnd;
DPRINT("Enter NtUserMinMaximize\n");
TRACE("Enter NtUserMinMaximize\n");
UserEnterExclusive();
pWnd = UserGetWindowObject(hWnd);
@ -788,7 +787,7 @@ NtUserMinMaximize(
co_WinPosShowWindow(pWnd, cmd);
Exit:
DPRINT("Leave NtUserMinMaximize\n");
TRACE("Leave NtUserMinMaximize\n");
UserLeave();
return 0; // Always NULL?
}
@ -801,7 +800,7 @@ NtUserNotifyProcessCreate(
DWORD dwUnknown3,
DWORD dwUnknown4)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -813,7 +812,7 @@ NtUserProcessConnect(
DWORD Size)
{
NTSTATUS Status = STATUS_SUCCESS;
DPRINT("NtUserProcessConnect\n");
TRACE("NtUserProcessConnect\n");
if (pUserConnect && ( Size == sizeof(USERCONNECT) ))
{
PPROCESSINFO W32Process;
@ -851,7 +850,7 @@ NtUserQueryInformationThread(
DWORD dwUnknown4,
DWORD dwUnknown5)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -861,7 +860,7 @@ NtUserQueryInputContext(
DWORD dwUnknown1,
DWORD dwUnknown2)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -875,7 +874,7 @@ NtUserRealInternalGetMessage(
UINT wRemoveMsg,
BOOL bGMSG)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -885,7 +884,7 @@ NtUserRealWaitMessageEx(
DWORD dwWakeMask,
UINT uTimeout)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -898,7 +897,7 @@ NtUserRegisterUserApiHook(
DWORD dwUnknown4)
{
UserEnterExclusive();
UNIMPLEMENTED;
STUB;
UserLeave();
return 0;
}
@ -910,7 +909,7 @@ NtUserRegisterRawInputDevices(
IN UINT uiNumDevices,
IN UINT cbSize)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -922,7 +921,7 @@ NtUserResolveDesktop(
DWORD dwUnknown3,
DWORD dwUnknown4)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -932,7 +931,7 @@ NtUserSetAppImeLevel(
DWORD dwUnknown1,
DWORD dwUnknown2)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -941,7 +940,7 @@ APIENTRY
NtUserSetImeInfoEx(
DWORD dwUnknown1)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -953,7 +952,7 @@ NtUserSetInformationProcess(
DWORD dwUnknown3,
DWORD dwUnknown4)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -967,15 +966,15 @@ NtUserSetInformationThread(IN HANDLE ThreadHandle,
{
if (ThreadInformationClass == UserThreadInitiateShutdown)
{
DPRINT1("Shutdown initiated\n");
ERR("Shutdown initiated\n");
}
else if (ThreadInformationClass == UserThreadEndShutdown)
{
DPRINT1("Shutdown ended\n");
ERR("Shutdown ended\n");
}
else
{
UNIMPLEMENTED;
STUB;
}
return STATUS_SUCCESS;
@ -987,7 +986,7 @@ NtUserSetThreadLayoutHandles(
DWORD dwUnknown1,
DWORD dwUnknown2)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -995,7 +994,7 @@ BOOL
APIENTRY
NtUserSoundSentry(VOID)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -1004,7 +1003,7 @@ APIENTRY
NtUserTestForInteractiveUser(
DWORD dwUnknown1)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -1018,7 +1017,7 @@ NtUserCalcMenuBar(
DWORD dwUnknown4,
DWORD dwUnknown5)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -1032,7 +1031,7 @@ NtUserPaintMenuBar(
DWORD dwUnknown5,
DWORD dwUnknown6)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -1040,7 +1039,7 @@ BOOL
APIENTRY
NtUserUnregisterUserApiHook(VOID)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -1052,7 +1051,7 @@ NtUserGetLayeredWindowAttributes(
BYTE *pbAlpha,
DWORD *pdwFlags)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -1080,7 +1079,7 @@ NtUserRemoteConnect(
DWORD dwUnknown2,
DWORD dwUnknown3)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -1092,7 +1091,7 @@ NtUserRemoteRedrawRectangle(
DWORD dwUnknown3,
DWORD dwUnknown4)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -1100,7 +1099,7 @@ DWORD
APIENTRY
NtUserRemoteRedrawScreen(VOID)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -1108,7 +1107,7 @@ DWORD
APIENTRY
NtUserRemoteStopScreenUpdates(VOID)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -1119,7 +1118,7 @@ NtUserCtxDisplayIOCtl(
DWORD dwUnknown2,
DWORD dwUnknown3)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -1136,7 +1135,7 @@ NtUserDrawMenuBarTemp(
HFONT hFont)
{
/* we'll use this function just for caching the menu bar */
UNIMPLEMENTED
STUB
return 0;
}
@ -1152,7 +1151,7 @@ NtUserFillWindow(HWND hWndPaint,
HDC hDC,
HBRUSH hBrush)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -1163,7 +1162,7 @@ NtUserFillWindow(HWND hWndPaint,
BOOL APIENTRY
NtUserFlashWindowEx(IN PFLASHWINFO pfwi)
{
UNIMPLEMENTED
STUB
return 1;
}
@ -1174,7 +1173,7 @@ NtUserFlashWindowEx(IN PFLASHWINFO pfwi)
BOOL APIENTRY
NtUserLockWindowUpdate(HWND hWnd)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -1187,7 +1186,7 @@ NtUserRealChildWindowFromPoint(HWND Parent,
LONG x,
LONG y)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -1199,7 +1198,7 @@ DWORD APIENTRY
NtUserSetImeOwnerWindow(DWORD Unknown0,
DWORD Unknown1)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -1214,7 +1213,7 @@ NtUserSetInternalWindowPos(
LPRECT rect,
LPPOINT pt)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -1228,7 +1227,7 @@ NtUserSetLayeredWindowAttributes(HWND hwnd,
BYTE bAlpha,
DWORD dwFlags)
{
UNIMPLEMENTED;
STUB;
return FALSE;
}
@ -1249,7 +1248,7 @@ NtUserUpdateLayeredWindow(
DWORD dwFlags,
RECT *prcDirty)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -1260,7 +1259,7 @@ NtUserUpdateLayeredWindow(
HWND APIENTRY
NtUserWindowFromPhysicalPoint(POINT Point)
{
UNIMPLEMENTED
STUB
return NULL;
}
@ -1275,7 +1274,7 @@ NtUserWindowFromPhysicalPoint(POINT Point)
DWORD APIENTRY
NtUserResolveDesktopForWOW(DWORD Unknown0)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -1285,7 +1284,7 @@ NtUserResolveDesktopForWOW(DWORD Unknown0)
BOOL APIENTRY
NtUserEndMenu(VOID)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -1303,7 +1302,7 @@ NtUserTrackPopupMenuEx(
HWND hWnd,
LPTPMPARAMS lptpm)
{
UNIMPLEMENTED
STUB
return FALSE;
}
@ -1311,7 +1310,7 @@ NtUserTrackPopupMenuEx(
DWORD APIENTRY
NtUserQuerySendMessage(DWORD Unknown0)
{
UNIMPLEMENTED;
STUB;
return 0;
}
@ -1324,7 +1323,7 @@ NtUserAlterWindowStyle(DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2)
{
UNIMPLEMENTED
STUB
return(0);
}
@ -1343,7 +1342,7 @@ NtUserSetWindowStationUser(
DWORD Unknown2,
DWORD Unknown3)
{
UNIMPLEMENTED
STUB
return 0;
}
@ -1352,7 +1351,7 @@ BOOL APIENTRY NtUserAddClipboardFormatListener(
HWND hwnd
)
{
UNIMPLEMENTED;
STUB;
return FALSE;
}
@ -1360,7 +1359,7 @@ BOOL APIENTRY NtUserRemoveClipboardFormatListener(
HWND hwnd
)
{
UNIMPLEMENTED;
STUB;
return FALSE;
}
@ -1370,7 +1369,7 @@ BOOL APIENTRY NtUserGetUpdatedClipboardFormats(
PUINT pcFormatsOut
)
{
UNIMPLEMENTED;
STUB;
return FALSE;
}
@ -1385,7 +1384,7 @@ NtUserGetCursorFrameInfo(
DWORD Unknown2,
DWORD Unknown3)
{
UNIMPLEMENTED
STUB
return 0;
}

View file

@ -11,8 +11,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserMisc);
BOOL InitSysParams();
@ -64,14 +63,14 @@ InitUserImpl(VOID)
if (!UserCreateHandleTable())
{
DPRINT1("Failed creating handle table\n");
ERR("Failed creating handle table\n");
return STATUS_INSUFFICIENT_RESOURCES;
}
Status = InitSessionImpl();
if (!NT_SUCCESS(Status))
{
DPRINT1("Error init session impl.\n");
ERR("Error init session impl.\n");
return Status;
}
@ -152,7 +151,7 @@ NtUserInitialize(
{
NTSTATUS Status;
DPRINT1("Enter NtUserInitialize(%lx, %p, %p)\n",
ERR("Enter NtUserInitialize(%lx, %p, %p)\n",
dwWinVersion, hPowerRequestEvent, hMediaRequestEvent);
/* Check the Windows version */

View file

@ -24,8 +24,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserObj);
//int usedHandles=0;
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;
PPROCESSINFO ppi = PsGetCurrentProcessWin32Process();
DPRINT("handles used %i\n",gpsi->cHandleEntries);
TRACE("handles used %i\n",gpsi->cHandleEntries);
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,
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
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;
}
}
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 );
//#endif
return NULL;
@ -272,7 +271,7 @@ BOOL FASTCALL UserCreateHandleTable(VOID)
mem = UserHeapAlloc(sizeof(USER_HANDLE_ENTRY) * 1024*2);
if (!mem)
{
DPRINT1("Failed creating handle table\n");
ERR("Failed creating handle table\n");
return FALSE;
}
@ -280,7 +279,7 @@ BOOL FASTCALL UserCreateHandleTable(VOID)
if (gHandleTable == NULL)
{
UserHeapFree(mem);
DPRINT1("Failed creating handle table\n");
ERR("Failed creating handle table\n");
return FALSE;
}
@ -394,10 +393,10 @@ UserDereferenceObject(PVOID object)
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;
}
DPRINT("warning! Dereference to zero! Obj -> 0x%x\n", object);
TRACE("warning! Dereference to zero! Obj -> 0x%x\n", object);
((PHEAD)object)->cLockObj = 0;

View file

@ -13,8 +13,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserPainting);
/* PRIVATE FUNCTIONS **********************************************************/
@ -313,7 +312,7 @@ IntInvalidateWindows(PWND Wnd, HRGN hRgn, ULONG Flags)
BOOL HadPaintMessage, HadNCPaintMessage;
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
* rect
@ -465,7 +464,7 @@ IntInvalidateWindows(PWND Wnd, HRGN hRgn, ULONG Flags)
else
MsqIncPaintCountQueue(Wnd->head.pti->MessageQueue);
}
DPRINT("IntInvalidateWindows exit\n");
TRACE("IntInvalidateWindows exit\n");
}
/*
@ -511,7 +510,7 @@ co_UserRedrawWindow(
ULONG Flags)
{
HRGN hRgn = NULL;
DPRINT("co_UserRedrawWindow start\n");
TRACE("co_UserRedrawWindow start\n");
/*
* Step 1.
@ -593,7 +592,7 @@ co_UserRedrawWindow(
{
GreDeleteObject(hRgn);
}
DPRINT("co_UserRedrawWindow exit\n");
TRACE("co_UserRedrawWindow exit\n");
return TRUE;
}
@ -667,7 +666,7 @@ IntGetPaintMessage(
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 ! */
Thread->cPaintsReady = 0;
return FALSE;
@ -801,7 +800,7 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs)
DECLARE_RETURN(HDC);
USER_REFERENCE_ENTRY Ref;
DPRINT("Enter NtUserBeginPaint\n");
TRACE("Enter NtUserBeginPaint\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)))
@ -893,7 +892,7 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* UnsafePs)
CLEANUP:
if (Window) UserDerefObjectCo(Window);
DPRINT("Leave NtUserBeginPaint, ret=%i\n",_ret_);
TRACE("Leave NtUserBeginPaint, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
@ -915,7 +914,7 @@ NtUserEndPaint(HWND hWnd, CONST PAINTSTRUCT* pUnsafePs)
USER_REFERENCE_ENTRY Ref;
HDC hdc = NULL;
DPRINT("Enter NtUserEndPaint\n");
TRACE("Enter NtUserEndPaint\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)))
@ -947,7 +946,7 @@ NtUserEndPaint(HWND hWnd, CONST PAINTSTRUCT* pUnsafePs)
RETURN(TRUE);
CLEANUP:
DPRINT("Leave NtUserEndPaint, ret=%i\n",_ret_);
TRACE("Leave NtUserEndPaint, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -997,7 +996,7 @@ NtUserGetUpdateRgn(HWND hWnd, HRGN hRgn, BOOL bErase)
INT ret;
USER_REFERENCE_ENTRY Ref;
DPRINT("Enter NtUserGetUpdateRgn\n");
TRACE("Enter NtUserGetUpdateRgn\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)))
@ -1012,7 +1011,7 @@ NtUserGetUpdateRgn(HWND hWnd, HRGN hRgn, BOOL bErase)
RETURN(ret);
CLEANUP:
DPRINT("Leave NtUserGetUpdateRgn, ret=%i\n",_ret_);
TRACE("Leave NtUserGetUpdateRgn, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1034,7 +1033,7 @@ NtUserGetUpdateRect(HWND hWnd, LPRECT UnsafeRect, BOOL bErase)
NTSTATUS Status;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserGetUpdateRect\n");
TRACE("Enter NtUserGetUpdateRect\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)))
@ -1096,7 +1095,7 @@ NtUserGetUpdateRect(HWND hWnd, LPRECT UnsafeRect, BOOL bErase)
RETURN(!RECTL_bIsEmptyRect(&Rect));
CLEANUP:
DPRINT("Leave NtUserGetUpdateRect, ret=%i\n",_ret_);
TRACE("Leave NtUserGetUpdateRect, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1122,7 +1121,7 @@ NtUserRedrawWindow(
NTSTATUS Status = STATUS_SUCCESS;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserRedrawWindow\n");
TRACE("Enter NtUserRedrawWindow\n");
UserEnterExclusive();
if (!(Wnd = UserGetWindowObject(hWnd ? hWnd : IntGetDesktopWindow())))
@ -1170,7 +1169,7 @@ NtUserRedrawWindow(
RETURN( Ret);
CLEANUP:
DPRINT("Leave NtUserRedrawWindow, ret=%i\n",_ret_);
TRACE("Leave NtUserRedrawWindow, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1310,7 +1309,7 @@ NtUserScrollDC(
NTSTATUS Status = STATUS_SUCCESS;
DWORD Result;
DPRINT("Enter NtUserScrollDC\n");
TRACE("Enter NtUserScrollDC\n");
UserEnterExclusive();
_SEH2_TRY
@ -1376,7 +1375,7 @@ NtUserScrollDC(
RETURN(TRUE);
CLEANUP:
DPRINT("Leave NtUserScrollDC, ret=%i\n",_ret_);
TRACE("Leave NtUserScrollDC, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1409,7 +1408,7 @@ NtUserScrollWindowEx(
DECLARE_RETURN(DWORD);
USER_REFERENCE_ENTRY Ref, CaretRef;
DPRINT("Enter NtUserScrollWindowEx\n");
TRACE("Enter NtUserScrollWindowEx\n");
UserEnterExclusive();
Window = UserGetWindowObject(hWnd);
@ -1574,7 +1573,7 @@ CLEANUP:
if (Window)
UserDerefObjectCo(Window);
DPRINT("Leave NtUserScrollWindowEx, ret=%i\n",_ret_);
TRACE("Leave NtUserScrollWindowEx, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1593,19 +1592,14 @@ UserDrawCaptionText(
NTSTATUS Status;
BOOLEAN bDeleteFont = FALSE;
SIZE Size;
#ifndef NDEBUG
INT i;
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
TRACE("UserDrawCaptionText: %wZ\n", Text);
nclm.cbSize = sizeof(nclm);
if(!UserSystemParametersInfo(SPI_GETNONCLIENTMETRICS,
sizeof(NONCLIENTMETRICS), &nclm, 0))
{
DPRINT1("UserSystemParametersInfo() failed!\n");
ERR("UserSystemParametersInfo() failed!\n");
return FALSE;
}
@ -1618,7 +1612,7 @@ UserDrawCaptionText(
if(!NT_SUCCESS(Status))
{
DPRINT1("TextIntCreateFontIndirect() failed! Status: 0x%x\n", Status);
ERR("TextIntCreateFontIndirect() failed! Status: 0x%x\n", Status);
return FALSE;
}
@ -1630,7 +1624,7 @@ UserDrawCaptionText(
hOldFont = NtGdiSelectFont(hDc, hFont);
if(!hOldFont)
{
DPRINT1("SelectFont() failed!\n");
ERR("SelectFont() failed!\n");
/* Don't fail */
}
@ -1709,7 +1703,7 @@ BOOL UserDrawCaption(
if(!GreGradientFill(hDc, Vertices, 2, &gcap, 1, GRADIENT_FILL_RECT_H))
{
DPRINT1("GreGradientFill() failed!\n");
ERR("GreGradientFill() failed!\n");
goto cleanup;
}
}
@ -1726,7 +1720,7 @@ BOOL UserDrawCaption(
if(!hOldBrush)
{
DPRINT1("NtGdiSelectBrush() failed!\n");
ERR("NtGdiSelectBrush() failed!\n");
goto cleanup;
}
@ -1735,7 +1729,7 @@ BOOL UserDrawCaption(
Rect.bottom - Rect.top,
PATCOPY))
{
DPRINT1("NtGdiPatBlt() failed!\n");
ERR("NtGdiPatBlt() failed!\n");
goto cleanup;
}
}

View file

@ -29,8 +29,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserProp);
/* STATIC FUNCTIONS **********************************************************/
@ -108,7 +107,7 @@ NtUserBuildPropList(HWND hWnd,
DWORD Cnt = 0;
DECLARE_RETURN(NTSTATUS);
DPRINT("Enter NtUserBuildPropList\n");
TRACE("Enter NtUserBuildPropList\n");
UserEnterShared();
if (!(Window = UserGetWindowObject(hWnd)))
@ -162,7 +161,7 @@ NtUserBuildPropList(HWND hWnd,
RETURN( STATUS_SUCCESS);
CLEANUP:
DPRINT("Leave NtUserBuildPropList, ret=%i\n",_ret_);
TRACE("Leave NtUserBuildPropList, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -175,7 +174,7 @@ NtUserRemoveProp(HWND hWnd, ATOM Atom)
HANDLE Data;
DECLARE_RETURN(HANDLE);
DPRINT("Enter NtUserRemoveProp\n");
TRACE("Enter NtUserRemoveProp\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)))
@ -197,7 +196,7 @@ NtUserRemoveProp(HWND hWnd, ATOM Atom)
RETURN(Data);
CLEANUP:
DPRINT("Leave NtUserRemoveProp, ret=%i\n",_ret_);
TRACE("Leave NtUserRemoveProp, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -208,7 +207,7 @@ NtUserSetProp(HWND hWnd, ATOM Atom, HANDLE Data)
PWND Window;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserSetProp\n");
TRACE("Enter NtUserSetProp\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)))
@ -219,7 +218,7 @@ NtUserSetProp(HWND hWnd, ATOM Atom, HANDLE Data)
RETURN( IntSetProp(Window, Atom, Data));
CLEANUP:
DPRINT("Leave NtUserSetProp, ret=%i\n",_ret_);
TRACE("Leave NtUserSetProp, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}

View file

@ -12,8 +12,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserScrollbar);
#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))
{
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;
}
@ -241,7 +240,7 @@ NEWco_IntGetScrollInfo(
if (!SBID_IS_VALID(nBar))
{
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;
}
@ -293,7 +292,7 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
if(!SBID_IS_VALID(nBar))
{
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;
}
@ -443,7 +442,7 @@ co_IntGetScrollBarInfo(PWND Window, LONG idObject, PSCROLLBARINFO psbi)
if(!SBID_IS_VALID(Bar))
{
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;
}
@ -483,7 +482,7 @@ co_IntCreateScrollBars(PWND Window)
Size = 3 * (sizeof(SBINFOEX));
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;
}
@ -573,7 +572,7 @@ NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi)
DECLARE_RETURN(BOOL);
USER_REFERENCE_ENTRY Ref;
DPRINT("Enter NtUserGetScrollBarInfo\n");
TRACE("Enter NtUserGetScrollBarInfo\n");
UserEnterExclusive();
Status = MmCopyFromCaller(&sbi, psbi, sizeof(SCROLLBARINFO));
@ -602,7 +601,7 @@ NtUserGetScrollBarInfo(HWND hWnd, LONG idObject, PSCROLLBARINFO psbi)
RETURN( Ret);
CLEANUP:
DPRINT("Leave NtUserGetScrollBarInfo, ret=%i\n",_ret_);
TRACE("Leave NtUserGetScrollBarInfo, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
@ -625,7 +624,7 @@ NtUserSBGetParms(
DECLARE_RETURN(BOOL);
USER_REFERENCE_ENTRY Ref;
DPRINT("Enter NtUserGetScrollInfo\n");
TRACE("Enter NtUserGetScrollInfo\n");
UserEnterExclusive();
Status = MmCopyFromCaller(&psi.cbSize, &(lpsi->cbSize), sizeof(UINT));
@ -662,7 +661,7 @@ NtUserSBGetParms(
RETURN( Ret);
CLEANUP:
DPRINT("Leave NtUserGetScrollInfo, ret=%i\n",_ret_);
TRACE("Leave NtUserGetScrollInfo, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -681,7 +680,7 @@ NtUserEnableScrollBar(
DECLARE_RETURN(BOOL);
USER_REFERENCE_ENTRY Ref;
DPRINT("Enter NtUserEnableScrollBar\n");
TRACE("Enter NtUserEnableScrollBar\n");
UserEnterExclusive();
if(!(Window = UserGetWindowObject(hWnd)))
@ -693,7 +692,7 @@ NtUserEnableScrollBar(
if(wSBflags == SB_CTL)
{
/* FIXME Enable or Disable SB Ctrl*/
DPRINT1("Enable Scrollbar SB_CTL\n");
ERR("Enable Scrollbar SB_CTL\n");
InfoV = IntGetScrollbarInfoFromWindow(Window, SB_CTL);
Chg = IntEnableScrollBar(FALSE, InfoV ,wArrows);
/* Chg? Scrollbar is Refresh in user32/controls/scrollbar.c. */
@ -704,7 +703,7 @@ NtUserEnableScrollBar(
if(wSBflags != SB_BOTH && !SBID_IS_VALID(wSBflags))
{
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);
}
@ -743,7 +742,7 @@ CLEANUP:
if (Window)
UserDerefObjectCo(Window);
DPRINT("Leave NtUserEnableScrollBar, ret=%i\n",_ret_);
TRACE("Leave NtUserEnableScrollBar, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -764,7 +763,7 @@ NtUserSetScrollBarInfo(
DECLARE_RETURN(BOOL);
USER_REFERENCE_ENTRY Ref;
DPRINT("Enter NtUserSetScrollBarInfo\n");
TRACE("Enter NtUserSetScrollBarInfo\n");
UserEnterExclusive();
if(!(Window = UserGetWindowObject(hWnd)))
@ -777,7 +776,7 @@ NtUserSetScrollBarInfo(
if(!SBID_IS_VALID(Obj))
{
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);
}
@ -806,7 +805,7 @@ CLEANUP:
if (Window)
UserDerefObjectCo(Window);
DPRINT("Leave NtUserSetScrollBarInfo, ret=%i\n",_ret_);
TRACE("Leave NtUserSetScrollBarInfo, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -825,7 +824,7 @@ NtUserSetScrollInfo(
DECLARE_RETURN(DWORD);
USER_REFERENCE_ENTRY Ref;
DPRINT("Enter NtUserSetScrollInfo\n");
TRACE("Enter NtUserSetScrollInfo\n");
UserEnterExclusive();
if(!(Window = UserGetWindowObject(hWnd)))
@ -847,7 +846,7 @@ CLEANUP:
if (Window)
UserDerefObjectCo(Window);
DPRINT("Leave NtUserSetScrollInfo, ret=%i\n",_ret_);
TRACE("Leave NtUserSetScrollInfo, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
@ -926,7 +925,7 @@ NtUserShowScrollBar(HWND hWnd, int wBar, DWORD bShow)
DWORD ret;
USER_REFERENCE_ENTRY Ref;
DPRINT("Enter NtUserShowScrollBar\n");
TRACE("Enter NtUserShowScrollBar\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)))
@ -941,7 +940,7 @@ NtUserShowScrollBar(HWND hWnd, int wBar, DWORD bShow)
RETURN(ret);
CLEANUP:
DPRINT("Leave NtUserShowScrollBar, ret%i\n",_ret_);
TRACE("Leave NtUserShowScrollBar, ret%i\n",_ret_);
UserLeave();
END_CLEANUP;

View file

@ -10,9 +10,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserMisc);
/* registered Logon process */
PPROCESSINFO LogonProcess = NULL;
@ -64,7 +62,7 @@ co_IntRegisterLogonProcess(HANDLE ProcessId, BOOL Register)
Status = co_CsrNotify(&Request);
if (! NT_SUCCESS(Status))
{
DPRINT1("Failed to register logon process with CSRSS\n");
ERR("Failed to register logon process with CSRSS\n");
return FALSE;
}
@ -81,7 +79,7 @@ NtUserCallNoParam(DWORD Routine)
DWORD_PTR Result = 0;
DECLARE_RETURN(DWORD_PTR);
DPRINT("Enter NtUserCallNoParam\n");
TRACE("Enter NtUserCallNoParam\n");
UserEnterExclusive();
switch(Routine)
@ -123,14 +121,14 @@ NtUserCallNoParam(DWORD Routine)
RETURN( (DWORD_PTR)IntReleaseCapture());
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);
break;
}
RETURN(Result);
CLEANUP:
DPRINT("Leave NtUserCallNoParam, ret=%i\n",_ret_);
TRACE("Leave NtUserCallNoParam, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -147,7 +145,7 @@ NtUserCallOneParam(
{
DECLARE_RETURN(DWORD_PTR);
DPRINT("Enter NtUserCallOneParam\n");
TRACE("Enter NtUserCallOneParam\n");
UserEnterExclusive();
@ -381,13 +379,13 @@ NtUserCallOneParam(
RETURN ( UserPostMessage(hwndSAS, WM_LOGONNOTIFY, LN_MESSAGE_BEEP, Param) );
/* 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);
EngSetLastError(ERROR_INVALID_PARAMETER);
RETURN( 0);
CLEANUP:
DPRINT("Leave NtUserCallOneParam, ret=%i\n",_ret_);
TRACE("Leave NtUserCallOneParam, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -406,7 +404,7 @@ NtUserCallTwoParam(
PWND Window;
DECLARE_RETURN(DWORD_PTR);
DPRINT("Enter NtUserCallTwoParam\n");
TRACE("Enter NtUserCallTwoParam\n");
UserEnterExclusive();
switch(Routine)
@ -462,7 +460,7 @@ NtUserCallTwoParam(
}
case TWOPARAM_ROUTINE_SWITCHTOTHISWINDOW:
UNIMPLEMENTED
STUB
RETURN( 0);
@ -478,13 +476,13 @@ NtUserCallTwoParam(
case TWOPARAM_ROUTINE_UNHOOKWINDOWSHOOK:
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);
EngSetLastError(ERROR_INVALID_PARAMETER);
RETURN( 0);
CLEANUP:
DPRINT("Leave NtUserCallTwoParam, ret=%i\n",_ret_);
TRACE("Leave NtUserCallTwoParam, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -504,7 +502,7 @@ NtUserCallHwndLock(
USER_REFERENCE_ENTRY Ref;
DECLARE_RETURN(BOOLEAN);
DPRINT("Enter NtUserCallHwndLock\n");
TRACE("Enter NtUserCallHwndLock\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)))
@ -522,7 +520,7 @@ NtUserCallHwndLock(
case HWNDLOCK_ROUTINE_DRAWMENUBAR:
{
DPRINT("HWNDLOCK_ROUTINE_DRAWMENUBAR\n");
TRACE("HWNDLOCK_ROUTINE_DRAWMENUBAR\n");
Ret = TRUE;
if ((Window->style & (WS_CHILD | WS_POPUP)) != WS_CHILD)
co_WinPosSetWindowPos( Window,
@ -578,7 +576,7 @@ NtUserCallHwndLock(
RETURN( Ret);
CLEANUP:
DPRINT("Leave NtUserCallHwndLock, ret=%i\n",_ret_);
TRACE("Leave NtUserCallHwndLock, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -645,7 +643,7 @@ NtUserCallHwnd(
return IntDeRegisterShellHookWindow(hWnd);
return FALSE;
}
UNIMPLEMENTED;
STUB;
return 0;
}
@ -734,7 +732,7 @@ NtUserCallHwndParam(
}
}
UNIMPLEMENTED;
STUB;
return 0;
}
@ -751,7 +749,7 @@ NtUserCallHwndParamLock(
USER_REFERENCE_ENTRY Ref;
DECLARE_RETURN(DWORD);
DPRINT("Enter NtUserCallHwndParamLock\n");
TRACE("Enter NtUserCallHwndParamLock\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)))
@ -772,7 +770,7 @@ NtUserCallHwndParamLock(
RETURN( Ret);
CLEANUP:
DPRINT("Leave NtUserCallHwndParamLock, ret=%i\n",_ret_);
TRACE("Leave NtUserCallHwndParamLock, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;

View file

@ -13,16 +13,14 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
#include <winsta.h>
DBG_DEFAULT_CHANNEL(UserSysparams);
#define KeRosDumpStackFrames(Frames, Count) KdSystemDebugControl('DsoR', (PVOID)Frames, Count, NULL, 0, NULL, KernelMode)
HBITMAP NTAPI UserLoadImage(PCWSTR);
BOOL NTAPI W32kDosPathNameToNtPathName(PCWSTR, PUNICODE_STRING);
BOOL gbDebug = 0;
SPIVALUES gspv;
BOOL gbSpiInitialized = FALSE;
PWINSTATION_OBJECT gpwinstaCurrent = NULL;
@ -40,8 +38,6 @@ PWINSTATION_OBJECT gpwinstaCurrent = NULL;
return 0; \
}
#define DPRINTX if (gbDebug) DPRINT1
static const WCHAR* KEY_MOUSE = L"Control Panel\\Mouse";
static const WCHAR* VAL_MOUSE1 = L"MouseThreshold1";
static const WCHAR* VAL_MOUSE2 = L"MouseThreshold2";
@ -165,7 +161,7 @@ SpiLoadMetric(PCWSTR pwszValue, INT iValue)
INT iRegVal;
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);
return REG2METRIC(iRegVal);
}
@ -220,7 +216,7 @@ SpiUpdatePerUserSystemParameters()
FALSE, ANSI_CHARSET, 0, 0, DEFAULT_QUALITY,
VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif"};
DPRINT("Enter SpiUpdatePerUserSystemParameters\n");
TRACE("Enter SpiUpdatePerUserSystemParameters\n");
/* Clear the structure */
memset(&gspv, 0, sizeof(gspv));
@ -326,13 +322,13 @@ NtUserUpdatePerUserSystemParameters(
{
BOOL bResult;
DPRINT("Enter NtUserUpdatePerUserSystemParameters\n");
TRACE("Enter NtUserUpdatePerUserSystemParameters\n");
UserEnterExclusive();
SpiUpdatePerUserSystemParameters();
bResult = IntDesktopUpdatePerUserSettings(bEnable);
DPRINT("Leave NtUserUpdatePerUserSystemParameters, returning %d\n", bResult);
TRACE("Leave NtUserUpdatePerUserSystemParameters, returning %d\n", bResult);
UserLeave();
return bResult;
@ -433,7 +429,7 @@ SpiMemCopy(PVOID pvDst, PVOID pvSrc, ULONG cbSize, BOOL bProtect, BOOL bToUser)
if (!NT_SUCCESS(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);
}
@ -619,7 +615,7 @@ SpiSetWallpaper(PVOID pvParam, FLONG fl)
gspv.ustrWallpaper.Length = ustr.Length;
gspv.awcWallpaper[ustr.Length / sizeof(WCHAR)] = 0;
DPRINT("SpiSetWallpaper, name=%S\n", gspv.awcWallpaper);
TRACE("SpiSetWallpaper, name=%S\n", gspv.awcWallpaper);
/* Update registry */
if (fl & SPIF_UPDATEINIFILE)
@ -636,7 +632,7 @@ SpiSetWallpaper(PVOID pvParam, FLONG fl)
ustr.Length = 0;
if (!W32kDosPathNameToNtPathName(gspv.awcWallpaper, &ustr))
{
DPRINT1("RtlDosPathNameToNtPathName_U failed\n");
ERR("RtlDosPathNameToNtPathName_U failed\n");
return 0;
}
@ -644,7 +640,7 @@ SpiSetWallpaper(PVOID pvParam, FLONG fl)
hbmp = UserLoadImage(ustr.Buffer);
if (!hbmp)
{
DPRINT1("UserLoadImage failed\n");
ERR("UserLoadImage failed\n");
return 0;
}
@ -667,7 +663,7 @@ SpiSetWallpaper(PVOID pvParam, FLONG fl)
/* Yes, Windows really loads the current setting from the registry. */
ulTile = SpiLoadInt(KEY_DESKTOP, L"TileWallpaper", 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 */
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);
case SPI_LANGDRIVER:
DPRINT1("SPI_LANGDRIVER is unimplemented\n");
ERR("SPI_LANGDRIVER is unimplemented\n");
break;
case SPI_GETSCREENSAVETIMEOUT:
@ -774,7 +770,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
return SpiSetWallpaper(pvParam, fl);
case SPI_SETDESKPATTERN:
DPRINT1("SPI_SETDESKPATTERN is unimplemented\n");
ERR("SPI_SETDESKPATTERN is unimplemented\n");
break;
case SPI_GETKEYBOARDDELAY:
@ -951,7 +947,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
}
case SPI_SETPENWINDOWS:
DPRINT1("SPI_SETPENWINDOWS is unimplemented\n");
ERR("SPI_SETPENWINDOWS is unimplemented\n");
break;
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);
case SPI_SETCURSORS:
DPRINT1("SPI_SETCURSORS is unimplemented\n");
ERR("SPI_SETCURSORS is unimplemented\n");
break;
case SPI_SETICONS:
DPRINT1("SPI_SETICONS is unimplemented\n");
ERR("SPI_SETICONS is unimplemented\n");
break;
case SPI_GETDEFAULTINPUTLANG:
DPRINT1("SPI_GETDEFAULTINPUTLANG is unimplemented\n");
ERR("SPI_GETDEFAULTINPUTLANG is unimplemented\n");
break;
case SPI_SETDEFAULTINPUTLANG:
DPRINT1("SPI_SETDEFAULTINPUTLANG is unimplemented\n");
ERR("SPI_SETDEFAULTINPUTLANG is unimplemented\n");
break;
case SPI_SETLANGTOGGLE:
DPRINT1("SPI_SETLANGTOGGLE is unimplemented\n");
ERR("SPI_SETLANGTOGGLE is unimplemented\n");
break;
case SPI_GETWINDOWSEXTENSION:
DPRINT1("SPI_GETWINDOWSEXTENSION is unimplemented\n");
ERR("SPI_GETWINDOWSEXTENSION is unimplemented\n");
break;
case SPI_GETMOUSETRAILS:
@ -1233,7 +1229,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
return SpiGet(pvParam, &gspv.audiodesription, sizeof(AUDIODESCRIPTION), fl);
case SPI_SETAUDIODESCRIPTION:
DPRINT1("SPI_SETAUDIODESCRIPTION is unimplemented\n");
ERR("SPI_SETAUDIODESCRIPTION is unimplemented\n");
break;
case SPI_GETSCREENSAVESECURE:
@ -1476,11 +1472,11 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
case 0x103B:
case 0x103C:
case 0x103D:
DPRINT1("Undocumented SPI value %x is unimplemented\n", uiAction);
ERR("Undocumented SPI value %x is unimplemented\n", uiAction);
break;
default:
DPRINT1("Invalid SPI value: %d\n", uiAction);
ERR("Invalid SPI value: %d\n", uiAction);
EngSetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
@ -1509,7 +1505,7 @@ UserSystemParametersInfo(
if (!gpwinstaCurrent)
{
DPRINT1("UserSystemParametersInfo called without active windowstation.\n");
ERR("UserSystemParametersInfo called without active windowstation.\n");
//KeRosDumpStackFrames(NULL, 0);
}
@ -1559,11 +1555,9 @@ NtUserSystemParametersInfo(
{
BOOL bResult;
DPRINT("Enter NtUserSystemParametersInfo(%d)\n", uiAction);
TRACE("Enter NtUserSystemParametersInfo(%d)\n", uiAction);
UserEnterExclusive();
//if (uiAction == SPI_SETMOUSE) gbDebug = 1;
// FIXME: get rid of the flags and only use this from um. kernel can access data directly.
/* Set UM memory protection flag */
fWinIni |= SPIF_PROTECT;
@ -1571,14 +1565,8 @@ NtUserSystemParametersInfo(
/* Call internal function */
bResult = UserSystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
//DPRINTX("NtUserSystemParametersInfo SPI_ICONHORIZONTALSPACING uiParam=%d, pvParam=%p, pvParam=%d bResult=%d\n",
// uiParam, pvParam, pvParam?*(UINT*)pvParam:0, bResult);
DPRINT("Leave NtUserSystemParametersInfo, returning %d\n", bResult);
TRACE("Leave NtUserSystemParametersInfo, returning %d\n", bResult);
UserLeave();
//DPRINTX("NtUserSystemParametersInfo SPI_ICONHORIZONTALSPACING bResult=%d\n", bResult);
//gbDebug = 0;
return bResult;
}

View file

@ -14,8 +14,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserTimer);
WORD FASTCALL get_key_state(void);
@ -96,7 +95,7 @@ RemoveTimer(PTIMER pTmr)
UserDereferenceObject(pTmr);
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;
}
@ -199,14 +198,14 @@ IntSetTimer( PWND Window,
/* Windows NT/2k/XP behaviour */
if (Elapse > MAX_ELAPSE_TIME)
{
DPRINT("Adjusting uElapse\n");
TRACE("Adjusting uElapse\n");
Elapse = 1;
}
#else
/* Windows XP SP2 and Windows Server 2003 behaviour */
if (Elapse > MAX_ELAPSE_TIME)
{
DPRINT("Adjusting uElapse\n");
TRACE("Adjusting uElapse\n");
Elapse = MAX_ELAPSE_TIME;
}
#endif
@ -214,7 +213,7 @@ IntSetTimer( PWND Window,
/* Windows 2k/XP and Windows Server 2003 SP1 behaviour */
if (Elapse < 10)
{
DPRINT("Adjusting uElapse\n");
TRACE("Adjusting uElapse\n");
Elapse = 10;
}
@ -234,7 +233,7 @@ IntSetTimer( PWND Window,
if (IDEvent == (UINT_PTR) -1)
{
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);
ASSERT(FALSE);
return 0;
@ -300,13 +299,13 @@ SystemTimerProc(HWND hwnd,
pWnd = UserGetWindowObject(hwnd);
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;
}
}
else
{
DPRINT( "Windowless Timer Running!\n" );
TRACE( "Windowless Timer Running!\n" );
return;
}
@ -355,7 +354,7 @@ SystemTimerProc(HWND hwnd,
return; // Not this window so just return.
default:
DPRINT1( "System Timer Proc invalid id %d!\n", idEvent );
ERR( "System Timer Proc invalid id %d!\n", idEvent );
break;
}
IntKillTimer(pWnd, idEvent, TRUE);
@ -382,7 +381,7 @@ SystemTimerSet( PWND Window,
if (Window && Window->head.pti->pEThread->ThreadsProcess != PsGetCurrentProcess())
{
EngSetLastError(ERROR_ACCESS_DENIED);
DPRINT("SysemTimerSet: Access Denied!\n");
TRACE("SysemTimerSet: Access Denied!\n");
return 0;
}
return IntSetTimer( Window, nIDEvent, uElapse, lpTimerFunc, TMRF_SYSTEM);
@ -512,7 +511,7 @@ ProcessTimers(VOID)
TimeLast = Time;
TimerLeave();
DPRINT("TimerCount = %d\n", TimerCount);
TRACE("TimerCount = %d\n", TimerCount);
}
BOOL FASTCALL
@ -570,7 +569,7 @@ BOOL FASTCALL
IntKillTimer(PWND Window, UINT_PTR IDEvent, BOOL SystemTimer)
{
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");
TimerEnterExclusive();
@ -627,7 +626,7 @@ NtUserSetTimer
PWND Window;
DECLARE_RETURN(UINT_PTR);
DPRINT("Enter NtUserSetTimer\n");
TRACE("Enter NtUserSetTimer\n");
UserEnterExclusive();
Window = UserGetWindowObject(hWnd);
UserLeave();
@ -635,7 +634,7 @@ NtUserSetTimer
RETURN(IntSetTimer(Window, nIDEvent, uElapse, lpTimerFunc, TMRF_TIFROMWND));
CLEANUP:
DPRINT("Leave NtUserSetTimer, ret=%i\n", _ret_);
TRACE("Leave NtUserSetTimer, ret=%i\n", _ret_);
END_CLEANUP;
}
@ -652,7 +651,7 @@ NtUserKillTimer
PWND Window;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserKillTimer\n");
TRACE("Enter NtUserKillTimer\n");
UserEnterExclusive();
Window = UserGetWindowObject(hWnd);
UserLeave();
@ -660,7 +659,7 @@ NtUserKillTimer
RETURN(IntKillTimer(Window, uIDEvent, FALSE));
CLEANUP:
DPRINT("Leave NtUserKillTimer, ret=%i\n", _ret_);
TRACE("Leave NtUserKillTimer, ret=%i\n", _ret_);
END_CLEANUP;
}
@ -676,12 +675,12 @@ NtUserSetSystemTimer(
{
DECLARE_RETURN(UINT_PTR);
DPRINT("Enter NtUserSetSystemTimer\n");
TRACE("Enter NtUserSetSystemTimer\n");
RETURN(IntSetTimer(UserGetWindowObject(hWnd), nIDEvent, uElapse, NULL, TMRF_SYSTEM));
CLEANUP:
DPRINT("Leave NtUserSetSystemTimer, ret=%i\n", _ret_);
TRACE("Leave NtUserSetSystemTimer, ret=%i\n", _ret_);
END_CLEANUP;
}

View file

@ -26,8 +26,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserMisc);
RTL_ATOM FASTCALL
IntAddAtom(LPWSTR AtomName)
@ -89,7 +88,7 @@ IntAddGlobalAtom(LPWSTR lpBuffer, BOOL PinAtom)
if (!NT_SUCCESS(Status))
{
DPRINT1("Error init Global Atom.\n");
ERR("Error init Global Atom.\n");
return 0;
}

View file

@ -26,8 +26,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserWinpos);
HRGN FASTCALL
VIS_ComputeVisibleRegion(
@ -68,7 +67,7 @@ VIS_ComputeVisibleRegion(
if ( CurrentWindow->state2 & WNDS2_INDESTROY ||
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);
return NULL;
}

View file

@ -11,8 +11,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserDce);
int FASTCALL CLIPPING_UpdateGCRegion(DC* Dc);
@ -94,7 +93,7 @@ DceAllocDCE(PWND Window OPTIONAL, DCE_TYPE Type)
return NULL;
}
DCECount++;
DPRINT("Alloc DCE's! %d\n",DCECount);
TRACE("Alloc DCE's! %d\n",DCECount);
pDce->hwndCurrent = (Window ? Window->head.h : NULL);
pDce->pwndOrg = Window;
pDce->pwndClip = Window;
@ -113,7 +112,7 @@ DceAllocDCE(PWND Window OPTIONAL, DCE_TYPE Type)
}
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);
pDce->ptiOwner = NULL;
}
@ -225,7 +224,7 @@ DceReleaseDC(DCE* dce, BOOL EndPaint)
}
}
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))
return 0;
dce->ptiOwner = NULL; // Reset ownership.
@ -372,7 +371,7 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
else
{
if (Wnd->pcls->pdce) hDC = ((PDCE)Wnd->pcls->pdce)->hDC;
DPRINT("We have CLASS!!\n");
TRACE("We have CLASS!!\n");
}
}
/* else // For Testing!
@ -524,7 +523,7 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
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();
/* FIXME: Handle error */
}
@ -568,7 +567,7 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
{
if (Dce->hrgnClip != NULL)
{
DPRINT1("Should not be called!!\n");
ERR("Should not be called!!\n");
GreDeleteObject(Dce->hrgnClip);
Dce->hrgnClip = NULL;
}
@ -581,7 +580,7 @@ UserGetDCEx(PWND Wnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
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.
GreSetDCOwner(Dce->hDC, GDI_OBJ_HMGR_POWNED);
Dce->ptiOwner = GetW32ThreadInfo(); // Set the temp owning
@ -625,7 +624,7 @@ DceFreeDCE(PDCE pdce, BOOLEAN Force)
if (Force &&
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.
if (GreIsHandleValid(pdce->hDC))
{
@ -633,7 +632,7 @@ DceFreeDCE(PDCE pdce, BOOLEAN Force)
}
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;
}
}
@ -655,14 +654,14 @@ DceFreeDCE(PDCE pdce, BOOLEAN Force)
if (IsListEmpty(&pdce->List))
{
DPRINT1("List is Empty! DCE! -> %x\n" , pdce);
ERR("List is Empty! DCE! -> %x\n" , pdce);
return NULL;
}
ExFreePoolWithTag(pdce, USERTAG_DCE);
DCECount--;
DPRINT("Freed DCE's! %d \n", DCECount);
TRACE("Freed DCE's! %d \n", DCECount);
return ret;
}
@ -680,7 +679,7 @@ DceFreeWindowDCE(PWND Window)
if (DCECount <= 0)
{
DPRINT1("FreeWindowDCE No Entry! %d\n",DCECount);
ERR("FreeWindowDCE No Entry! %d\n",DCECount);
return;
}
@ -690,12 +689,12 @@ DceFreeWindowDCE(PWND Window)
{
if (!pDCE)
{
DPRINT1("FreeWindowDCE No DCE Pointer!\n");
ERR("FreeWindowDCE No DCE Pointer!\n");
break;
}
if (IsListEmpty(&pDCE->List))
{
DPRINT1("FreeWindowDCE List is Empty!!!!\n");
ERR("FreeWindowDCE List is Empty!!!!\n");
break;
}
if ( pDCE->hwndCurrent == Window->head.h &&
@ -713,10 +712,10 @@ DceFreeWindowDCE(PWND Window)
pDCE->DCXFlags = DCX_DCEEMPTY|DCX_CACHE;
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))
{
DPRINT1("Fail Owner Switch hDC-> %x \n", pDCE->hDC);
ERR("Fail Owner Switch hDC-> %x \n", pDCE->hDC);
break;
}
/* Do not change owner so thread can clean up! */
@ -729,7 +728,7 @@ DceFreeWindowDCE(PWND Window)
}
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 */
}
}
@ -738,13 +737,13 @@ DceFreeWindowDCE(PWND Window)
if (pDCE->DCXFlags & DCX_DCEBUSY) /* shared cache DCE */
{
/* 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
* 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?).
*/
DPRINT1("[%p] GetDC() without ReleaseDC()!\n", Window->head.h);
ERR("[%p] GetDC() without ReleaseDC()!\n", Window->head.h);
DceReleaseDC(pDCE, FALSE);
}
pDCE->DCXFlags |= DCX_DCEEMPTY;
@ -944,7 +943,7 @@ UserReleaseDC(PWND Window, HDC hDc, BOOL EndPaint)
INT nRet = 0;
BOOL Hit = FALSE;
DPRINT("%p %p\n", Window, hDc);
TRACE("%p %p\n", Window, hDc);
pLE = LEDce.Flink;
dce = CONTAINING_RECORD(pLE, DCE, List);
do
@ -1001,7 +1000,7 @@ NtUserGetDCEx(HWND hWnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
PWND Wnd=NULL;
DECLARE_RETURN(HDC);
DPRINT("Enter NtUserGetDCEx\n");
TRACE("Enter NtUserGetDCEx\n");
UserEnterExclusive();
if (hWnd && !(Wnd = UserGetWindowObject(hWnd)))
@ -1011,7 +1010,7 @@ NtUserGetDCEx(HWND hWnd OPTIONAL, HANDLE ClipRegion, ULONG Flags)
RETURN( UserGetDCEx(Wnd, ClipRegion, Flags));
CLEANUP:
DPRINT("Leave NtUserGetDCEx, ret=%i\n",_ret_);
TRACE("Leave NtUserGetDCEx, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -1037,7 +1036,7 @@ NtUserGetWindowDC(HWND hWnd)
HDC APIENTRY
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);
}

View file

@ -12,8 +12,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserWnd);
#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);
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);
return NULL;
}
@ -316,7 +315,7 @@ static void IntSendDestroyMsg(HWND hWnd)
}
else
{
DPRINT("destroyed itself while in WM_DESTROY!\n");
TRACE("destroyed itself while in WM_DESTROY!\n");
}
#endif
}
@ -371,7 +370,7 @@ static LRESULT co_UserFreeWindow(PWND Window,
if(Window->state2 & WNDS2_INDESTROY)
{
DPRINT("Tried to call IntDestroyWindow() twice\n");
TRACE("Tried to call IntDestroyWindow() twice\n");
return 0;
}
Window->state2 |= WNDS2_INDESTROY;
@ -779,7 +778,7 @@ co_DestroyThreadWindows(struct _ETHREAD *Thread)
Current = WThread->WindowListHead.Flink;
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 */
@ -793,7 +792,7 @@ co_DestroyThreadWindows(struct _ETHREAD *Thread)
UserRefObjectCo(Wnd, &Ref);//faxme: temp hack??
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??
}
@ -1467,13 +1466,13 @@ NtUserBuildHwndList(
Status = PsLookupThreadByThreadId((HANDLE)dwThreadId, &Thread);
if (!NT_SUCCESS(Status))
{
DPRINT1("Thread Id is not valid!\n");
ERR("Thread Id is not valid!\n");
return ERROR_INVALID_PARAMETER;
}
if (!(W32Thread = (PTHREADINFO)Thread->Tcb.Win32Thread))
{
ObDereferenceObject(Thread);
DPRINT1("Thread is not initialized!\n");
ERR("Thread is not initialized!\n");
return ERROR_INVALID_PARAMETER;
}
@ -1498,7 +1497,7 @@ NtUserBuildHwndList(
_SEH2_END
if (!NT_SUCCESS(Status))
{
DPRINT1("Failure to build window list!\n");
ERR("Failure to build window list!\n");
SetLastNtError(Status);
break;
}
@ -1600,7 +1599,7 @@ IntFixWindowCoordinates(CREATESTRUCTW* Cs, PWND ParentWindow, DWORD* dwShowMode)
*/
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;
}
}
@ -1689,7 +1688,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
goto AllocError;
}
DPRINT("Created object with handle %X\n", hWnd);
TRACE("Created object with handle %X\n", hWnd);
if (NULL == pti->rpdesk->DesktopWindow)
{ /*HACK! Helper for win32csr/desktopbg.c */
@ -1795,7 +1794,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
if (!CallProc)
{
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
{
@ -1891,7 +1890,7 @@ PWND FASTCALL IntCreateWindow(CREATESTRUCTW* Cs,
return pWnd;
AllocError:
DPRINT1("IntCreateWindow Allocation Error.\n");
ERR("IntCreateWindow Allocation Error.\n");
if(pWnd)
UserDereferenceObject(pWnd);
@ -1926,7 +1925,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
pti = GetW32ThreadInfo();
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
}
WinSta = pti->rpdesk->rpwinstaParent;
@ -1939,7 +1938,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
Class = IntGetAndReferenceClass(ClassName, Cs->hInstance);
if(!Class)
{
DPRINT1("Failed to find class %wZ\n", ClassName);
ERR("Failed to find class %wZ\n", ClassName);
goto cleanup;
}
@ -1960,7 +1959,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
}
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);
goto cleanup; /* WS_CHILD needs a parent, but WS_POPUP doesn't */
}
@ -1987,7 +1986,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
OwnerWindow);
if(!Window)
{
DPRINT1("IntCreateWindow failed!\n");
ERR("IntCreateWindow failed!\n");
goto cleanup;
}
@ -2006,7 +2005,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
pCbtCreate = ExAllocatePoolWithTag(NonPagedPool, sizeof(CBT_CREATEWNDW), TAG_HOOK);
if (!pCsw || !pCbtCreate)
{
DPRINT1("UserHeapAlloc() failed!\n");
ERR("UserHeapAlloc() failed!\n");
goto cleanup;
}
@ -2024,7 +2023,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
pszClass = UserHeapAlloc(AnsiString.MaximumLength);
if (!pszClass)
{
DPRINT1("UserHeapAlloc() failed!\n");
ERR("UserHeapAlloc() failed!\n");
goto cleanup;
}
RtlZeroMemory(pszClass, AnsiString.MaximumLength);
@ -2038,7 +2037,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
pszClass = UserHeapAlloc(UnicodeString.MaximumLength);
if (!pszClass)
{
DPRINT1("UserHeapAlloc() failed!\n");
ERR("UserHeapAlloc() failed!\n");
goto cleanup;
}
RtlZeroMemory(pszClass, UnicodeString.MaximumLength);
@ -2061,7 +2060,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
pszName = UserHeapAlloc(AnsiString.MaximumLength);
if (!pszName)
{
DPRINT1("UserHeapAlloc() failed!\n");
ERR("UserHeapAlloc() failed!\n");
goto cleanup;
}
RtlZeroMemory(pszName, AnsiString.MaximumLength);
@ -2075,7 +2074,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
pszName = UserHeapAlloc(UnicodeString.MaximumLength);
if (!pszName)
{
DPRINT1("UserHeapAlloc() failed!\n");
ERR("UserHeapAlloc() failed!\n");
goto cleanup;
}
RtlZeroMemory(pszName, UnicodeString.MaximumLength);
@ -2092,7 +2091,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
Result = co_HOOK_CallHooks(WH_CBT, HCBT_CREATEWND, (WPARAM) hWnd, (LPARAM) pCbtCreate);
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;
}
// Write back changes.
@ -2148,7 +2147,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
Result = co_IntSendMessage(UserHMGetHandle(Window), WM_NCCREATE, 0, (LPARAM) Cs);
if (!Result)
{
DPRINT1("co_UserCreateWindowEx(): NCCREATE message failed\n");
ERR("co_UserCreateWindowEx(): NCCREATE message failed\n");
goto cleanup;
}
@ -2166,7 +2165,7 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
Result = co_IntSendMessage(UserHMGetHandle(Window), WM_CREATE, 0, (LPARAM) Cs);
if (Result == (LRESULT)-1)
{
DPRINT1("co_UserCreateWindowEx(): WM_CREATE message failed\n");
ERR("co_UserCreateWindowEx(): WM_CREATE message failed\n");
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;
cleanup:
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 (Window)
co_UserDestroyWindow(Window);
@ -2361,7 +2360,7 @@ NtUserCreateWindowEx(
Status = ProbeAndCaptureLargeString(&lstrWindowName, plstrWindowName);
if (!NT_SUCCESS(Status))
{
DPRINT1("NtUserCreateWindowEx: failed to capture plstrWindowName\n");
ERR("NtUserCreateWindowEx: failed to capture plstrWindowName\n");
SetLastNtError(Status);
return NULL;
}
@ -2382,7 +2381,7 @@ NtUserCreateWindowEx(
Status = ProbeAndCaptureLargeString(&lstrClassName, plstrClassName);
if (!NT_SUCCESS(Status))
{
DPRINT1("NtUserCreateWindowEx: failed to capture plstrClassName\n");
ERR("NtUserCreateWindowEx: failed to capture plstrClassName\n");
/* Set last error, cleanup and return */
SetLastNtError(Status);
goto cleanup;
@ -2419,7 +2418,7 @@ NtUserCreateWindowEx(
if(!pwnd)
{
DPRINT1("co_UserCreateWindowEx failed!\n");
ERR("co_UserCreateWindowEx failed!\n");
}
hwnd = pwnd ? UserHMGetHandle(pwnd) : NULL;
@ -2449,7 +2448,7 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWND Window)
hWnd = Window->head.h;
DPRINT("co_UserDestroyWindow \n");
TRACE("co_UserDestroyWindow \n");
/* Check for owner thread */
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))
{
DPRINT1("Destroy Window WH_CBT Call Hook return!\n");
ERR("Destroy Window WH_CBT Call Hook return!\n");
return FALSE;
}
}
@ -2503,7 +2502,7 @@ BOOLEAN FASTCALL co_UserDestroyWindow(PWND Window)
{
if (ti->pDeskInfo->hShellWindow == hWnd)
{
DPRINT1("Destroying the ShellWindow!\n");
ERR("Destroying the ShellWindow!\n");
ti->pDeskInfo->hShellWindow = NULL;
}
}
@ -2598,7 +2597,7 @@ NtUserDestroyWindow(HWND Wnd)
BOOLEAN ret;
USER_REFERENCE_ENTRY Ref;
DPRINT("Enter NtUserDestroyWindow\n");
TRACE("Enter NtUserDestroyWindow\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(Wnd)))
@ -2613,7 +2612,7 @@ NtUserDestroyWindow(HWND Wnd)
RETURN(ret);
CLEANUP:
DPRINT("Leave NtUserDestroyWindow, ret=%i\n",_ret_);
TRACE("Leave NtUserDestroyWindow, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2714,7 +2713,7 @@ NtUserFindWindowEx(HWND hwndParent,
RTL_ATOM ClassAtom = (RTL_ATOM)0;
DECLARE_RETURN(HWND);
DPRINT("Enter NtUserFindWindowEx\n");
TRACE("Enter NtUserFindWindowEx\n");
UserEnterShared();
if (ucClassName != NULL || ucWindowName != NULL)
@ -2892,7 +2891,7 @@ NtUserFindWindowEx(HWND hwndParent,
RETURN( Ret);
CLEANUP:
DPRINT("Leave NtUserFindWindowEx, ret %i\n",_ret_);
TRACE("Leave NtUserFindWindowEx, ret %i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2977,7 +2976,7 @@ NtUserGetAncestor(HWND hWnd, UINT Type)
PWND Window, Ancestor;
DECLARE_RETURN(HWND);
DPRINT("Enter NtUserGetAncestor\n");
TRACE("Enter NtUserGetAncestor\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)))
@ -2991,7 +2990,7 @@ NtUserGetAncestor(HWND hWnd, UINT Type)
RETURN(Ancestor ? Ancestor->head.h : NULL);
CLEANUP:
DPRINT("Leave NtUserGetAncestor, ret=%i\n",_ret_);
TRACE("Leave NtUserGetAncestor, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -3006,7 +3005,7 @@ NtUserGetComboBoxInfo(
PWND Wnd;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserGetComboBoxInfo\n");
TRACE("Enter NtUserGetComboBoxInfo\n");
UserEnterShared();
if (!(Wnd = UserGetWindowObject(hWnd)))
@ -3033,7 +3032,7 @@ NtUserGetComboBoxInfo(
RETURN( (BOOL) co_IntSendMessage( Wnd->head.h, CB_GETCOMBOBOXINFO, 0, (LPARAM)pcbi));
CLEANUP:
DPRINT("Leave NtUserGetComboBoxInfo, ret=%i\n",_ret_);
TRACE("Leave NtUserGetComboBoxInfo, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -3121,7 +3120,7 @@ NtUserGetListBoxInfo(
PWND Wnd;
DECLARE_RETURN(DWORD);
DPRINT("Enter NtUserGetListBoxInfo\n");
TRACE("Enter NtUserGetListBoxInfo\n");
UserEnterShared();
if (!(Wnd = UserGetWindowObject(hWnd)))
@ -3132,7 +3131,7 @@ NtUserGetListBoxInfo(
RETURN( (DWORD) co_IntSendMessage( Wnd->head.h, LB_GETLISTBOXINFO, 0, 0 ));
CLEANUP:
DPRINT("Leave NtUserGetListBoxInfo, ret=%i\n",_ret_);
TRACE("Leave NtUserGetListBoxInfo, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -3159,7 +3158,7 @@ NtUserSetParent(HWND hWndChild, HWND hWndNewParent)
{
DECLARE_RETURN(HWND);
DPRINT("Enter NtUserSetParent\n");
TRACE("Enter NtUserSetParent\n");
UserEnterExclusive();
/*
@ -3177,7 +3176,7 @@ NtUserSetParent(HWND hWndChild, HWND hWndNewParent)
RETURN( co_UserSetParent(hWndChild, hWndNewParent));
CLEANUP:
DPRINT("Leave NtUserSetParent, ret=%i\n",_ret_);
TRACE("Leave NtUserSetParent, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -3231,7 +3230,7 @@ NtUserSetShellWindowEx(HWND hwndShell, HWND hwndListView)
NTSTATUS Status;
PTHREADINFO ti;
DPRINT("Enter NtUserSetShellWindowEx\n");
TRACE("Enter NtUserSetShellWindowEx\n");
UserEnterExclusive();
if (!(WndShell = UserGetWindowObject(hwndShell)))
@ -3309,7 +3308,7 @@ NtUserSetShellWindowEx(HWND hwndShell, HWND hwndListView)
RETURN( TRUE);
CLEANUP:
DPRINT("Leave NtUserSetShellWindowEx, ret=%i\n",_ret_);
TRACE("Leave NtUserSetShellWindowEx, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -3348,7 +3347,7 @@ NtUserGetSystemMenu(HWND hWnd, BOOL bRevert)
PMENU_OBJECT Menu;
DECLARE_RETURN(HMENU);
DPRINT("Enter NtUserGetSystemMenu\n");
TRACE("Enter NtUserGetSystemMenu\n");
UserEnterShared();
if (!(Window = UserGetWindowObject(hWnd)))
@ -3364,7 +3363,7 @@ NtUserGetSystemMenu(HWND hWnd, BOOL bRevert)
RETURN(Menu->MenuInfo.Self);
CLEANUP:
DPRINT("Leave NtUserGetSystemMenu, ret=%i\n",_ret_);
TRACE("Leave NtUserGetSystemMenu, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -3384,7 +3383,7 @@ NtUserSetSystemMenu(HWND hWnd, HMENU hMenu)
PMENU_OBJECT Menu;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserSetSystemMenu\n");
TRACE("Enter NtUserSetSystemMenu\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)))
@ -3408,7 +3407,7 @@ NtUserSetSystemMenu(HWND hWnd, HMENU hMenu)
RETURN( Result);
CLEANUP:
DPRINT("Leave NtUserSetSystemMenu, ret=%i\n",_ret_);
TRACE("Leave NtUserSetSystemMenu, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -3523,7 +3522,7 @@ co_UserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
break;
default:
DPRINT1("NtUserSetWindowLong(): Unsupported index %d\n", Index);
ERR("NtUserSetWindowLong(): Unsupported index %d\n", Index);
EngSetLastError(ERROR_INVALID_INDEX);
OldValue = 0;
break;
@ -3549,13 +3548,13 @@ NtUserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
{
DECLARE_RETURN(LONG);
DPRINT("Enter NtUserSetWindowLong\n");
TRACE("Enter NtUserSetWindowLong\n");
UserEnterExclusive();
RETURN( co_UserSetWindowLong(hWnd, Index, NewValue, Ansi));
CLEANUP:
DPRINT("Leave NtUserSetWindowLong, ret=%i\n",_ret_);
TRACE("Leave NtUserSetWindowLong, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -3576,7 +3575,7 @@ NtUserSetWindowWord(HWND hWnd, INT Index, WORD NewValue)
WORD OldValue;
DECLARE_RETURN(WORD);
DPRINT("Enter NtUserSetWindowWord\n");
TRACE("Enter NtUserSetWindowWord\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)))
@ -3610,7 +3609,7 @@ NtUserSetWindowWord(HWND hWnd, INT Index, WORD NewValue)
RETURN( OldValue);
CLEANUP:
DPRINT("Leave NtUserSetWindowWord, ret=%i\n",_ret_);
TRACE("Leave NtUserSetWindowWord, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -3628,7 +3627,7 @@ NtUserGetWindowPlacement(HWND hWnd,
NTSTATUS Status;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserGetWindowPlacement\n");
TRACE("Enter NtUserGetWindowPlacement\n");
UserEnterShared();
if (!(Wnd = UserGetWindowObject(hWnd)))
@ -3686,7 +3685,7 @@ NtUserGetWindowPlacement(HWND hWnd,
RETURN( TRUE);
CLEANUP:
DPRINT("Leave NtUserGetWindowPlacement, ret=%i\n",_ret_);
TRACE("Leave NtUserGetWindowPlacement, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -3715,7 +3714,7 @@ NtUserQueryWindow(HWND hWnd, DWORD Index)
DWORD Result;
DECLARE_RETURN(UINT);
DPRINT("Enter NtUserQueryWindow\n");
TRACE("Enter NtUserQueryWindow\n");
UserEnterShared();
if (!(pWnd = UserGetWindowObject(hWnd)))
@ -3756,7 +3755,7 @@ NtUserQueryWindow(HWND hWnd, DWORD Index)
RETURN( Result);
CLEANUP:
DPRINT("Leave NtUserQueryWindow, ret=%i\n",_ret_);
TRACE("Leave NtUserQueryWindow, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -3773,7 +3772,7 @@ NtUserRegisterWindowMessage(PUNICODE_STRING MessageNameUnsafe)
UINT Ret;
DECLARE_RETURN(UINT);
DPRINT("Enter NtUserRegisterWindowMessage\n");
TRACE("Enter NtUserRegisterWindowMessage\n");
UserEnterExclusive();
if(MessageNameUnsafe == NULL)
@ -3795,7 +3794,7 @@ NtUserRegisterWindowMessage(PUNICODE_STRING MessageNameUnsafe)
RETURN( Ret);
CLEANUP:
DPRINT("Leave NtUserRegisterWindowMessage, ret=%i\n",_ret_);
TRACE("Leave NtUserRegisterWindowMessage, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -3814,7 +3813,7 @@ NtUserSetMenu(
BOOL Changed;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserSetMenu\n");
TRACE("Enter NtUserSetMenu\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)))
@ -3841,7 +3840,7 @@ NtUserSetMenu(
RETURN( TRUE);
CLEANUP:
DPRINT("Leave NtUserSetMenu, ret=%i\n",_ret_);
TRACE("Leave NtUserSetMenu, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -3857,7 +3856,7 @@ NtUserSetWindowFNID(HWND hWnd,
PWND Wnd;
DECLARE_RETURN(BOOL);
DPRINT("Enter NtUserSetWindowFNID\n");
TRACE("Enter NtUserSetWindowFNID\n");
UserEnterExclusive();
if (!(Wnd = UserGetWindowObject(hWnd)))
@ -3886,7 +3885,7 @@ NtUserSetWindowFNID(HWND hWnd,
RETURN( TRUE);
CLEANUP:
DPRINT("Leave NtUserSetWindowFNID\n");
TRACE("Leave NtUserSetWindowFNID\n");
UserLeave();
END_CLEANUP;
}
@ -3904,7 +3903,7 @@ NtUserWindowFromPoint(LONG X, LONG Y)
DECLARE_RETURN(HWND);
USER_REFERENCE_ENTRY Ref;
DPRINT("Enter NtUserWindowFromPoint\n");
TRACE("Enter NtUserWindowFromPoint\n");
UserEnterExclusive();
if ((DesktopWindow = UserGetWindowObject(IntGetDesktopWindow())))
@ -3935,7 +3934,7 @@ CLEANUP:
if (Window) UserDereferenceObject(Window);
if (DesktopWindow) UserDerefObjectCo(DesktopWindow);
DPRINT("Leave NtUserWindowFromPoint, ret=%i\n",_ret_);
TRACE("Leave NtUserWindowFromPoint, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
@ -3959,7 +3958,7 @@ NtUserDefSetText(HWND hWnd, PLARGE_STRING WindowText)
UNICODE_STRING UnicodeString;
BOOL Ret = TRUE;
DPRINT("Enter NtUserDefSetText\n");
TRACE("Enter NtUserDefSetText\n");
if (WindowText != NULL)
{
@ -4073,7 +4072,7 @@ NtUserDefSetText(HWND hWnd, PLARGE_STRING WindowText)
Ret = TRUE;
Exit:
if (UnicodeString.Buffer) RtlFreeUnicodeString(&UnicodeString);
DPRINT("Leave NtUserDefSetText, ret=%i\n", Ret);
TRACE("Leave NtUserDefSetText, ret=%i\n", Ret);
UserLeave();
return Ret;
}
@ -4093,7 +4092,7 @@ NtUserInternalGetWindowText(HWND hWnd, LPWSTR lpString, INT nMaxCount)
INT Result;
DECLARE_RETURN(INT);
DPRINT("Enter NtUserInternalGetWindowText\n");
TRACE("Enter NtUserInternalGetWindowText\n");
UserEnterShared();
if(lpString && (nMaxCount <= 1))
@ -4139,7 +4138,7 @@ NtUserInternalGetWindowText(HWND hWnd, LPWSTR lpString, INT nMaxCount)
RETURN( Result);
CLEANUP:
DPRINT("Leave NtUserInternalGetWindowText, ret=%i\n",_ret_);
TRACE("Leave NtUserInternalGetWindowText, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -4273,7 +4272,7 @@ NtUserValidateHandleSecure(
}
else
{ /* Is handle entry restricted? */
UNIMPLEMENTED
STUB
}
return FALSE;
}

View file

@ -29,8 +29,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserWinpos);
VOID FASTCALL
co_IntPaintWindows(PWND Window, ULONG Flags, BOOL Recurse);
@ -202,7 +201,7 @@ co_WinPosArrangeIconicWindows(PWND parent)
xspacing = UserGetSystemMetrics(SM_CXICONSPACING);
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++)
{
@ -239,7 +238,7 @@ co_WinPosArrangeIconicWindows(PWND parent)
static VOID FASTCALL
WinPosFindIconPos(PWND Window, POINT *Pos)
{
DPRINT1("WinPosFindIconPos FIXME!\n");
ERR("WinPosFindIconPos FIXME!\n");
}
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))
{
DPRINT1("WinPosMinMaximize WH_CBT Call Hook return!\n");
ERR("WinPosMinMaximize WH_CBT Call Hook return!\n");
return SWP_NOSIZE | SWP_NOMOVE;
}
if (Wnd->style & WS_MINIMIZE)
@ -339,7 +338,7 @@ co_WinPosMinMaximize(PWND Wnd, UINT ShowFlag, RECT* NewPos)
{
co_WinPosGetMinMaxInfo(Wnd, &Size, &Wnd->InternalPos.MaxPos,
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);
if (Wnd->style & WS_MINIMIZE)
{
@ -1059,7 +1058,7 @@ co_WinPosSetWindowPos(
WvrFlags = co_WinPosDoNCCALCSize(Window, &WinPos, &NewWindowRect, &NewClientRect);
//DPRINT1("co_WinPosDoNCCALCSize");
TRACE("co_WinPosDoNCCALCSize");
/* Relink windows. (also take into account shell window in hwndShellWindow) */
if (!(WinPos.flags & SWP_NOZORDER) && WinPos.hwnd != UserGetShellWindow())
@ -1695,7 +1694,7 @@ IntDeferWindowPos( HDWP hdwp,
int i;
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);
if (flags & ~(SWP_NOSIZE | SWP_NOMOVE |
@ -1777,7 +1776,7 @@ BOOL FASTCALL IntEndDeferWindowPosEx( HDWP hdwp )
BOOL res = TRUE;
int i;
DPRINT("%p\n", hdwp);
TRACE("%p\n", hdwp);
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++)
{
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.cx, winpos->pos.cy, winpos->pos.flags);
@ -1879,10 +1878,10 @@ NtUserEndDeferWindowPosEx(HDWP WinPosInfo,
DWORD Unknown1)
{
BOOL Ret;
DPRINT("Enter NtUserEndDeferWindowPosEx\n");
TRACE("Enter NtUserEndDeferWindowPosEx\n");
UserEnterExclusive();
Ret = IntEndDeferWindowPosEx(WinPosInfo);
DPRINT("Leave NtUserEndDeferWindowPosEx, ret=%i\n", Ret);
TRACE("Leave NtUserEndDeferWindowPosEx, ret=%i\n", Ret);
UserLeave();
return Ret;
}
@ -1906,7 +1905,7 @@ NtUserDeferWindowPos(HDWP WinPosInfo,
SWP_NOCOPYBITS|SWP_HIDEWINDOW|SWP_SHOWWINDOW|SWP_FRAMECHANGED|
SWP_NOACTIVATE|SWP_NOREDRAW|SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE);
DPRINT("Enter NtUserDeferWindowPos\n");
TRACE("Enter NtUserDeferWindowPos\n");
UserEnterExclusive();
if ( Flags & Tmp )
@ -1940,7 +1939,7 @@ NtUserDeferWindowPos(HDWP WinPosInfo,
Ret = IntDeferWindowPos(WinPosInfo, Wnd, WndInsertAfter, x, y, cx, cy, Flags);
Exit:
DPRINT("Leave NtUserDeferWindowPos, ret=%i\n", Ret);
TRACE("Leave NtUserDeferWindowPos, ret=%i\n", Ret);
UserLeave();
return Ret;
}
@ -1980,7 +1979,7 @@ NtUserSetWindowPos(
BOOL ret;
USER_REFERENCE_ENTRY Ref;
DPRINT("Enter NtUserSetWindowPos\n");
TRACE("Enter NtUserSetWindowPos\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)) || // FIXME:
@ -2027,7 +2026,7 @@ NtUserSetWindowPos(
RETURN(ret);
CLEANUP:
DPRINT("Leave NtUserSetWindowPos, ret=%i\n",_ret_);
TRACE("Leave NtUserSetWindowPos, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2047,7 +2046,7 @@ NtUserSetWindowRgn(
BOOLEAN Ret = FALSE;
DECLARE_RETURN(INT);
DPRINT("Enter NtUserSetWindowRgn\n");
TRACE("Enter NtUserSetWindowRgn\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)) || // FIXME:
@ -2095,7 +2094,7 @@ NtUserSetWindowRgn(
RETURN( (INT)Ret);
CLEANUP:
DPRINT("Leave NtUserSetWindowRgn, ret=%i\n",_ret_);
TRACE("Leave NtUserSetWindowRgn, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2112,7 +2111,7 @@ NtUserSetWindowPlacement(HWND hWnd,
DECLARE_RETURN(BOOL);
USER_REFERENCE_ENTRY Ref;
DPRINT("Enter NtUserSetWindowPlacement\n");
TRACE("Enter NtUserSetWindowPlacement\n");
UserEnterExclusive();
if (!(Wnd = UserGetWindowObject(hWnd)) || // FIXME:
@ -2162,7 +2161,7 @@ NtUserSetWindowPlacement(HWND hWnd,
RETURN(TRUE);
CLEANUP:
DPRINT("Leave NtUserSetWindowPlacement, ret=%i\n",_ret_);
TRACE("Leave NtUserSetWindowPlacement, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2174,7 +2173,7 @@ BOOL APIENTRY
NtUserShowWindowAsync(HWND hWnd, LONG nCmdShow)
{
#if 0
UNIMPLEMENTED
STUB
return 0;
#else
return NtUserShowWindow(hWnd, nCmdShow);
@ -2192,7 +2191,7 @@ NtUserShowWindow(HWND hWnd, LONG nCmdShow)
DECLARE_RETURN(BOOL);
USER_REFERENCE_ENTRY Ref;
DPRINT("Enter NtUserShowWindow\n");
TRACE("Enter NtUserShowWindow\n");
UserEnterExclusive();
if (!(Window = UserGetWindowObject(hWnd)) || // FIXME:
@ -2215,7 +2214,7 @@ NtUserShowWindow(HWND hWnd, LONG nCmdShow)
RETURN(ret);
CLEANUP:
DPRINT("Leave NtUserShowWindow, ret=%i\n",_ret_);
TRACE("Leave NtUserShowWindow, ret=%i\n",_ret_);
UserLeave();
END_CLEANUP;
}
@ -2235,7 +2234,7 @@ NtUserGetMinMaxInfo(
BOOL ret;
USER_REFERENCE_ENTRY Ref;
DPRINT("Enter NtUserGetMinMaxInfo\n");
TRACE("Enter NtUserGetMinMaxInfo\n");
UserEnterExclusive();
if(!(Window = UserGetWindowObject(hWnd)))
@ -2267,7 +2266,7 @@ NtUserGetMinMaxInfo(
cleanup:
if (Window) UserDerefObjectCo(Window);
DPRINT("Leave NtUserGetMinMaxInfo, ret=%i\n", ret);
TRACE("Leave NtUserGetMinMaxInfo, ret=%i\n", ret);
UserLeave();
return ret;
}

View file

@ -35,8 +35,7 @@
#include <win32k.h>
#define NDEBUG
#include <debug.h>
DBG_DEFAULT_CHANNEL(UserWinsta);
/* GLOBALS *******************************************************************/
@ -80,7 +79,7 @@ InitWindowStationImpl(VOID)
&ObjectAttributes);
if (!NT_SUCCESS(Status))
{
DPRINT("Could not create \\Windows\\WindowStations directory "
TRACE("Could not create \\Windows\\WindowStations directory "
"(Status 0x%X)\n", Status);
return Status;
}
@ -117,7 +116,7 @@ IntWinStaObjectDelete(PWIN32_DELETEMETHOD_PARAMETERS Parameters)
{
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);
@ -278,7 +277,7 @@ IntValidateWindowStationHandle(
if (WindowStation == NULL)
{
// DPRINT1("Invalid window station handle\n");
// ERR("Invalid window station handle\n");
EngSetLastError(ERROR_INVALID_HANDLE);
return STATUS_INVALID_HANDLE;
}
@ -454,7 +453,7 @@ NtUserCreateWindowStation(
if (! NT_SUCCESS(Status))
{
DPRINT1("Failed reading capturing window station name\n");
ERR("Failed reading capturing window station name\n");
SetLastNtError(Status);
return NULL;
}
@ -507,7 +506,7 @@ NtUserCreateWindowStation(
if (!IntSetupClipboard(WindowStationObject))
{
DPRINT1("WindowStation: Error Setting up the clipboard!!!\n");
ERR("WindowStation: Error Setting up the clipboard!!!\n");
}
if (InputWindowStation == NULL)
@ -599,7 +598,7 @@ NtUserCloseWindowStation(
PWINSTATION_OBJECT Object;
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())
{
@ -614,13 +613,13 @@ NtUserCloseWindowStation(
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;
}
ObDereferenceObject(Object);
DPRINT("Closing window station handle (0x%X)\n", hWinSta);
TRACE("Closing window station handle (0x%X)\n", hWinSta);
Status = ObCloseHandle(hWinSta, UserMode);
if (!NT_SUCCESS(Status))
@ -687,7 +686,7 @@ NtUserGetObjectInformation(
DWORD nDataSize = 0;
/* try windowstation */
DPRINT("Trying to open window station 0x%x\n", hObject);
TRACE("Trying to open window station 0x%x\n", hObject);
Status = IntValidateWindowStationHandle(
hObject,
UserMode,/*ExGetPreviousMode(),*/
@ -697,7 +696,7 @@ NtUserGetObjectInformation(
if (!NT_SUCCESS(Status) && Status != STATUS_OBJECT_TYPE_MISMATCH)
{
DPRINT("Failed: 0x%x\n", Status);
TRACE("Failed: 0x%x\n", Status);
SetLastNtError(Status);
return FALSE;
}
@ -705,7 +704,7 @@ NtUserGetObjectInformation(
if (Status == STATUS_OBJECT_TYPE_MISMATCH)
{
/* try desktop */
DPRINT("Trying to open desktop 0x%x\n", hObject);
TRACE("Trying to open desktop 0x%x\n", hObject);
Status = IntValidateDesktopHandle(
hObject,
UserMode,/*ExGetPreviousMode(),*/
@ -713,19 +712,19 @@ NtUserGetObjectInformation(
&DesktopObject);
if (!NT_SUCCESS(Status))
{
DPRINT("Failed: 0x%x\n", Status);
TRACE("Failed: 0x%x\n", Status);
SetLastNtError(Status);
return FALSE;
}
}
DPRINT("WinSta or Desktop opened!!\n");
TRACE("WinSta or Desktop opened!!\n");
/* get data */
switch (nIndex)
{
case UOI_FLAGS:
Status = STATUS_NOT_IMPLEMENTED;
DPRINT1("UOI_FLAGS unimplemented!\n");
ERR("UOI_FLAGS unimplemented!\n");
break;
case UOI_NAME:
@ -764,7 +763,7 @@ NtUserGetObjectInformation(
case UOI_USER_SID:
Status = STATUS_NOT_IMPLEMENTED;
DPRINT1("UOI_USER_SID unimplemented!\n");
ERR("UOI_USER_SID unimplemented!\n");
break;
default:
@ -775,7 +774,7 @@ NtUserGetObjectInformation(
/* try to copy data to caller */
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;
if (nLength >= nDataSize)
Status = MmCopyToCaller(pvInformation, pvData, nDataSize);
@ -853,7 +852,7 @@ UserGetProcessWindowStation(VOID)
}
else
{
DPRINT1("Should use ObFindHandleForObject\n");
ERR("Should use ObFindHandleForObject\n");
pti = PsGetCurrentThreadWin32Thread();
Status = ObOpenObjectByPointer(pti->rpdesk->rpwinstaParent,
0,
@ -865,7 +864,7 @@ UserGetProcessWindowStation(VOID)
if (! NT_SUCCESS(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);
return NULL;
}
@ -950,7 +949,7 @@ UserSetProcessWindowStation(HWINSTA hWindowStation)
&NewWinSta);
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);
SetLastNtError(Status);
return FALSE;
@ -1029,12 +1028,12 @@ NtUserLockWindowStation(HWINSTA hWindowStation)
PWINSTATION_OBJECT Object;
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);
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);
return FALSE;
}
@ -1046,7 +1045,7 @@ NtUserLockWindowStation(HWINSTA hWindowStation)
&Object);
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);
SetLastNtError(Status);
return FALSE;
@ -1074,12 +1073,12 @@ NtUserUnlockWindowStation(HWINSTA hWindowStation)
NTSTATUS Status;
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);
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);
return FALSE;
}
@ -1091,7 +1090,7 @@ NtUserUnlockWindowStation(HWINSTA hWindowStation)
&Object);
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);
SetLastNtError(Status);
return FALSE;
@ -1199,7 +1198,7 @@ BuildWindowStationNameList(
ReturnLength += DirEntry->Name.Length + sizeof(WCHAR);
EntryCount++;
}
DPRINT("Required size: %d Entry count: %d\n", ReturnLength, EntryCount);
TRACE("Required size: %d Entry count: %d\n", ReturnLength, EntryCount);
if (NULL != pRequiredSize)
{
Status = MmCopyToCaller(pRequiredSize, &ReturnLength, sizeof(ULONG));
@ -1316,7 +1315,7 @@ BuildDesktopNameList(
ReturnLength += ((PUNICODE_STRING)GET_DESKTOP_NAME(DesktopObject))->Length + sizeof(WCHAR);
EntryCount++;
}
DPRINT("Required size: %d Entry count: %d\n", ReturnLength, EntryCount);
TRACE("Required size: %d Entry count: %d\n", ReturnLength, EntryCount);
if (NULL != pRequiredSize)
{
Status = MmCopyToCaller(pRequiredSize, &ReturnLength, sizeof(ULONG));

View file

@ -55,13 +55,16 @@ DBG_CHANNEL DbgChannels[DbgChCount]={
{L"GdiText", DbgChGdiText},
{L"GdiXFormObj", DbgChGdiXFormObj},
{L"UserAccel", DbgChUserAccel},
{L"UserCalproc", DbgChUserCalproc},
{L"UserCallback", DbgChUserCallback},
{L"UserCallProc", DbgChUserCallProc},
{L"UserCaret", DbgChUserCaret},
{L"UserClass", DbgChUserClass},
{L"UserClipbrd", DbgChUserClipbrd},
{L"UserCsr", DbgChUserCsr},
{L"UserDce", DbgChUserDce},
{L"UserDefwnd", DbgChUserDefwnd},
{L"UserDesktop", DbgChUserDesktop},
{L"UserDisplay",DbgChUserDisplay},
{L"UserEvent", DbgChUserEvent},
{L"UserFocus", DbgChUserFocus},
{L"UserHook", DbgChUserHook},
@ -72,20 +75,21 @@ DBG_CHANNEL DbgChannels[DbgChCount]={
{L"UserKbdLayout", DbgChUserKbdLayout},
{L"UserMenu", DbgChUserMenu},
{L"UserMetric", DbgChUserMetric},
{L"UserMisc", DbgChUserMisc},
{L"UserMonitor", DbgChUserMonitor},
{L"UserMsgGet", DbgChUserMsgGet},
{L"UserMsg", DbgChUserMsg},
{L"UserMsgQ", DbgChUserMsgQ},
{L"UserMsgSend", DbgChUserMsgSend},
{L"UserObj", DbgChUserObj},
{L"UserPainting", DbgChUserPainting},
{L"UserProcess", DbgChUserProcess},
{L"UserProp", DbgChUserProp},
{L"UserScrollbar", DbgChUserScrollbar},
{L"UserSysparam", DbgChUserSysparam},
{L"UserSysparams", DbgChUserSysparams},
{L"UserTimer", DbgChUserTimer},
{L"UserThread", DbgChUserThread},
{L"UserWinpos", DbgChUserWinpos},
{L"UserWinsta", DbgChUserWinsta},
{L"UserWnd", DbgChUserWnd},
{L"UserWndpos", DbgChUserWndpos}
{L"UserWnd", DbgChUserWnd}
};
#ifdef GDI_DEBUG
@ -590,8 +594,6 @@ DbgAddDebugChannel(PPROCESSINFO ppi, WCHAR* channel, WCHAR* level, WCHAR op)
DBG_CHANNEL *ChannelEntry;
UINT iLevel, iChannel;
DbgPrint("Found channel %S,level %S, operation %C\n", channel, level, op);
ChannelEntry = (DBG_CHANNEL*)bsearch(channel,
DbgChannels,
DbgChCount,
@ -599,7 +601,6 @@ DbgAddDebugChannel(PPROCESSINFO ppi, WCHAR* channel, WCHAR* level, WCHAR op)
DbgCompareChannels);
if(ChannelEntry == NULL)
{
DbgPrint("Failed to find channel %S\n", channel);
return FALSE;
}