user32: Replace spy functions by a simple trace in 16-bit code.
This commit is contained in:
parent
a0f9da117a
commit
b63d0e19ed
|
@ -35,6 +35,7 @@
|
|||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msg);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(message);
|
||||
|
||||
DWORD USER16_AlertableWait = 0;
|
||||
|
||||
|
@ -1498,9 +1499,10 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd16, UINT16 msg, WPARAM16 wparam, LPARAM
|
|||
|
||||
if (!(winproc = (WNDPROC16)GetWindowLong16( hwnd16, GWLP_WNDPROC ))) return 0;
|
||||
|
||||
SPY_EnterMessage( SPY_SENDMESSAGE16, hwnd, msg, wparam, lparam );
|
||||
TRACE_(message)("(0x%04x) [%04x] wp=%04x lp=%08lx\n", hwnd16, msg, wparam, lparam );
|
||||
result = CallWindowProc16( winproc, hwnd16, msg, wparam, lparam );
|
||||
SPY_ExitMessage( SPY_RESULT_OK16, hwnd, msg, result, wparam, lparam );
|
||||
TRACE_(message)("(0x%04x) [%04x] wp=%04x lp=%08lx returned %08lx\n",
|
||||
hwnd16, msg, wparam, lparam, result );
|
||||
}
|
||||
else /* map to 32-bit unicode for inter-thread/process message */
|
||||
{
|
||||
|
@ -1779,8 +1781,7 @@ BOOL16 WINAPI TranslateMessage16( const MSG16 *msg )
|
|||
LONG WINAPI DispatchMessage16( const MSG16* msg )
|
||||
{
|
||||
WNDPROC16 winproc;
|
||||
LONG retval;
|
||||
HWND hwnd = WIN_Handle32( msg->hwnd );
|
||||
LRESULT retval;
|
||||
|
||||
/* Process timer messages */
|
||||
if ((msg->message == WM_TIMER) || (msg->message == WM_SYSTIMER))
|
||||
|
@ -1795,10 +1796,10 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
|
|||
SetLastError( ERROR_INVALID_WINDOW_HANDLE );
|
||||
return 0;
|
||||
}
|
||||
SPY_EnterMessage( SPY_DISPATCHMESSAGE16, hwnd, msg->message, msg->wParam, msg->lParam );
|
||||
TRACE_(message)("(0x%04x) [%04x] wp=%04x lp=%08lx\n", msg->hwnd, msg->message, msg->wParam, msg->lParam );
|
||||
retval = CallWindowProc16( winproc, msg->hwnd, msg->message, msg->wParam, msg->lParam );
|
||||
SPY_ExitMessage( SPY_RESULT_OK16, hwnd, msg->message, retval, msg->wParam, msg->lParam );
|
||||
|
||||
TRACE_(message)("(0x%04x) [%04x] wp=%04x lp=%08lx returned %08lx\n",
|
||||
msg->hwnd, msg->message, msg->wParam, msg->lParam, retval );
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
#include "winreg.h"
|
||||
#include "wownt32.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "win.h"
|
||||
#include "user_private.h"
|
||||
|
@ -1993,8 +1992,8 @@ static const SPY_NOTIFY *end_spnfy_array; /* ptr to last good entry in array
|
|||
#undef SPNFY
|
||||
|
||||
|
||||
static BOOL16 SPY_Exclude[SPY_MAX_MSGNUM+1];
|
||||
static BOOL16 SPY_ExcludeDWP = 0;
|
||||
static unsigned char SPY_Exclude[SPY_MAX_MSGNUM+1];
|
||||
static unsigned char SPY_ExcludeDWP = 0;
|
||||
|
||||
#define SPY_EXCLUDE(msg) \
|
||||
(SPY_Exclude[(msg) > SPY_MAX_MSGNUM ? SPY_MAX_MSGNUM : (msg)])
|
||||
|
@ -2574,19 +2573,12 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
|
|||
/* each SPY_SENDMESSAGE must be complemented by call to SPY_ExitMessage */
|
||||
switch(iFlag)
|
||||
{
|
||||
case SPY_DISPATCHMESSAGE16:
|
||||
TRACE("%*s(%04x) %-16s [%04x] %s dispatched wp=%04lx lp=%08lx\n",
|
||||
indent, "", HWND_16(hWnd),
|
||||
debugstr_w(sp_e.wnd_name), msg, sp_e.msg_name, wParam, lParam);
|
||||
break;
|
||||
|
||||
case SPY_DISPATCHMESSAGE:
|
||||
TRACE("%*s(%p) %-16s [%04x] %s dispatched wp=%08lx lp=%08lx\n",
|
||||
indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
|
||||
sp_e.msg_name, wParam, lParam);
|
||||
break;
|
||||
|
||||
case SPY_SENDMESSAGE16:
|
||||
case SPY_SENDMESSAGE:
|
||||
{
|
||||
char taskName[20];
|
||||
|
@ -2595,16 +2587,10 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
|
|||
if (tid == GetCurrentThreadId()) strcpy( taskName, "self" );
|
||||
else sprintf( taskName, "tid %04x", GetCurrentThreadId() );
|
||||
|
||||
if (iFlag == SPY_SENDMESSAGE16)
|
||||
TRACE("%*s(%04x) %-16s [%04x] %s sent from %s wp=%04lx lp=%08lx\n",
|
||||
indent, "", HWND_16(hWnd), debugstr_w(sp_e.wnd_name), msg,
|
||||
sp_e.msg_name, taskName, wParam, lParam );
|
||||
else
|
||||
{ TRACE("%*s(%p) %-16s [%04x] %s sent from %s wp=%08lx lp=%08lx\n",
|
||||
indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
|
||||
sp_e.msg_name, taskName, wParam, lParam );
|
||||
SPY_DumpStructure(&sp_e, TRUE);
|
||||
}
|
||||
TRACE("%*s(%p) %-16s [%04x] %s sent from %s wp=%08lx lp=%08lx\n",
|
||||
indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
|
||||
sp_e.msg_name, taskName, wParam, lParam );
|
||||
SPY_DumpStructure(&sp_e, TRUE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2653,12 +2639,6 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
|
|||
indent, "", hWnd, msg, sp_e.msg_name, lReturn );
|
||||
break;
|
||||
|
||||
case SPY_RESULT_OK16:
|
||||
TRACE(" %*s(%04x) %-16s [%04x] %s returned %08lx\n",
|
||||
indent, "", HWND_16(hWnd), debugstr_w(sp_e.wnd_name), msg,
|
||||
sp_e.msg_name, lReturn );
|
||||
break;
|
||||
|
||||
case SPY_RESULT_OK:
|
||||
TRACE(" %*s(%p) %-16s [%04x] %s returned %08lx\n",
|
||||
indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
|
||||
|
|
|
@ -255,13 +255,10 @@ extern BOOL WINPROC_call_window( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
|
|||
|
||||
/* message spy definitions */
|
||||
|
||||
#define SPY_DISPATCHMESSAGE16 0x0100
|
||||
#define SPY_DISPATCHMESSAGE 0x0101
|
||||
#define SPY_SENDMESSAGE16 0x0102
|
||||
#define SPY_SENDMESSAGE 0x0103
|
||||
#define SPY_DEFWNDPROC 0x0104
|
||||
#define SPY_DISPATCHMESSAGE 0x0100
|
||||
#define SPY_SENDMESSAGE 0x0101
|
||||
#define SPY_DEFWNDPROC 0x0102
|
||||
|
||||
#define SPY_RESULT_OK16 0x0000
|
||||
#define SPY_RESULT_OK 0x0001
|
||||
#define SPY_RESULT_DEFWND 0x0002
|
||||
|
||||
|
|
Loading…
Reference in New Issue