|
|
1.1 root 1: /* Maximum HWNDS, we will watch */
2: #define MAXHWNDS 100
3: #define MAXMSGCNT 50 /* size of Message queue */
4: #define MAXSTRACE 5 /* Max number of levels we will traceback */
5: #define CALLSTOSKIP 3 /* How many levels of calls to skip */
6:
7: /*
8: * Define message structure for spy to hold
9: */
10: typedef struct _QMSGSPY {
11: USHORT fs; /* Flags */
12: QMSG qmsg; /* The message */
13: BOOL fMP1Valid; /* Is the extra bytes valid? */
14: SHORT cbDataMP1; /* Num extra bytes of information for MP1 */
15: BOOL fMP2Valid; /* Is the extra bytes valid? */
16: SHORT cbDataMP2; /* Num extra bytes of information for MP2 */
17: PID pidSend; /* Process ID of the sender */
18: TID tidSend; /* Thread ID of the sender */
19: UCHAR *rgData; /* Pointer to additional information for message */
20: UCHAR bMPType; /* Type of message information retrieved */
21: } QMSGSPY;
22:
23: typedef QMSGSPY *PQMSGSPY;
24:
25:
26: /* Define the HOOKS options word bits */
27: #define SPYH_INPUT 0x0001
28: #define SPYH_SENDMSG 0x0002
29: #define SPYH_JOURNALR 0x0004
30:
31: /*
32: * Define the types of data that the hook will return for message types
33: * Note: We have a max of 8 types each for MP1 and MP2 and that currently
34: * can be defined with a Byte for each message
35: */
36: #define MPT_NORMAL 0x00
37: #define MPT_SWP 0x01
38: #define MPT_RECTL 0x02
39: #define MPT_WNDPRMS 0x03
40: #define MPT_QMSG 0x04
41: #define MP_ENABLED 0x80
42:
43: #define MP_MASK 0x07
44:
45: #define MPTS(mp1,mp2) ((UCHAR)mp2 << 3 | (UCHAR)mp1)
46:
47:
48: /*
49: ** The value 0x300 is the last+1 message number used by PMWIN for
50: ** it's private use.
51: */
52: #define MAXMSGFILTER 0x0300
53: #define MAXMSGFILTERBYTES 0x0300
54: /*
55: ** Private pmwin message used to get the current task's focus
56: */
57: #define WM_QUERYTASKFOCUS 0x0058
58:
59: /* SPYHOOK library API functions */
60: BOOL EXPENTRY SpyInitializeHook (void);
61: BOOL EXPENTRY SpyTerminateHook (void);
62: BOOL EXPENTRY SpyInstallHook( HAB, HMQ, USHORT);
63: BOOL EXPENTRY SpyReleaseHook( BOOL );
64: BOOL EXPENTRY SpyHookOnOrOff( BOOL);
65: BOOL EXPENTRY SpySetWindowList(SHORT, HWND *);
66: SHORT EXPENTRY SpyGetWindowList(SHORT, HWND *);
67: BOOL EXPENTRY SpySetQueueList(SHORT, HMQ *);
68: SHORT EXPENTRY SpyGetQueueList(SHORT, HMQ *);
69: BOOL EXPENTRY SpySetMessageList(UCHAR *, BOOL);
70: BOOL EXPENTRY SpyFWindowInList(HWND, BOOL);
71: BOOL EXPENTRY SpySetAllFrameOpt(BOOL);
72: BOOL EXPENTRY SpySetAllWindowOpt (BOOL);
73:
74: BOOL EXPENTRY SpyGetNextMessage(PQMSGSPY, PSZ, SHORT, LONG);
75:
76: /* API's For trying to get info symbol information from other PID */
77: // Define some PID Intersept types
78: typedef struct _pit {
79: PID pid; // Which process are we trying to trap on
80: USHORT usPIT; // What type of data are we looking for
81: ULONG ulInfo; // Pointer for data to look for;
82: char *pvoidData; // Pointer to information found;
83: USHORT cbData; // Number of bytes found;
84: MRESULT mresult; // result of call;
85: } PIT;
86:
87: #define PIT_SYMBOL 1 /* Get symbol information */
88: #define PIT_ACCEL 2 /* Get Accelerator table information */
89: BOOL EXPENTRY SpySetPIDIntercept(PID, USHORT, ULONG);
90: USHORT EXPENTRY SpyGetPIDInterceptData(PVOID, USHORT, PMRESULT);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.