From e0a28080e2488478e369ea894468cfcf11aa075b Mon Sep 17 00:00:00 2001 From: Andrew Riedi Date: Wed, 12 Dec 2007 21:49:17 -0800 Subject: [PATCH] user32: DPRINTF -> TRACE. --- dlls/user32/hook.c | 28 ++++++++++++++-------------- dlls/user32/message.c | 32 ++++++++++++++------------------ dlls/user32/nonclient.c | 4 ++-- dlls/user32/winproc.c | 24 ++++++++++++------------ 4 files changed, 42 insertions(+), 46 deletions(-) diff --git a/dlls/user32/hook.c b/dlls/user32/hook.c index ed010a8..c2c3618 100644 --- a/dlls/user32/hook.c +++ b/dlls/user32/hook.c @@ -293,17 +293,17 @@ static LRESULT call_hook_proc( HOOKPROC proc, INT id, INT code, WPARAM wparam, L { LRESULT ret; - if (TRACE_ON(relay)) - DPRINTF( "%04x:Call hook proc %p (id=%s,code=%x,wp=%08lx,lp=%08lx)\n", - GetCurrentThreadId(), proc, hook_names[id-WH_MINHOOK], code, wparam, lparam ); + TRACE_(relay)( "%04x:Call hook proc %p (id=%s,code=%x,wp=%08lx,lp=%08lx)\n", + GetCurrentThreadId(), proc, hook_names[id-WH_MINHOOK], code, + wparam, lparam ); if (!prev_unicode == !next_unicode) ret = proc( code, wparam, lparam ); else if (prev_unicode) ret = call_hook_WtoA( proc, id, code, wparam, lparam ); else ret = call_hook_AtoW( proc, id, code, wparam, lparam ); - if (TRACE_ON(relay)) - DPRINTF( "%04x:Ret hook proc %p (id=%s,code=%x,wp=%08lx,lp=%08lx) retval=%08lx\n", - GetCurrentThreadId(), proc, hook_names[id-WH_MINHOOK], code, wparam, lparam, ret ); + TRACE_(relay)( "%04x:Ret hook proc %p (id=%s,code=%x,wp=%08lx,lp=%08lx) retval=%08lx\n", + GetCurrentThreadId(), proc, hook_names[id-WH_MINHOOK], code, + wparam, lparam, ret ); return ret; } @@ -851,18 +851,18 @@ void WINAPI NotifyWinEvent(DWORD event, HWND hwnd, LONG object_id, LONG child_id if (!info.module[0] || (info.proc = get_hook_proc( info.proc, info.module )) != NULL) { - if (TRACE_ON(relay)) - DPRINTF( "%04x:Call winevent hook proc %p (hhook=%p,event=%x,hwnd=%p,object_id=%x,child_id=%x,tid=%04x,time=%x)\n", - GetCurrentThreadId(), info.proc, info.handle, event, hwnd, object_id, - child_id, GetCurrentThreadId(), GetCurrentTime()); + TRACE_(relay)( "%04x:Call winevent hook proc %p (hhook=%p,event=%x,hwnd=%p,object_id=%x,child_id=%x,tid=%04x,time=%x)\n", + GetCurrentThreadId(), info.proc, info.handle, + event, hwnd, object_id, child_id, + GetCurrentThreadId(), GetCurrentTime()); info.proc(info.handle, event, hwnd, object_id, child_id, GetCurrentThreadId(), GetCurrentTime()); - if (TRACE_ON(relay)) - DPRINTF( "%04x:Ret winevent hook proc %p (hhook=%p,event=%x,hwnd=%p,object_id=%x,child_id=%x,tid=%04x,time=%x)\n", - GetCurrentThreadId(), info.proc, info.handle, event, hwnd, object_id, - child_id, GetCurrentThreadId(), GetCurrentTime()); + TRACE_(relay)( "%04x:Ret winevent hook proc %p (hhook=%p,event=%x,hwnd=%p,object_id=%x,child_id=%x,tid=%04x,time=%x)\n", + GetCurrentThreadId(), info.proc, info.handle, + event, hwnd, object_id, child_id, + GetCurrentThreadId(), GetCurrentTime()); } } else diff --git a/dlls/user32/message.c b/dlls/user32/message.c index d3f4a3a..34d7270 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -1974,15 +1974,13 @@ static inline void call_sendmsg_callback( SENDASYNCPROC callback, HWND hwnd, UIN { if (!callback) return; - if (TRACE_ON(relay)) - DPRINTF( "%04x:Call message callback %p (hwnd=%p,msg=%s,data=%08lx,result=%08lx)\n", - GetCurrentThreadId(), callback, hwnd, SPY_GetMsgName( msg, hwnd ), - data, result ); + TRACE_(relay)( "%04x:Call message callback %p (hwnd=%p,msg=%s,data=%08lx,result=%08lx)\n", + GetCurrentThreadId(), callback, hwnd, + SPY_GetMsgName( msg, hwnd ), data, result ); callback( hwnd, msg, data, result ); - if (TRACE_ON(relay)) - DPRINTF( "%04x:Ret message callback %p (hwnd=%p,msg=%s,data=%08lx,result=%08lx)\n", - GetCurrentThreadId(), callback, hwnd, SPY_GetMsgName( msg, hwnd ), - data, result ); + TRACE_(relay)( "%04x:Ret message callback %p (hwnd=%p,msg=%s,data=%08lx,result=%08lx)\n", + GetCurrentThreadId(), callback, hwnd, + SPY_GetMsgName( msg, hwnd ), data, result ); } @@ -2117,20 +2115,18 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags } } - if (TRACE_ON(relay)) - DPRINTF( "%04x:Call winevent proc %p (hook=%p,event=%x,hwnd=%p,object_id=%lx,child_id=%lx,tid=%04x,time=%x)\n", - GetCurrentThreadId(), hook_proc, - data->hook, info.msg.message, info.msg.hwnd, info.msg.wParam, - info.msg.lParam, data->tid, info.msg.time); + TRACE_(relay)( "%04x:Call winevent proc %p (hook=%p,event=%x,hwnd=%p,object_id=%lx,child_id=%lx,tid=%04x,time=%x)\n", + GetCurrentThreadId(), hook_proc, data->hook, + info.msg.message, info.msg.hwnd, info.msg.wParam, + info.msg.lParam, data->tid, info.msg.time); hook_proc( data->hook, info.msg.message, info.msg.hwnd, info.msg.wParam, info.msg.lParam, data->tid, info.msg.time ); - if (TRACE_ON(relay)) - DPRINTF( "%04x:Ret winevent proc %p (hook=%p,event=%x,hwnd=%p,object_id=%lx,child_id=%lx,tid=%04x,time=%x)\n", - GetCurrentThreadId(), hook_proc, - data->hook, info.msg.message, info.msg.hwnd, info.msg.wParam, - info.msg.lParam, data->tid, info.msg.time); + TRACE_(relay)( "%04x:Ret winevent proc %p (hook=%p,event=%x,hwnd=%p,object_id=%lx,child_id=%lx,tid=%04x,time=%x)\n", + GetCurrentThreadId(), hook_proc, data->hook, + info.msg.message, info.msg.hwnd, info.msg.wParam, + info.msg.lParam, data->tid, info.msg.time); } goto next; case MSG_OTHER_PROCESS: diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c index 45ac8cf..42e69d1 100644 --- a/dlls/user32/nonclient.c +++ b/dlls/user32/nonclient.c @@ -1610,8 +1610,8 @@ LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam ) } } else - if (wParam == SC_PUTMARK) - DPRINTF("Debug mark requested by user\n"); + if (wParam == SC_PUTMARK) + TRACE("Debug mark requested by user.\n"); break; case SC_HOTKEY: diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 32b9cb1..0bcd6aa 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -450,15 +450,15 @@ static LRESULT call_window_proc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, LRES USER_CheckNotLock(); hwnd = WIN_GetFullHandle( hwnd ); - if (TRACE_ON(relay)) - DPRINTF( "%04x:Call window proc %p (hwnd=%p,msg=%s,wp=%08lx,lp=%08lx)\n", - GetCurrentThreadId(), proc, hwnd, SPY_GetMsgName(msg, hwnd), wp, lp ); + TRACE_(relay)( "%04x:Call window proc %p (hwnd=%p,msg=%s,wp=%08lx,lp=%08lx)\n", + GetCurrentThreadId(), proc, hwnd, SPY_GetMsgName(msg, hwnd), + wp, lp ); *result = WINPROC_wrapper( proc, hwnd, msg, wp, lp ); - if (TRACE_ON(relay)) - DPRINTF( "%04x:Ret window proc %p (hwnd=%p,msg=%s,wp=%08lx,lp=%08lx) retval=%08lx\n", - GetCurrentThreadId(), proc, hwnd, SPY_GetMsgName(msg, hwnd), wp, lp, *result ); + TRACE_(relay)( "%04x:Ret window proc %p (hwnd=%p,msg=%s,wp=%08lx,lp=%08lx) retval=%08lx\n", + GetCurrentThreadId(), proc, hwnd, SPY_GetMsgName(msg, hwnd), + wp, lp, *result ); return *result; } @@ -471,16 +471,16 @@ static LRESULT call_dialog_proc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, LRES USER_CheckNotLock(); hwnd = WIN_GetFullHandle( hwnd ); - if (TRACE_ON(relay)) - DPRINTF( "%04x:Call dialog proc %p (hwnd=%p,msg=%s,wp=%08lx,lp=%08lx)\n", - GetCurrentThreadId(), proc, hwnd, SPY_GetMsgName(msg, hwnd), wp, lp ); + TRACE_(relay)( "%04x:Call dialog proc %p (hwnd=%p,msg=%s,wp=%08lx,lp=%08lx)\n", + GetCurrentThreadId(), proc, hwnd, SPY_GetMsgName(msg, hwnd), + wp, lp ); ret = WINPROC_wrapper( proc, hwnd, msg, wp, lp ); *result = GetWindowLongPtrW( hwnd, DWLP_MSGRESULT ); - if (TRACE_ON(relay)) - DPRINTF( "%04x:Ret dialog proc %p (hwnd=%p,msg=%s,wp=%08lx,lp=%08lx) retval=%08lx result=%08lx\n", - GetCurrentThreadId(), proc, hwnd, SPY_GetMsgName(msg, hwnd), wp, lp, ret, *result ); + TRACE_(relay)( "%04x:Ret dialog proc %p (hwnd=%p,msg=%s,wp=%08lx,lp=%08lx) retval=%08lx result=%08lx\n", + GetCurrentThreadId(), proc, hwnd, SPY_GetMsgName(msg, hwnd), + wp, lp, ret, *result ); return ret; } -- 1.4.4.2