|
|
1.1 root 1:
2: /******************************************************************************\
3: * This is a part of the Microsoft Source Code Samples.
4: * Copyright (C) 1993 Microsoft Corporation.
5: * All rights reserved.
6: * This source code is only intended as a supplement to
7: * Microsoft Development Tools and/or WinHelp documentation.
8: * See these sources for detailed information regarding the
9: * Microsoft samples programs.
10: \******************************************************************************/
11:
12: /*----------------------------------------------------------------------------
13: *| hook.h - Windows message spy application |
14: | |
15: \*----------------------------------------------------------------------------*/
16:
17: #define PUBLIC
18: #if !DBG
19: #define PRIVATE static
20: #else
21: #define PRIVATE
22: #endif
23:
24: // special hwnds for the hooks to recognize
25: #define HWND_ALL ((HWND)0xffffffff)
26: #define HWND_NULL ((HWND)0L)
27:
28: #define SPYAPPNAME "Spy"
29: #define SPYCLASSNAME "Spy Class"
30: #define HOOKWINDOWNAME "SpyHookWindow"
31: #define HOOKWINDOWCLASS "SpyHookClass"
32:
33:
34: //
35: // Structure that contains the spy message data sent from the hook
36: // to the spy app to display. The hwnd is sent using wParam of
37: // the WM_COPYDATA message, and the message number is in the dwData
38: // field of the COPYDATASTRUCT. This structure allows the wParam,
39: // lParam and any optional extra data to be passed across.
40: //
41: typedef struct
42: {
43: WPARAM wParam;
44: LPARAM lParam;
45: BYTE ExtraData[64];
46: } SPYMSGDATA, *PSPYMSGDATA;
47:
48:
49: LRESULT CALLBACK SpyGetMsgProc(INT hc, WPARAM wParam, LPARAM lParam);
50: LRESULT CALLBACK SpyCallWndProc(INT hc, WPARAM wParam, LPARAM lParam);
51:
52:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.