ReactOS 0.4.15-dev-7693-gd0e2924
spy.c File Reference
#include <user32.h>
#include <wine/commctrl.h>
#include <commdlg.h>
#include <richedit.h>
#include <prsht.h>
Include dependency graph for spy.c:

Go to the source code of this file.

Classes

struct  USER_MSG
 
struct  CONTROL_CLASS
 
struct  SPY_NOTIFY
 
struct  SPY_INSTANCE
 

Macros

#define SPY_MAX_MSGNUM   WM_USER
 
#define SPY_INDENT_UNIT   4 /* 4 spaces */
 
#define ARRAYSIZE(a)   ((sizeof(a) / sizeof((a)[0])))
 
#define DEBUG_SPY   0
 
#define SPY_MAX_LVMMSGNUM   182
 
#define SPY_MAX_TVMSGNUM   65
 
#define SPY_MAX_HDMMSGNUM   19
 
#define SPY_MAX_TCMMSGNUM   62
 
#define SPY_MAX_PGMMSGNUM   13
 
#define SPY_MAX_CCMMSGNUM   9
 
#define SPY_MAX_WINEMSGNUM   9
 
#define SPY_MAX_VKKEYSNUM   255
 
#define USM(a, b)   { #a ,a,b}
 
#define SZOF(a)   sizeof(a)
 
#define RB_GETBANDINFO_OLD   (WM_USER+5) /* obsoleted after IE3, but we have to support it anyway */
 
#define SPNFY(a, b)   { #a ,a,sizeof(b)-sizeof(NMHDR)}
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (message)
 
static BOOL exclude_msg (UINT msg)
 
static BOOL exclude_dwp (void)
 
static INT_PTR get_indent_level (void)
 
static void set_indent_level (INT_PTR level)
 
static const charSPY_GetMsgInternal (UINT msg)
 
static const USER_MSGSPY_Bsearch_Msg (const USER_MSG *msgs, UINT count, UINT code)
 
const charSPY_GetClassLongOffsetName (INT offset)
 
static void SPY_GetClassName (SPY_INSTANCE *sp_e)
 
static void SPY_GetMsgStuff (SPY_INSTANCE *sp_e)
 
static void SPY_GetWndName (SPY_INSTANCE *sp_e)
 
const charSPY_GetMsgName (UINT msg, HWND hWnd)
 
const charSPY_GetVKeyName (WPARAM wParam)
 
static const SPY_NOTIFYSPY_Bsearch_Notify (UINT code)
 
static void SPY_DumpMem (LPCSTR header, const UINT *q, INT len)
 
static void SPY_DumpStructure (const SPY_INSTANCE *sp_e, BOOL enter)
 
static BOOL spy_init (void)
 
void SPY_EnterMessage (INT iFlag, HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
void SPY_ExitMessage (INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn, WPARAM wParam, LPARAM lParam)
 

Variables

static const char *const ClassLongOffsetNames []
 
static const char *const MessageTypeNames [SPY_MAX_MSGNUM+1]
 
static const char *const LVMMessageTypeNames [SPY_MAX_LVMMSGNUM+1]
 
static const char *const TVMessageTypeNames [SPY_MAX_TVMSGNUM+1]
 
static const char *const HDMMessageTypeNames [SPY_MAX_HDMMSGNUM+1]
 
static const char *const TCMMessageTypeNames [SPY_MAX_TCMMSGNUM+1]
 
static const char *const PGMMessageTypeNames [SPY_MAX_PGMMSGNUM+1]
 
static const char *const CCMMessageTypeNames [SPY_MAX_CCMMSGNUM+1]
 
static const char *const WINEMessageTypeNames [SPY_MAX_WINEMSGNUM+1]
 
static const char *const VK_KeyNames [SPY_MAX_VKKEYSNUM+1]
 
static const USER_MSG rebar_array []
 
static const USER_MSG toolbar_array []
 
static const USER_MSG tooltips_array []
 
static const USER_MSG comboex_array []
 
static const USER_MSG propsht_array []
 
static const WCHAR PropSheetInfoStr []
 
static const USER_MSG updown_array []
 
static const USER_MSG richedit_array []
 
static const CONTROL_CLASS cc_array []
 
static const SPY_NOTIFY spnfy_array []
 
static unsigned charspy_exclude
 
static int indent_tls_index = TLS_OUT_OF_INDEXES
 

Macro Definition Documentation

◆ ARRAYSIZE

#define ARRAYSIZE (   a)    ((sizeof(a) / sizeof((a)[0])))

Definition at line 34 of file spy.c.

◆ DEBUG_SPY

#define DEBUG_SPY   0

Definition at line 36 of file spy.c.

◆ RB_GETBANDINFO_OLD

#define RB_GETBANDINFO_OLD   (WM_USER+5) /* obsoleted after IE3, but we have to support it anyway */

Definition at line 1430 of file spy.c.

◆ SPNFY

#define SPNFY (   a,
  b 
)    { #a ,a,sizeof(b)-sizeof(NMHDR)}

Definition at line 1775 of file spy.c.

◆ SPY_INDENT_UNIT

#define SPY_INDENT_UNIT   4 /* 4 spaces */

Definition at line 32 of file spy.c.

◆ SPY_MAX_CCMMSGNUM

#define SPY_MAX_CCMMSGNUM   9

Definition at line 1108 of file spy.c.

◆ SPY_MAX_HDMMSGNUM

#define SPY_MAX_HDMMSGNUM   19

Definition at line 994 of file spy.c.

◆ SPY_MAX_LVMMSGNUM

#define SPY_MAX_LVMMSGNUM   182

Definition at line 733 of file spy.c.

◆ SPY_MAX_MSGNUM

#define SPY_MAX_MSGNUM   WM_USER

Definition at line 31 of file spy.c.

◆ SPY_MAX_PGMMSGNUM

#define SPY_MAX_PGMMSGNUM   13

Definition at line 1088 of file spy.c.

◆ SPY_MAX_TCMMSGNUM

#define SPY_MAX_TCMMSGNUM   62

Definition at line 1020 of file spy.c.

◆ SPY_MAX_TVMSGNUM

#define SPY_MAX_TVMSGNUM   65

Definition at line 922 of file spy.c.

◆ SPY_MAX_VKKEYSNUM

#define SPY_MAX_VKKEYSNUM   255

Definition at line 1141 of file spy.c.

◆ SPY_MAX_WINEMSGNUM

#define SPY_MAX_WINEMSGNUM   9

Definition at line 1123 of file spy.c.

◆ SZOF

#define SZOF (   a)    sizeof(a)

Definition at line 1424 of file spy.c.

◆ USM

#define USM (   a,
  b 
)    { #a ,a,b}

Definition at line 1423 of file spy.c.

Function Documentation

◆ exclude_dwp()

static BOOL exclude_dwp ( void  )
inlinestatic

Definition at line 2004 of file spy.c.

2005{
2006 return spy_exclude[SPY_MAX_MSGNUM + 1];
2007}
#define SPY_MAX_MSGNUM
Definition: spy.c:31
static unsigned char * spy_exclude
Definition: spy.c:1997

Referenced by SPY_EnterMessage(), and SPY_ExitMessage().

◆ exclude_msg()

static BOOL exclude_msg ( UINT  msg)
inlinestatic

Definition at line 1999 of file spy.c.

2000{
2001 return spy_exclude[ min( msg, SPY_MAX_MSGNUM ) ];
2002}
#define msg(x)
Definition: auth_time.c:54
#define min(a, b)
Definition: monoChain.cc:55

Referenced by SPY_EnterMessage(), and SPY_ExitMessage().

◆ get_indent_level()

static INT_PTR get_indent_level ( void  )
inlinestatic

Definition at line 2027 of file spy.c.

2028{
2030}
LPVOID WINAPI TlsGetValue(IN DWORD Index)
Definition: thread.c:1240
static int indent_tls_index
Definition: spy.c:2022
int32_t INT_PTR
Definition: typedefs.h:64

Referenced by SPY_EnterMessage(), and SPY_ExitMessage().

◆ set_indent_level()

static void set_indent_level ( INT_PTR  level)
inlinestatic

Definition at line 2036 of file spy.c.

2037{
2039}
BOOL WINAPI TlsSetValue(IN DWORD Index, IN LPVOID Value)
Definition: thread.c:1276
GLint level
Definition: gl.h:1546

Referenced by SPY_EnterMessage(), and SPY_ExitMessage().

◆ SPY_Bsearch_Msg()

static const USER_MSG * SPY_Bsearch_Msg ( const USER_MSG msgs,
UINT  count,
UINT  code 
)
static

Definition at line 2077 of file spy.c.

2078{
2079 int low = 0, high = count - 1;
2080
2081 while (low <= high)
2082 {
2083 int idx = (low + high) / 2;
2084 if (msgs[idx].value == code) return msgs + idx;
2085 if (msgs[idx].value > code)
2086 high = idx - 1;
2087 else
2088 low = idx + 1;
2089 }
2090 return NULL;
2091}
#define NULL
Definition: types.h:112
unsigned int idx
Definition: utils.c:41
GLuint GLuint GLsizei count
Definition: gl.h:1545
Definition: inflate.c:139
Definition: pdh_main.c:94

Referenced by SPY_GetMsgStuff().

◆ SPY_Bsearch_Notify()

static const SPY_NOTIFY * SPY_Bsearch_Notify ( UINT  code)
static

Definition at line 2251 of file spy.c.

2252{
2253 int low = 0, high = ARRAYSIZE(spnfy_array) - 1;
2254
2255 while (low <= high)
2256 {
2257 int idx = (low + high) / 2;
2258 if (spnfy_array[idx].value == code) return spnfy_array + idx;
2259 if (spnfy_array[idx].value < code)
2260 high = idx - 1;
2261 else
2262 low = idx + 1;
2263 }
2264 return NULL;
2265}
static const SPY_NOTIFY spnfy_array[]
Definition: spy.c:1781
#define ARRAYSIZE(a)
Definition: spy.c:34

Referenced by SPY_DumpStructure().

◆ SPY_DumpMem()

static void SPY_DumpMem ( LPCSTR  header,
const UINT q,
INT  len 
)
static

Definition at line 2270 of file spy.c.

2271{
2272 int i;
2273
2274 for(i=0; i<len-12; i+=16) {
2275 TRACE("%s [%04x] %08x %08x %08x %08x\n",
2276 header, i, *q, *(q+1), *(q+2), *(q+3));
2277 q += 4;
2278 }
2279 switch ((len - i + 3) & (~3)) {
2280 case 16:
2281 TRACE("%s [%04x] %08x %08x %08x %08x\n",
2282 header, i, *q, *(q+1), *(q+2), *(q+3));
2283 break;
2284 case 12:
2285 TRACE("%s [%04x] %08x %08x %08x\n",
2286 header, i, *q, *(q+1), *(q+2));
2287 break;
2288 case 8:
2289 TRACE("%s [%04x] %08x %08x\n",
2290 header, i, *q, *(q+1));
2291 break;
2292 case 4:
2293 TRACE("%s [%04x] %08x\n",
2294 header, i, *q);
2295 break;
2296 default:
2297 break;
2298 }
2299}
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by SPY_DumpStructure().

◆ SPY_DumpStructure()

static void SPY_DumpStructure ( const SPY_INSTANCE sp_e,
BOOL  enter 
)
static

Definition at line 2304 of file spy.c.

2305{
2306 switch (sp_e->msgnum)
2307 {
2308 case LVM_INSERTITEMW:
2309 case LVM_SETITEMW:
2310 if (!enter) break;
2311 /* fall through */
2312 case LVM_GETITEMW:
2313 {
2314 LPLVITEMA item = (LPLVITEMA) sp_e->lParam;
2315 if (item) {
2316 SPY_DumpMem ("LVITEM", (UINT*)item, sizeof(LVITEMA));
2317 }
2318 break;
2319 }
2320 case TCM_INSERTITEMW:
2321 case TCM_INSERTITEMA:
2322 case TCM_SETITEMW:
2323 case TCM_SETITEMA:
2324 if (!enter) break;
2325 /* fall through */
2326 case TCM_GETITEMW:
2327 case TCM_GETITEMA:
2328 {
2329 TCITEMA *item = (TCITEMA *) sp_e->lParam;
2330 if (item) {
2331 SPY_DumpMem ("TCITEM", (UINT*)item, sizeof(TCITEMA));
2332 }
2333 break;
2334 }
2335 case TCM_ADJUSTRECT:
2336 case LVM_GETITEMRECT:
2337 case LVM_GETSUBITEMRECT:
2338 {
2339 LPRECT rc = (LPRECT) sp_e->lParam;
2340 if (rc)
2341 TRACE("lParam rect (%s)\n", wine_dbgstr_rect(rc));
2342 break;
2343 }
2345 if (!enter) break;
2346 /* fall through */
2348 case LVM_GETORIGIN:
2349 {
2350 LPPOINT point = (LPPOINT) sp_e->lParam;
2351 if (point) {
2352 TRACE("lParam point x=%d, y=%d\n", point->x, point->y);
2353 }
2354 break;
2355 }
2356 case SBM_SETRANGE:
2357 if (!enter && (sp_e->msgnum == SBM_SETRANGE)) break;
2358 TRACE("min=%d max=%d\n", (INT)sp_e->wParam, (INT)sp_e->lParam);
2359 break;
2360 case SBM_GETRANGE:
2361 if ((enter && (sp_e->msgnum == SBM_GETRANGE)) ||
2362 (!enter && (sp_e->msgnum == SBM_SETRANGE))) break;
2363 {
2364 LPINT ptmin = (LPINT) sp_e->wParam;
2365 LPINT ptmax = (LPINT) sp_e->lParam;
2366 if (ptmin && ptmax)
2367 TRACE("min=%d max=%d\n", *ptmin, *ptmax);
2368 else if (ptmin)
2369 TRACE("min=%d max=n/a\n", *ptmin);
2370 else if (ptmax)
2371 TRACE("min=n/a max=%d\n", *ptmax);
2372 break;
2373 }
2374 case EM_EXSETSEL:
2375 if (enter && sp_e->lParam)
2376 {
2377 CHARRANGE *cr = (CHARRANGE *) sp_e->lParam;
2378 TRACE("CHARRANGE: cpMin=%d cpMax=%d\n", cr->cpMin, cr->cpMax);
2379 }
2380 break;
2381 case EM_SETCHARFORMAT:
2382 if (enter && sp_e->lParam)
2383 {
2384 CHARFORMATW *cf = (CHARFORMATW *) sp_e->lParam;
2385 TRACE("CHARFORMAT: dwMask=0x%08x dwEffects=", cf->dwMask);
2386 if ((cf->dwMask & CFM_BOLD) && (cf->dwEffects & CFE_BOLD))
2387 TRACE(" CFE_BOLD");
2388 if ((cf->dwMask & CFM_COLOR) && (cf->dwEffects & CFE_AUTOCOLOR))
2389 TRACE(" CFE_AUTOCOLOR");
2390 if ((cf->dwMask & CFM_ITALIC) && (cf->dwEffects & CFE_ITALIC))
2391 TRACE(" CFE_ITALIC");
2392 if ((cf->dwMask & CFM_PROTECTED) && (cf->dwEffects & CFE_PROTECTED))
2393 TRACE(" CFE_PROTECTED");
2394 if ((cf->dwMask & CFM_STRIKEOUT) && (cf->dwEffects & CFE_STRIKEOUT))
2395 TRACE(" CFE_STRIKEOUT");
2396 if ((cf->dwMask & CFM_UNDERLINE) && (cf->dwEffects & CFE_UNDERLINE))
2397 TRACE(" CFE_UNDERLINE");
2398 TRACE("\n");
2399 if (cf->dwMask & CFM_SIZE)
2400 TRACE("yHeight=%d\n", cf->yHeight);
2401 if (cf->dwMask & CFM_OFFSET)
2402 TRACE("yOffset=%d\n", cf->yOffset);
2403 if ((cf->dwMask & CFM_COLOR) && !(cf->dwEffects & CFE_AUTOCOLOR))
2404 TRACE("crTextColor=%x\n", cf->crTextColor);
2405 TRACE("bCharSet=%x bPitchAndFamily=%x\n", cf->bCharSet, cf->bPitchAndFamily);
2406 /* FIXME: we should try to be a bit more intelligent about
2407 * whether this is in ANSI or Unicode (it could be either) */
2408 if (cf->dwMask & CFM_FACE)
2409 TRACE("szFaceName=%s\n", debugstr_wn(cf->szFaceName, LF_FACESIZE));
2410 /* FIXME: handle CHARFORMAT2 too */
2411 }
2412 break;
2413 case WM_DRAWITEM:
2414 if (!enter) break;
2415 {
2416 DRAWITEMSTRUCT *lpdis = (DRAWITEMSTRUCT*) sp_e->lParam;
2417 TRACE("DRAWITEMSTRUCT: CtlType=0x%08x CtlID=0x%08x\n",
2418 lpdis->CtlType, lpdis->CtlID);
2419 TRACE("itemID=0x%08x itemAction=0x%08x itemState=0x%08x\n",
2420 lpdis->itemID, lpdis->itemAction, lpdis->itemState);
2421 TRACE("hWnd=%p hDC=%p (%s) itemData=0x%08lx\n",
2422 lpdis->hwndItem, lpdis->hDC,
2423 wine_dbgstr_rect(&lpdis->rcItem), lpdis->itemData);
2424 }
2425 break;
2426 case WM_MEASUREITEM:
2427 {
2428 MEASUREITEMSTRUCT *lpmis = (MEASUREITEMSTRUCT*) sp_e->lParam;
2429 TRACE("MEASUREITEMSTRUCT: CtlType=0x%08x CtlID=0x%08x\n",
2430 lpmis->CtlType, lpmis->CtlID);
2431 TRACE("itemID=0x%08x itemWidth=0x%08x itemHeight=0x%08x\n",
2432 lpmis->itemID, lpmis->itemWidth, lpmis->itemHeight);
2433 TRACE("itemData=0x%08lx\n", lpmis->itemData);
2434 }
2435 break;
2436 case WM_NCCREATE:
2437 case WM_CREATE:
2438 {
2439 BOOL unicode;
2441
2442 if (!enter) break;
2443
2444 unicode = IsWindowUnicode(sp_e->msg_hwnd);
2445 cs = (CREATESTRUCTA *)sp_e->lParam;
2446 TRACE("%s %s ex=%08x style=%08x %d,%d %dx%d parent=%p menu=%p inst=%p params=%p\n",
2447 unicode ? debugstr_w((LPCWSTR)cs->lpszName) : debugstr_a(cs->lpszName),
2448 unicode ? debugstr_w((LPCWSTR)cs->lpszClass) : debugstr_a(cs->lpszClass),
2449 cs->dwExStyle, cs->style, cs->x, cs->y, cs->cx, cs->cy,
2450 cs->hwndParent, cs->hMenu, cs->hInstance, cs->lpCreateParams);
2451 break;
2452 }
2453 case WM_SIZE:
2454 if (!enter) break;
2455 TRACE("cx=%d cy=%d\n", LOWORD(sp_e->lParam), HIWORD(sp_e->lParam));
2456 break;
2458 if (!enter) break;
2460 {
2461 WINDOWPOS *lpwp = (WINDOWPOS *)sp_e->lParam;
2462 TRACE("WINDOWPOS hwnd=%p, after=%p, at (%d,%d) w=%d h=%d, flags=0x%08x\n",
2463 lpwp->hwnd, lpwp->hwndInsertAfter, lpwp->x, lpwp->y,
2464 lpwp->cx, lpwp->cy, lpwp->flags);
2465 }
2466 break;
2467 case WM_STYLECHANGED:
2468 if (!enter) break;
2469 case WM_STYLECHANGING:
2470 {
2472 TRACE("STYLESTRUCT: StyleOld=0x%08x, StyleNew=0x%08x\n",
2473 ss->styleOld, ss->styleNew);
2474 }
2475 break;
2476 case WM_NCCALCSIZE:
2477 {
2478 RECT *rc = (RECT *)sp_e->lParam;
2479 TRACE("Rect (%s)\n", wine_dbgstr_rect(rc));
2480 }
2481 break;
2482 case WM_NOTIFY:
2483 /* if (!enter) break; */
2484 {
2485 NMHDR * pnmh = (NMHDR*) sp_e->lParam;
2486 UINT *q, dumplen;
2487 const SPY_NOTIFY *p;
2488 WCHAR from_class[60];
2489 DWORD save_error;
2490
2491 p = SPY_Bsearch_Notify( pnmh->code );
2492 if (p) {
2493 TRACE("NMHDR hwndFrom=%p idFrom=0x%08lx code=%s<0x%08x>, extra=0x%x\n",
2494 pnmh->hwndFrom, pnmh->idFrom, p->name, pnmh->code, p->len);
2495 dumplen = p->len;
2496
2497 /* for CUSTOMDRAW, dump all the data for TOOLBARs */
2498 if (pnmh->code == NM_CUSTOMDRAW) {
2499 /* save and restore error code over the next call */
2500 save_error = GetLastError();
2501 GetClassNameW(pnmh->hwndFrom, from_class,
2502 sizeof(from_class)/sizeof(WCHAR));
2503 SetLastError(save_error);
2504 if (strcmpW(TOOLBARCLASSNAMEW, from_class) == 0)
2505 dumplen = sizeof(NMTBCUSTOMDRAW)-sizeof(NMHDR);
2506 } else if ( pnmh->code >= HDN_ENDDRAG
2507 && pnmh->code <= HDN_ITEMCHANGINGA ) {
2508 dumplen = sizeof(NMHEADERA)-sizeof(NMHDR);
2509 }
2510 if (dumplen > 0) {
2511 q = (UINT *)(pnmh + 1);
2512 SPY_DumpMem ("NM extra", q, (INT)dumplen);
2513 }
2514 }
2515 else
2516 TRACE("NMHDR hwndFrom=%p idFrom=0x%08lx code=0x%08x\n",
2517 pnmh->hwndFrom, pnmh->idFrom, pnmh->code);
2518 }
2519 break;
2520 default:
2521 if (sp_e->data_len > 0)
2522 SPY_DumpMem ("MSG lParam", (UINT *)sp_e->lParam, sp_e->data_len);
2523 }
2524
2525}
Arabic default style
Definition: afstyles.h:94
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
HINSTANCE hInstance
Definition: charmap.c:19
static HWND hwndParent
Definition: cryptui.c:300
#define LF_FACESIZE
Definition: dimm.idl:39
#define SetLastError(x)
Definition: compat.h:752
POINTL point
Definition: edittest.c:50
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLfloat GLfloat p
Definition: glext.h:8902
#define ss
Definition: i386-dis.c:441
#define cs
Definition: i386-dis.c:442
#define debugstr_a
Definition: kernel32.h:31
#define debugstr_wn
Definition: kernel32.h:33
#define debugstr_w
Definition: kernel32.h:32
if(dx< 0)
Definition: linetemp.h:194
static ATOM item
Definition: dde.c:856
unsigned int UINT
Definition: ndis.h:50
#define LOWORD(l)
Definition: pedump.c:82
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
struct _NMTBCUSTOMDRAW NMTBCUSTOMDRAW
struct tagLVITEMA * LPLVITEMA
#define LVM_GETITEMPOSITION
Definition: commctrl.h:2483
_Out_opt_ int * cx
Definition: commctrl.h:585
#define TCM_INSERTITEMW
Definition: commctrl.h:4047
#define LVM_SETITEMW
Definition: commctrl.h:2397
#define LVM_GETSUBITEMRECT
Definition: commctrl.h:2762
#define TCM_SETITEMA
Definition: commctrl.h:4039
#define TCM_SETITEMW
Definition: commctrl.h:4040
#define HDN_ITEMCHANGINGA
Definition: commctrl.h:837
#define TCM_ADJUSTRECT
Definition: commctrl.h:4085
#define NM_CUSTOMDRAW
Definition: commctrl.h:137
#define HDN_ENDDRAG
Definition: commctrl.h:856
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:943
#define TCM_GETITEMA
Definition: commctrl.h:4032
#define LVM_GETITEMRECT
Definition: commctrl.h:2477
#define LVM_GETORIGIN
Definition: commctrl.h:2668
#define LVM_SETITEMPOSITION32
Definition: commctrl.h:2705
#define TCM_GETITEMW
Definition: commctrl.h:4033
#define TCM_INSERTITEMA
Definition: commctrl.h:4046
struct tagNMHEADERA NMHEADERA
#define LVM_INSERTITEMW
Definition: commctrl.h:2404
#define LVM_GETITEMW
Definition: commctrl.h:2390
#define strcmpW(s1, s2)
Definition: unicode.h:38
#define CFM_PROTECTED
Definition: richedit.h:336
#define CFM_STRIKEOUT
Definition: richedit.h:335
#define CFE_STRIKEOUT
Definition: richedit.h:409
#define CFE_BOLD
Definition: richedit.h:406
#define CFE_AUTOCOLOR
Definition: richedit.h:414
#define CFM_OFFSET
Definition: richedit.h:359
#define CFE_ITALIC
Definition: richedit.h:407
#define EM_SETCHARFORMAT
Definition: richedit.h:101
#define CFE_UNDERLINE
Definition: richedit.h:408
#define CFM_ITALIC
Definition: richedit.h:333
#define CFE_PROTECTED
Definition: richedit.h:410
#define CFM_SIZE
Definition: richedit.h:362
#define EM_EXSETSEL
Definition: richedit.h:88
#define CFM_BOLD
Definition: richedit.h:332
#define CFM_FACE
Definition: richedit.h:360
#define WM_NOTIFY
Definition: richedit.h:61
#define CFM_UNDERLINE
Definition: richedit.h:334
#define CFM_COLOR
Definition: richedit.h:361
static const SPY_NOTIFY * SPY_Bsearch_Notify(UINT code)
Definition: spy.c:2251
static void SPY_DumpMem(LPCSTR header, const UINT *q, INT len)
Definition: spy.c:2270
INT data_len
Definition: spy.c:2016
LPARAM lParam
Definition: spy.c:2015
WPARAM wParam
Definition: spy.c:2014
UINT msgnum
Definition: spy.c:2012
HWND msg_hwnd
Definition: spy.c:2013
LONG y
Definition: windef.h:330
LONG x
Definition: windef.h:329
HWND hwnd
Definition: winuser.h:3587
UINT flags
Definition: winuser.h:3593
HWND hwndInsertAfter
Definition: winuser.h:3588
LONG cpMax
Definition: richedit.h:501
LONG cpMin
Definition: richedit.h:500
ULONG_PTR itemData
Definition: winuser.h:3092
ULONG_PTR itemData
Definition: winuser.h:3645
UINT_PTR idFrom
Definition: winuser.h:3157
UINT code
Definition: winuser.h:3158
HWND hwndFrom
Definition: winuser.h:3156
int32_t INT
Definition: typedefs.h:58
#define HIWORD(l)
Definition: typedefs.h:247
#define LPPOINT
Definition: precomp.h:31
#define LPRECT
Definition: precomp.h:28
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
int * LPINT
Definition: windef.h:178
#define SBM_SETRANGE
Definition: winuser.h:2080
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1660
#define WM_CREATE
Definition: winuser.h:1607
#define WM_SIZE
Definition: winuser.h:1610
#define SBM_GETRANGE
Definition: winuser.h:2078
#define WM_DRAWITEM
Definition: winuser.h:1644
#define WM_NCCREATE
Definition: winuser.h:1682
struct tagSTYLESTRUCT * LPSTYLESTRUCT
BOOL WINAPI IsWindowUnicode(_In_ HWND)
#define WM_MEASUREITEM
Definition: winuser.h:1645
int WINAPI GetClassNameW(_In_ HWND hWnd, _Out_writes_to_(nMaxCount, return) LPWSTR lpClassName, _In_ int nMaxCount)
#define WM_NCCALCSIZE
Definition: winuser.h:1684
#define WM_WINDOWPOSCHANGED
Definition: winuser.h:1661
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by SPY_EnterMessage(), and SPY_ExitMessage().

◆ SPY_EnterMessage()

void SPY_EnterMessage ( INT  iFlag,
HWND  hWnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 2593 of file spy.c.

2595{
2596 SPY_INSTANCE sp_e;
2597 int indent;
2598 DWORD save_error = GetLastError();
2599
2600 if (!spy_init() || exclude_msg(msg)) return;
2601
2602 sp_e.msgnum = msg;
2603 sp_e.msg_hwnd = hWnd;
2604 sp_e.lParam = lParam;
2605 sp_e.wParam = wParam;
2606 SPY_GetWndName(&sp_e);
2607 SPY_GetMsgStuff(&sp_e);
2609
2610 /* each SPY_SENDMESSAGE must be complemented by call to SPY_ExitMessage */
2611 switch(iFlag)
2612 {
2614 TRACE("%*s(%p) %-16s [%04x] %s dispatched wp=%08lx lp=%08lx\n",
2615 indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
2616 sp_e.msg_name, wParam, lParam);
2617 break;
2618
2619 case SPY_SENDMESSAGE:
2620 {
2621 char taskName[20];
2623
2624 if (tid == GetCurrentThreadId()) strcpy( taskName, "self" );
2625 else sprintf( taskName, "tid %04ld", GetCurrentThreadId() );
2626
2627 TRACE("%*s(%p) %-16s [%04x] %s sent from %s wp=%08lx lp=%08lx\n",
2628 indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
2629 sp_e.msg_name, taskName, wParam, lParam );
2630 SPY_DumpStructure(&sp_e, TRUE);
2631 }
2632 break;
2633
2634 case SPY_DEFWNDPROC:
2635 if (exclude_dwp()) return;
2636 TRACE("%*s(%p) DefWindowProc:[%04x] %s wp=%08lx lp=%08lx\n",
2637 indent, "", hWnd, msg, sp_e.msg_name, wParam, lParam );
2638 break;
2639 }
2641 SetLastError( save_error );
2642}
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
HWND hWnd
Definition: settings.c:17
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define TRUE
Definition: types.h:120
static const WCHAR indent[]
Definition: object.c:1156
#define sprintf(buf, format,...)
Definition: sprintf.c:55
static TfClientId tid
static void set_indent_level(INT_PTR level)
Definition: spy.c:2036
static INT_PTR get_indent_level(void)
Definition: spy.c:2027
static void SPY_GetWndName(SPY_INSTANCE *sp_e)
Definition: spy.c:2192
static void SPY_DumpStructure(const SPY_INSTANCE *sp_e, BOOL enter)
Definition: spy.c:2304
static BOOL exclude_msg(UINT msg)
Definition: spy.c:1999
static void SPY_GetMsgStuff(SPY_INSTANCE *sp_e)
Definition: spy.c:2132
static BOOL spy_init(void)
Definition: spy.c:2531
#define SPY_INDENT_UNIT
Definition: spy.c:32
static BOOL exclude_dwp(void)
Definition: spy.c:2004
char msg_name[60]
Definition: spy.c:2017
WCHAR wnd_name[16]
Definition: spy.c:2019
#define SPY_DISPATCHMESSAGE
Definition: user32p.h:67
#define SPY_SENDMESSAGE
Definition: user32p.h:68
#define SPY_DEFWNDPROC
Definition: user32p.h:69
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)

Referenced by RealDefWindowProcA(), RealDefWindowProcW(), SendMessageTimeoutA(), and SendMessageTimeoutW().

◆ SPY_ExitMessage()

void SPY_ExitMessage ( INT  iFlag,
HWND  hWnd,
UINT  msg,
LRESULT  lReturn,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 2648 of file spy.c.

2650{
2651 SPY_INSTANCE sp_e;
2652 int indent;
2653 DWORD save_error = GetLastError();
2654
2655 if (!TRACE_ON(message) || exclude_msg(msg) ||
2656 (exclude_dwp() && iFlag == SPY_RESULT_DEFWND))
2657 return;
2658
2659 sp_e.msgnum = msg;
2660 sp_e.msg_hwnd = hWnd;
2661 sp_e.lParam = lParam;
2662 sp_e.wParam = wParam;
2663 SPY_GetWndName(&sp_e);
2664 SPY_GetMsgStuff(&sp_e);
2665
2666 if ((indent = get_indent_level()))
2667 {
2670 }
2671
2672 switch(iFlag)
2673 {
2674 case SPY_RESULT_DEFWND:
2675 TRACE(" %*s(%p) DefWindowProc: [%04x] %s returned %08lx\n",
2676 indent, "", hWnd, msg, sp_e.msg_name, lReturn );
2677 break;
2678
2679 case SPY_RESULT_OK:
2680 TRACE(" %*s(%p) %-16s [%04x] %s returned %08lx\n",
2681 indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
2682 sp_e.msg_name, lReturn );
2683 SPY_DumpStructure(&sp_e, FALSE);
2684 break;
2685 }
2686 SetLastError( save_error );
2687}
#define FALSE
Definition: types.h:117
#define TRACE_ON(x)
Definition: compat.h:75
Definition: tftpd.h:60
#define SPY_RESULT_OK
Definition: user32p.h:70
#define SPY_RESULT_DEFWND
Definition: user32p.h:72

Referenced by RealDefWindowProcA(), RealDefWindowProcW(), SendMessageTimeoutA(), and SendMessageTimeoutW().

◆ SPY_GetClassLongOffsetName()

const char * SPY_GetClassLongOffsetName ( INT  offset)

Definition at line 2098 of file spy.c.

2099{
2100 INT index;
2101 if (offset < 0 && offset % 2 == 0 && ((index = -(offset + 8) / 2) <
2102 sizeof(ClassLongOffsetNames) / sizeof(*ClassLongOffsetNames)))
2103 {
2105 }
2106
2107 return "?";
2108}
#define index(s, c)
Definition: various.h:29
GLuint index
Definition: glext.h:6031
GLintptr offset
Definition: glext.h:5920
static const char *const ClassLongOffsetNames[]
Definition: spy.c:38

◆ SPY_GetClassName()

static void SPY_GetClassName ( SPY_INSTANCE sp_e)
static

Definition at line 2115 of file spy.c.

2116{
2117 /* special code to detect a property sheet dialog */
2121 }
2122 else {
2123 GetClassNameW(sp_e->msg_hwnd, sp_e->wnd_class, sizeof(sp_e->wnd_class)/sizeof(WCHAR));
2124 }
2125}
static const WCHAR WC_PROPSHEETW[]
Definition: prsht.h:369
#define strcpyW(d, s)
Definition: unicode.h:29
static const WCHAR PropSheetInfoStr[]
Definition: spy.c:1646
WCHAR wnd_class[60]
Definition: spy.c:2018
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define WC_DIALOG
Definition: undocuser.h:11
#define GetClassLongPtrW
Definition: winuser.h:4563
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
#define GCW_ATOM
Definition: winuser.h:661

Referenced by SPY_GetMsgStuff(), and SPY_GetWndName().

◆ SPY_GetMsgInternal()

static const char * SPY_GetMsgInternal ( UINT  msg)
static

Definition at line 2045 of file spy.c.

2046{
2047 if (msg <= SPY_MAX_MSGNUM)
2048 return MessageTypeNames[msg];
2049
2052
2053 if (msg >= TV_FIRST && msg <= TV_FIRST + SPY_MAX_TVMSGNUM)
2055
2058
2061
2064
2067#ifndef __REACTOS__
2068 if (msg >= WM_WINE_DESTROYWINDOW && msg <= WM_WINE_DESTROYWINDOW + SPY_MAX_WINEMSGNUM)
2069 return WINEMessageTypeNames[msg-WM_WINE_DESTROYWINDOW];
2070#endif
2071 return NULL;
2072}
#define HDM_FIRST
Definition: commctrl.h:84
#define CCM_FIRST
Definition: commctrl.h:91
#define PGM_FIRST
Definition: commctrl.h:87
#define TV_FIRST
Definition: commctrl.h:83
#define TCM_FIRST
Definition: commctrl.h:85
#define LVM_FIRST
Definition: commctrl.h:82
static const char *const TVMessageTypeNames[SPY_MAX_TVMSGNUM+1]
Definition: spy.c:923
static const char *const TCMMessageTypeNames[SPY_MAX_TCMMSGNUM+1]
Definition: spy.c:1021
static const char *const PGMMessageTypeNames[SPY_MAX_PGMMSGNUM+1]
Definition: spy.c:1089
#define SPY_MAX_LVMMSGNUM
Definition: spy.c:733
static const char *const HDMMessageTypeNames[SPY_MAX_HDMMSGNUM+1]
Definition: spy.c:995
static const char *const CCMMessageTypeNames[SPY_MAX_CCMMSGNUM+1]
Definition: spy.c:1109
#define SPY_MAX_PGMMSGNUM
Definition: spy.c:1088
static const char *const MessageTypeNames[SPY_MAX_MSGNUM+1]
Definition: spy.c:56
static const char *const WINEMessageTypeNames[SPY_MAX_WINEMSGNUM+1]
Definition: spy.c:1126
static const char *const LVMMessageTypeNames[SPY_MAX_LVMMSGNUM+1]
Definition: spy.c:734
#define SPY_MAX_HDMMSGNUM
Definition: spy.c:994
#define SPY_MAX_TCMMSGNUM
Definition: spy.c:1020
#define SPY_MAX_WINEMSGNUM
Definition: spy.c:1123
#define SPY_MAX_CCMMSGNUM
Definition: spy.c:1108
#define SPY_MAX_TVMSGNUM
Definition: spy.c:922

Referenced by SPY_GetMsgStuff().

◆ SPY_GetMsgName()

const char * SPY_GetMsgName ( UINT  msg,
HWND  hWnd 
)

Definition at line 2218 of file spy.c.

2219{
2220 SPY_INSTANCE ext_sp_e;
2221 DWORD save_error = GetLastError();
2222
2223 ext_sp_e.msgnum = msg;
2224 ext_sp_e.msg_hwnd = hWnd;
2225 ext_sp_e.lParam = 0;
2226 ext_sp_e.wParam = 0;
2227 ext_sp_e.wnd_class[0] = 0;
2228 SPY_GetMsgStuff(&ext_sp_e);
2229 SetLastError( save_error );
2230 return wine_dbg_sprintf("%s", ext_sp_e.msg_name);
2231}
const char * wine_dbg_sprintf(const char *format,...)
Definition: compat.c:296

Referenced by ComboWndProc_common(), DefFrameProcW(), DefMDIChildProcA(), DefMDIChildProcW(), EditWndProc_common(), IntScrollHandleScrollEvent(), ListBoxWndProc_common(), and MDIClientWndProc_common().

◆ SPY_GetMsgStuff()

static void SPY_GetMsgStuff ( SPY_INSTANCE sp_e)
static

Definition at line 2132 of file spy.c.

2133{
2134 const USER_MSG *p;
2135 const char *msg_name = SPY_GetMsgInternal( sp_e->msgnum );
2136
2137 sp_e->data_len = 0;
2138 if (!msg_name)
2139 {
2140 INT i = 0;
2141
2142 if (sp_e->msgnum >= 0xc000)
2143 {
2144 if (GlobalGetAtomNameA( sp_e->msgnum, sp_e->msg_name+1, sizeof(sp_e->msg_name)-2 ))
2145 {
2146 sp_e->msg_name[0] = '\"';
2147 strcat( sp_e->msg_name, "\"" );
2148 return;
2149 }
2150 }
2151 if (!sp_e->wnd_class[0]) SPY_GetClassName(sp_e);
2152
2153#if DEBUG_SPY
2154 TRACE("looking class %s\n", debugstr_w(sp_e->wnd_class));
2155#endif
2156
2157 while (cc_array[i].classname &&
2158 strcmpiW(cc_array[i].classname, sp_e->wnd_class) != 0) i++;
2159
2160 if (cc_array[i].classname)
2161 {
2162#if DEBUG_SPY
2163 TRACE("process class %s, first %p, last %p\n",
2164 debugstr_w(cc_array[i].classname), cc_array[i].classmsg,
2165 cc_array[i].lastmsg);
2166#endif
2167 p = SPY_Bsearch_Msg (cc_array[i].classmsg, cc_array[i].count, sp_e->msgnum);
2168 if (p) {
2169 lstrcpynA (sp_e->msg_name, p->name, sizeof(sp_e->msg_name));
2170 sp_e->data_len = p->len;
2171 return;
2172 }
2173 }
2174 if (sp_e->msgnum >= WM_USER && sp_e->msgnum <= WM_APP)
2175 sprintf( sp_e->msg_name, "WM_USER+%d", sp_e->msgnum - WM_USER );
2176 else
2177 sprintf( sp_e->msg_name, "%04x", sp_e->msgnum );
2178 }
2179 else
2180 {
2181 lstrcpynA(sp_e->msg_name, msg_name, sizeof(sp_e->msg_name));
2182 }
2183}
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
#define lstrcpynA
Definition: compat.h:751
UINT WINAPI GlobalGetAtomNameA(ATOM nAtom, LPSTR lpBuffer, int nSize)
Definition: atom.c:484
#define WM_APP
Definition: eventvwr.h:73
#define strcmpiW(s1, s2)
Definition: unicode.h:39
WCHAR classname[128]
Definition: startup.c:15
static const CONTROL_CLASS cc_array[]
Definition: spy.c:1752
static void SPY_GetClassName(SPY_INSTANCE *sp_e)
Definition: spy.c:2115
static const USER_MSG * SPY_Bsearch_Msg(const USER_MSG *msgs, UINT count, UINT code)
Definition: spy.c:2077
static const char * SPY_GetMsgInternal(UINT msg)
Definition: spy.c:2045
Definition: spy.c:1409
#define WM_USER
Definition: winuser.h:1894

Referenced by SPY_EnterMessage(), SPY_ExitMessage(), and SPY_GetMsgName().

◆ SPY_GetVKeyName()

const char * SPY_GetVKeyName ( WPARAM  wParam)

Definition at line 2236 of file spy.c.

2237{
2238 const char *vk_key_name;
2239
2241 vk_key_name = VK_KeyNames[wParam];
2242 else
2243 vk_key_name = "VK_???";
2244
2245 return vk_key_name;
2246}
static const char *const VK_KeyNames[SPY_MAX_VKKEYSNUM+1]
Definition: spy.c:1142
#define SPY_MAX_VKKEYSNUM
Definition: spy.c:1141

◆ SPY_GetWndName()

static void SPY_GetWndName ( SPY_INSTANCE sp_e)
static

Definition at line 2192 of file spy.c.

2193{
2194 INT len;
2195
2196 SPY_GetClassName( sp_e );
2197
2198 len = InternalGetWindowText(sp_e->msg_hwnd, sp_e->wnd_name, sizeof(sp_e->wnd_name)/sizeof(WCHAR));
2199 if(!len) /* get class name */
2200 {
2201 LPWSTR dst = sp_e->wnd_name;
2202 LPWSTR src = sp_e->wnd_class;
2203 int n = sizeof(sp_e->wnd_name)/sizeof(WCHAR) - 3;
2204 *dst++ = '{';
2205 while ((n-- > 0) && *src) *dst++ = *src++;
2206 *dst++ = '}';
2207 *dst = 0;
2208 }
2209}
GLdouble n
Definition: glext.h:7729
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
INT WINAPI InternalGetWindowText(_In_ HWND hWnd, _Out_writes_to_(cchMaxCount, return+1) LPWSTR pString, _In_ int cchMaxCount)
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by SPY_EnterMessage(), and SPY_ExitMessage().

◆ spy_init()

static BOOL spy_init ( void  )
static

Definition at line 2531 of file spy.c.

2532{
2533 int i;
2534 char buffer[1024];
2535 HKEY hkey;
2536 char *exclude;
2537
2538 if (!TRACE_ON(message)) return FALSE;
2539
2541 {
2542 DWORD index = TlsAlloc();
2544 TlsFree( index );
2545 }
2546
2547 if (spy_exclude) return TRUE;
2549
2550 /* @@ Wine registry key: HKCU\Software\Wine\Debug */
2551 if(!RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Debug", &hkey))
2552 {
2553 DWORD type, count = sizeof(buffer);
2554
2555 buffer[0] = 0;
2556 if (!RegQueryValueExA(hkey, "SpyInclude", 0, &type, (LPBYTE) buffer, &count) &&
2557 strcmp( buffer, "INCLUDEALL" ))
2558 {
2559 TRACE("Include=%s\n", buffer );
2560 for (i = 0; i <= SPY_MAX_MSGNUM; i++)
2561 exclude[i] = (MessageTypeNames[i] && !strstr(buffer,MessageTypeNames[i]));
2562 }
2563
2564 count = sizeof(buffer);
2565 buffer[0] = 0;
2566 if (!RegQueryValueExA(hkey, "SpyExclude", 0, &type, (LPBYTE) buffer, &count))
2567 {
2568 TRACE("Exclude=%s\n", buffer );
2569 if (!strcmp( buffer, "EXCLUDEALL" ))
2570 for (i = 0; i <= SPY_MAX_MSGNUM; i++) exclude[i] = TRUE;
2571 else
2572 for (i = 0; i <= SPY_MAX_MSGNUM; i++)
2573 exclude[i] = (MessageTypeNames[i] && strstr(buffer,MessageTypeNames[i]));
2574 }
2575
2576 count = sizeof(buffer);
2577 if(!RegQueryValueExA(hkey, "SpyExcludeDWP", 0, &type, (LPBYTE) buffer, &count))
2578 exclude[SPY_MAX_MSGNUM + 1] = atoi(buffer);
2579
2580 RegCloseKey(hkey);
2581 }
2582
2583 if (InterlockedCompareExchangePointer( (void **)&spy_exclude, exclude, NULL ))
2584 HeapFree( GetProcessHeap(), 0, exclude );
2585
2586 return TRUE;
2587}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
char * strstr(char *String1, char *String2)
Definition: utclib.c:653
#define RegCloseKey(hKey)
Definition: registry.h:49
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3263
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4038
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
DWORD WINAPI TlsAlloc(VOID)
Definition: thread.c:1100
BOOL WINAPI TlsFree(IN DWORD Index)
Definition: thread.c:1166
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint buffer
Definition: glext.h:5915
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
#define InterlockedCompareExchange
Definition: interlocked.h:104
long LONG
Definition: pedump.c:60
unsigned char * LPBYTE
Definition: typedefs.h:53
#define TLS_OUT_OF_INDEXES
Definition: winbase.h:549
#define HKEY_CURRENT_USER
Definition: winreg.h:11

Referenced by SPY_EnterMessage().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( message  )

Variable Documentation

◆ cc_array

const CONTROL_CLASS cc_array[]
static
Initial value:
= {
{0, 0, 0} }
#define UPDOWN_CLASSW
Definition: commctrl.h:2119
#define REBARCLASSNAMEW
Definition: commctrl.h:1463
#define TOOLTIPS_CLASSW
Definition: commctrl.h:1707
#define WC_COMBOBOXEXW
Definition: commctrl.h:3781
static const WCHAR RICHEDIT_CLASS20W[]
Definition: richedit.h:50
static const USER_MSG tooltips_array[]
Definition: spy.c:1566
static const USER_MSG updown_array[]
Definition: spy.c:1649
static const USER_MSG comboex_array[]
Definition: spy.c:1607
static const USER_MSG propsht_array[]
Definition: spy.c:1624
static const USER_MSG rebar_array[]
Definition: spy.c:1432
static const USER_MSG toolbar_array[]
Definition: spy.c:1470
static const USER_MSG richedit_array[]
Definition: spy.c:1669

Definition at line 1752 of file spy.c.

Referenced by SPY_GetMsgStuff().

◆ CCMMessageTypeNames

const char* const CCMMessageTypeNames[SPY_MAX_CCMMSGNUM+1]
static
Initial value:
=
{
NULL,
"CCM_SETBKCOLOR",
"CCM_SETCOLORSCHEME",
"CCM_GETCOLORSCHEME",
"CCM_GETDROPTARGET",
"CCM_SETUNICODEFORMAT",
"CCM_GETUNICODEFORMAT",
"CCM_SETVERSION",
"CCM_GETVERSION",
"CCM_SETNOTIFYWINDOW"
}

Definition at line 1109 of file spy.c.

Referenced by SPY_GetMsgInternal().

◆ ClassLongOffsetNames

const char* const ClassLongOffsetNames[]
static
Initial value:
=
{
"GCLP_MENUNAME",
"GCLP_HBRBACKGROUND",
"GCLP_HCURSOR",
"GCLP_HICON",
"GCLP_HMODULE",
"GCL_CBWNDEXTRA",
"GCL_CBCLSEXTRA",
"?",
"GCLP_WNDPROC",
"GCL_STYLE",
"?",
"?",
"GCW_ATOM",
"GCLP_HICONSM",
}

Definition at line 38 of file spy.c.

Referenced by SPY_GetClassLongOffsetName().

◆ comboex_array

const USER_MSG comboex_array[]
static
Initial value:
= {
}
#define CBEM_HASEDITCHANGED
Definition: commctrl.h:3840
#define CBEM_GETITEMW
Definition: commctrl.h:3843
#define CBEM_GETIMAGELIST
Definition: commctrl.h:3828
#define CBEM_SETITEMW
Definition: commctrl.h:3842
#define CBEM_GETCOMBOCONTROL
Definition: commctrl.h:3832
#define CBEM_SETEXTENDEDSTYLE
Definition: commctrl.h:3835
#define CBEM_SETIMAGELIST
Definition: commctrl.h:3827
#define CBEM_INSERTITEMA
Definition: commctrl.h:3826
#define CBEM_INSERTITEMW
Definition: commctrl.h:3841
#define CBEM_SETEXSTYLE
Definition: commctrl.h:3834
#define CBEM_GETITEMA
Definition: commctrl.h:3829
#define CBEM_GETEXTENDEDSTYLE
Definition: commctrl.h:3837
#define CBEM_SETITEMA
Definition: commctrl.h:3830
#define CBEM_GETEDITCONTROL
Definition: commctrl.h:3833
#define USM(a, b)
Definition: spy.c:1423

Definition at line 1607 of file spy.c.

◆ HDMMessageTypeNames

const char* const HDMMessageTypeNames[SPY_MAX_HDMMSGNUM+1]
static
Initial value:
=
{
"HDM_GETITEMCOUNT",
"HDM_INSERTITEMA",
"HDM_DELETEITEM",
"HDM_GETITEMA",
"HDM_SETITEMA",
"HDM_LAYOUT",
"HDM_HITTEST",
"HDM_GETITEMRECT",
"HDM_SETIMAGELIST",
"HDM_GETIMAGELIST",
"HDM_INSERTITEMW",
"HDM_GETITEMW",
"HDM_SETITEMW",
"HDM_ORDERTOINDEX",
"HDM_CREATEDRAGIMAGE",
"GETORDERARRAYINDEX",
"SETORDERARRAYINDEX",
"SETHOTDIVIDER"
}

Definition at line 995 of file spy.c.

Referenced by SPY_GetMsgInternal().

◆ indent_tls_index

int indent_tls_index = TLS_OUT_OF_INDEXES
static

Definition at line 2022 of file spy.c.

Referenced by get_indent_level(), set_indent_level(), and spy_init().

◆ LVMMessageTypeNames

const char* const LVMMessageTypeNames[SPY_MAX_LVMMSGNUM+1]
static

Definition at line 734 of file spy.c.

Referenced by SPY_GetMsgInternal().

◆ MessageTypeNames

const char* const MessageTypeNames[SPY_MAX_MSGNUM+1]
static

Definition at line 56 of file spy.c.

Referenced by SPY_GetMsgInternal(), and spy_init().

◆ PGMMessageTypeNames

const char* const PGMMessageTypeNames[SPY_MAX_PGMMSGNUM+1]
static
Initial value:
=
{
NULL,
"PGM_SETCHILD",
"PGM_RECALCSIZE",
"PGM_FORWARDMOUSE",
"PGM_SETBKCOLOR",
"PGM_GETBKCOLOR",
"PGM_SETBORDER",
"PGM_GETBORDER",
"PGM_SETPOS",
"PGM_GETPOS",
"PGM_SETBUTTONSIZE",
"PGM_GETBUTTONSIZE",
"PGM_GETBUTTONSTATE",
"PGM_GETDROPTARGET"
}

Definition at line 1089 of file spy.c.

Referenced by SPY_GetMsgInternal().

◆ PropSheetInfoStr

const WCHAR PropSheetInfoStr[]
static
Initial value:
=
{'P','r','o','p','e','r','t','y','S','h','e','e','t','I','n','f','o',0 }

Definition at line 1646 of file spy.c.

Referenced by SPY_GetClassName().

◆ propsht_array

const USER_MSG propsht_array[]
static
Initial value:
= {
}
#define PSM_GETTABCONTROL
Definition: prsht.h:80
#define PSM_CHANGED
Definition: prsht.h:164
#define PSM_ISDIALOGMESSAGE
Definition: prsht.h:96
#define PSM_SETWIZBUTTONS
Definition: prsht.h:157
#define PSM_REMOVEPAGE
Definition: prsht.h:166
#define PSM_ADDPAGE
Definition: prsht.h:165
#define PSM_UNCHANGED
Definition: prsht.h:159
#define PSM_GETCURRENTPAGEHWND
Definition: prsht.h:81
#define PSM_RESTARTWINDOWS
Definition: prsht.h:163
#define PSM_SETTITLEA
Definition: prsht.h:168
#define PSM_SETCURSELID
Definition: prsht.h:104
#define PSM_SETTITLEW
Definition: prsht.h:169
#define PSM_SETFINISHTEXTW
Definition: prsht.h:105
#define PSM_SETFINISHTEXTA
Definition: prsht.h:106
#define PSM_CANCELTOCLOSE
Definition: prsht.h:161
#define PSM_APPLY
Definition: prsht.h:158
#define PSM_SETCURSEL
Definition: prsht.h:167
#define PSM_PRESSBUTTON
Definition: prsht.h:100
#define PSM_REBOOTSYSTEM
Definition: prsht.h:162
#define PSM_QUERYSIBLINGS
Definition: prsht.h:160

Definition at line 1624 of file spy.c.

◆ rebar_array

const USER_MSG rebar_array[]
static

Definition at line 1432 of file spy.c.

◆ richedit_array

const USER_MSG richedit_array[]
static

Definition at line 1669 of file spy.c.

◆ spnfy_array

const SPY_NOTIFY spnfy_array[]
static

Definition at line 1781 of file spy.c.

Referenced by SPY_Bsearch_Notify().

◆ spy_exclude

unsigned char* spy_exclude
static

Definition at line 1997 of file spy.c.

Referenced by exclude_dwp(), exclude_msg(), and spy_init().

◆ TCMMessageTypeNames

const char* const TCMMessageTypeNames[SPY_MAX_TCMMSGNUM+1]
static

Definition at line 1021 of file spy.c.

Referenced by SPY_GetMsgInternal().

◆ toolbar_array

const USER_MSG toolbar_array[]
static

Definition at line 1470 of file spy.c.

◆ tooltips_array

const USER_MSG tooltips_array[]
static

Definition at line 1566 of file spy.c.

◆ TVMessageTypeNames

const char* const TVMessageTypeNames[SPY_MAX_TVMSGNUM+1]
static

Definition at line 923 of file spy.c.

Referenced by SPY_GetMsgInternal().

◆ updown_array

const USER_MSG updown_array[]
static
Initial value:
= {
}
#define UDM_SETACCEL
Definition: commctrl.h:2147
#define UDM_GETBUDDY
Definition: commctrl.h:2146
#define UDM_SETPOS
Definition: commctrl.h:2143
#define UDM_GETACCEL
Definition: commctrl.h:2148
#define UDM_SETRANGE
Definition: commctrl.h:2141
#define UDM_GETRANGE
Definition: commctrl.h:2142
#define UDM_SETBASE
Definition: commctrl.h:2149
#define UDM_GETBASE
Definition: commctrl.h:2150
#define UDM_SETBUDDY
Definition: commctrl.h:2145
#define UDM_GETRANGE32
Definition: commctrl.h:2152
#define UDM_SETRANGE32
Definition: commctrl.h:2151
#define UDM_GETPOS
Definition: commctrl.h:2144
#define UDM_GETPOS32
Definition: commctrl.h:2156
#define UDM_SETPOS32
Definition: commctrl.h:2155

Definition at line 1649 of file spy.c.

◆ VK_KeyNames

const char* const VK_KeyNames[SPY_MAX_VKKEYSNUM+1]
static

Definition at line 1142 of file spy.c.

Referenced by SPY_GetVKeyName().

◆ WINEMessageTypeNames

const char* const WINEMessageTypeNames[SPY_MAX_WINEMSGNUM+1]
static
Initial value:
=
{
"WM_WINE_DESTROYWINDOW",
"WM_WINE_SETWINDOWPOS",
"WM_WINE_SHOWWINDOW",
"WM_WINE_SETPARENT",
"WM_WINE_SETWINDOWLONG",
"WM_WINE_ENABLEWINDOW",
"WM_WINE_SETACTIVEWINDOW",
"WM_WINE_KEYBOARD_LL_HOOK",
"WM_WINE_MOUSE_LL_HOOK",
}

Definition at line 1126 of file spy.c.

Referenced by SPY_GetMsgInternal().