home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / SPY4V12.ZIP / SPY.HLP (.txt) < prev    next >
OS/2 Help File  |  1989-11-16  |  16KB  |  545 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. About Spy ΓòÉΓòÉΓòÉ
  3.  
  4. Spy is a debugging tool who's  main purpose, is to display the window messages 
  5. that are sent to one or more windows. 
  6.  
  7. Spy watches the messages that a window receives by hooking the the HK_INPUT and 
  8. HK_SENDMSG hooks 
  9.  
  10. In addition to displaying the messages that are sent to windows, spy also 
  11. allows you to display information about windows, queues, accelerator tables. 
  12. Spy also provides a way to convert addresses into symbolic names. 
  13.  
  14. See Display Format for the message display format. 
  15.  
  16.  
  17. ΓòÉΓòÉΓòÉ 2. Message Display Format ΓòÉΓòÉΓòÉ
  18.  
  19. This section describes the format of how the messages are displayed. The 
  20. begining of each line, is common to all messages, regardless of which message 
  21. it is.  The first two characters, shows the origins of the message as follow: 
  22.  
  23.  I: - Input hook and the message is removed (WinGetMsg, or WinPeekMsg with 
  24.  PM_REMOVE) 
  25.  I- - Input hook no remove (WinPeekMsg with PM_NOREMOVE) 
  26.  S: - Send message hook, and the message was sent from the same thread. 
  27.  S* - Send message hook, and the message was sent from a different thread or 
  28.  process. 
  29.  
  30.  Following the message prefix, is the alphabetical name of the message, that 
  31.  was sent or posted, followed, by the window handle (H:) the message was sent 
  32.  or posted to.  The remaing fields depends on which type of message is being 
  33.  displayed. 
  34.  
  35.  
  36. ΓòÉΓòÉΓòÉ 3. Help for Keys ΓòÉΓòÉΓòÉ
  37.  
  38. ***** To Be Filled in ***** 
  39.  
  40.  
  41. ΓòÉΓòÉΓòÉ 4. Help for Message List ΓòÉΓòÉΓòÉ
  42.  
  43. This command allows you to be selective about which messages, you wish to 
  44. monitor. 
  45.  
  46. The dialog contains the following fields: 
  47.  
  48. Message: - Displays the current message from the list box, and also allows you 
  49. to directly enter a message.  You may enter the message in Hexidecimal, 
  50. Decimal, or by name. 
  51.  
  52. Message List - The list box contains most of the know messages. The messages 
  53. may either be displayed in numerical order, or in alphabetical order. 
  54.  
  55. All - Selects all messages in the list. 
  56.  
  57. None - Deslects all messages in the list. 
  58.  
  59. Char On - Selects all WM_CHAR type messages. 
  60.  
  61. Char Off - Deselect all WM_CHAR type messages. 
  62.  
  63. Mouse ON - Selects all messages that are mouse related. 
  64.  
  65. Mouse Off - Deselects all messages that are mouse related. 
  66.  
  67. Freq On - Selects some messages, that happen often, and that we usually do not 
  68. wish to monitor, such as WM_HITTEST. 
  69.  
  70. Freq Off - Deselects the messages, that happen often and that we usually do not 
  71. wish to monitor, such as WM_HITTEST. 
  72.  
  73. Input Hook - Should we monitor the input hook? 
  74.  
  75. SendMsg Hook - Should we monitor the Send Message Hook? 
  76.  
  77. Display undefined msg - Do you want all of the messages that are not defined in 
  78. this table to be monitored or not.  Usually these messages are the messages 
  79. that are above WM_USER. 
  80.  
  81. Ok - Dismiss the dialog, and update our table with the new message selections. 
  82.  
  83. Cancel - Dismiss the dialog without updating our tables. 
  84.  
  85.  
  86. ΓòÉΓòÉΓòÉ 5. Help for Output ΓòÉΓòÉΓòÉ
  87.  
  88. ***** To Be Filled in ***** 
  89.  
  90.  
  91. ΓòÉΓòÉΓòÉ 6. Help for Window List ΓòÉΓòÉΓòÉ
  92.  
  93. This command displays a list box of all of the windows that are currently 
  94. defined on the system.  You can select one or more windows from this list to 
  95. monitor the messages for.  The items in this list are displayed in the format: 
  96. xxxx(n) - ID: iii, where the xxxx is the hexidecimal value of the low word of 
  97. the window handle, (n) is the level number.  The level numbers are the number 
  98. of layers deep we are from HWND_DESKTOP (or HWND_OBJECT).  A level 3 window is 
  99. a child of a level 2 window, etc. 
  100.  
  101. The Window Handle: field, displays the complete window handle, it also allows 
  102. you to enter one manually.  The entered value, can be either in hexidecimal or 
  103. decimal. 
  104.  
  105. The OK Push Button - Will exit the dialog and update Spy's internal list of 
  106. which windows to monitor windows for. 
  107.  
  108. The CancelPush Button - Will exit the dialog without updating. 
  109.  
  110. The All Push Button - Selects all of the windows in the list. 
  111.  
  112. The None Push Button - Deselect all of the windows in the list. 
  113.  
  114. The Mouse Push Button - Captures the mouse, and waits for you to click the 
  115. mouse over a window.  While the mouse button is down, the window information on 
  116. the right hand side of the dialog is updated to show information about the 
  117. window, that the mouse is currently over.  If the Control key is down, the code 
  118. will walk up the parent chain to find a frame window. 
  119.  
  120.  
  121. ΓòÉΓòÉΓòÉ 7. Help for Save List ΓòÉΓòÉΓòÉ
  122.  
  123. Will save the contents of the spy main window (listbox) to a file. 
  124.  
  125. A dialog is displayed that will prompt you for the name of the output file, and 
  126. whether the information should be appended to the specified file, or should 
  127. overwrite the file. 
  128.  
  129.  
  130. ΓòÉΓòÉΓòÉ 8. Help for About ΓòÉΓòÉΓòÉ
  131.  
  132. Displays information about help... 
  133.  
  134.  
  135. ΓòÉΓòÉΓòÉ 9. Help for List Near Symbol ΓòÉΓòÉΓòÉ
  136.  
  137. The List Near Symbol command provides a way to convert addresses to symbol 
  138. names.  The symbolic names can only be generated, if you have .SYM files for 
  139. the program or DLL, which contains the address. 
  140.  
  141. The dialog that is displayed is non-modal, which allows you to open it, and use 
  142. it to throughout your spy session. 
  143.  
  144. The PID: field is used, to select a different process to look at symbols for. 
  145. If the symbols are contained in a DLL, you can normally just leave this field 
  146. alone, as the address is constant for all processes.  If the desired address is 
  147. contained in a EXE file (example 47:1234), you need set this value to the 
  148. appropriate process number. 
  149.  
  150. Address: field is where you enter desired address. 
  151.  
  152.  
  153. ΓòÉΓòÉΓòÉ 10. Help for Spy Message Queues ΓòÉΓòÉΓòÉ
  154.  
  155. This command displays a list box of all of the message queues that are 
  156. currently defined on the system.  You can select one or more queues from this 
  157. list to monitor the messages for. 
  158.  
  159. The ability for selecting message queues is important, when you need to monitor 
  160. messages that are sent during the creation process of the window. 
  161.  
  162. The Left hand side contains a listbox, which contains an entry for each of the 
  163. message queues that existed, when the command was selected. 
  164.  
  165. The Hmq: field, displays the complete handle to the message queue, it also 
  166. allows you to enter one manually. The entered value, can be either in 
  167. hexidecimal or decimal. 
  168.  
  169. The OK Push Button - Will exit the dialog and update Spy's internal list of 
  170. message queues to monitor messages for. 
  171.  
  172. The CancelPush Button - Will exit the dialog without updating. 
  173.  
  174. The All Push Button - Selects all of the message queues in the list. 
  175.  
  176. The None Push Button - Deselect all of the message queues in the list. 
  177.  
  178. The Mouse Push Button - Captures the mouse, and waits for you to click the 
  179. mouse over a window.  While the mouse button is down, the queue information on 
  180. the right hand side of the dialog is updated to show information about the 
  181. message queue of the window, that the mouse is currently over. 
  182.  
  183.  
  184. ΓòÉΓòÉΓòÉ 11. Help for Spy Send Message ΓòÉΓòÉΓòÉ
  185.  
  186. This command allows you to send or post messages to windows, on the screen. 
  187.  
  188. This dialog has the following fields: 
  189.  
  190. The Window Handle: field, allows you to manually enter the window handle, that 
  191. you wish to send or post a message to. 
  192.  
  193. The Point at Hwnd field allows you to select the window using the mouse. 
  194.  
  195. The Message: field, is where you enter the message value that is sent/posted to 
  196. specified window.  This value can be entered in Hex (0x4096), Decimal(1024), or 
  197. by Message name (WM_QUIT). 
  198.  
  199. The MParam1 and MParam2 fields allow you to enter the value of mp1 and mp2, 
  200. that is sent to the destination window.  This value again, can be entered in 
  201. hex or decimal.  In addition, if you specify, the value &1, this value will be 
  202. filled in with the address of String1 and likewise for &2. 
  203.  
  204. The Post Message button, will post the message to the specified window.  The 
  205. status of the post will be displayed in the Result field. 
  206.  
  207. The Send Message button, will send the message to the specified window.  The 
  208. result returned from the destination window procedure will be displayed in the 
  209. Result field. 
  210.  
  211. The Cancel button, will exit the dialog. 
  212.  
  213.  
  214. ΓòÉΓòÉΓòÉ 12. Help for Spy Menu ΓòÉΓòÉΓòÉ
  215.  
  216. ***** To Be Filled in ***** 
  217.  
  218.  
  219. ΓòÉΓòÉΓòÉ 13. Help for Windows Menu ΓòÉΓòÉΓòÉ
  220.  
  221. ***** To Be Filled in ***** 
  222.  
  223.  
  224. ΓòÉΓòÉΓòÉ 14. Help for Window Select Sub-Menu ΓòÉΓòÉΓòÉ
  225.  
  226. ***** To Be Filled in ***** 
  227.  
  228.  
  229. ΓòÉΓòÉΓòÉ 15. Help for Window Dump Sub-Menu ΓòÉΓòÉΓòÉ
  230.  
  231. ***** To Be Filled in ***** 
  232.  
  233.  
  234. ΓòÉΓòÉΓòÉ 16. Help for Messages Menu ΓòÉΓòÉΓòÉ
  235.  
  236. ***** To Be Filled in ***** 
  237.  
  238.  
  239. ΓòÉΓòÉΓòÉ 17. Help for Hooks Menu ΓòÉΓòÉΓòÉ
  240.  
  241. ***** To Be Filled in ***** 
  242.  
  243.  
  244. ΓòÉΓòÉΓòÉ 18. Help for Hooks Send Message Output Sub-Menu ΓòÉΓòÉΓòÉ
  245.  
  246. ***** To Be Filled in ***** 
  247.  
  248.  
  249. ΓòÉΓòÉΓòÉ 19. Help for Outputs Menu ΓòÉΓòÉΓòÉ
  250.  
  251. ***** To Be Filled in ***** 
  252.  
  253.  
  254. ΓòÉΓòÉΓòÉ 20. Help for Help Menu ΓòÉΓòÉΓòÉ
  255.  
  256. ***** To Be Filled in ***** 
  257.  
  258.  
  259. ΓòÉΓòÉΓòÉ 21. Help for Active ΓòÉΓòÉΓòÉ
  260.  
  261. The Active menu item is a toggle, that allows you to turn Spy on or off. 
  262.  
  263.  
  264. ΓòÉΓòÉΓòÉ 22. Help for Exit ΓòÉΓòÉΓòÉ
  265.  
  266. This command will cause spy to terminate. 
  267.  
  268.  
  269. ΓòÉΓòÉΓòÉ 23. Help for Clear Window ΓòÉΓòÉΓòÉ
  270.  
  271. This command will cause the contents of the main spy window to be erased. 
  272.  
  273.  
  274. ΓòÉΓòÉΓòÉ 24. Help for Save Window ΓòÉΓòÉΓòÉ
  275.  
  276. Will save the contents of the spy main window (listbox) to a file. 
  277.  
  278. A dialog is displayed that will prompt you for the name of the output file, and 
  279. whether the information should be appended to the specified file, or should 
  280. overwrite the file. 
  281.  
  282.  
  283. ΓòÉΓòÉΓòÉ 25. Help for Save Options ΓòÉΓòÉΓòÉ
  284.  
  285. The save options command saves some of your preferences to OS2.INI, which will 
  286. be used the next time spy is executed. 
  287.  
  288. The saved options include: 
  289.  
  290. Outputs - File, Debug Terminal, and/or Screen 
  291.  
  292. Hooks - Input, Send Message, ... 
  293.  
  294. Messages - Alphabetical Sort? 
  295.  
  296.  
  297. ΓòÉΓòÉΓòÉ 26. Help for List Near Symbol ΓòÉΓòÉΓòÉ
  298.  
  299. The List Near Symbol command provides a way to convert addresses to symbol 
  300. names.  The symbolic names can only be generated, if you have .SYM files for 
  301. the program or DLL, which contains the address. 
  302.  
  303. The dialog that is displayed is non-modal, which allows you to open it, and use 
  304. it to throughout your spy session. 
  305.  
  306.  
  307. ΓòÉΓòÉΓòÉ 27. Help for Windows List ΓòÉΓòÉΓòÉ
  308.  
  309. This command displays a list box of all of the windows that are currently 
  310. defined on the system.  You can select one or more windows from this list to 
  311. monitor the messages for. 
  312.  
  313. An addition to simply selecting files, this command also displays information 
  314. about the windows, such as the window class, ID, bounding rectangle, etc. 
  315.  
  316.  
  317. ΓòÉΓòÉΓòÉ 28. Help for Queues ΓòÉΓòÉΓòÉ
  318.  
  319. This command displays a list box of all of the message queues that are 
  320. currently defined on the system.  You can select one or more queues from this 
  321. list to monitor the messages for. 
  322.  
  323. The ability for selecting message queues is important, when you need to monitor 
  324. messages that are sent during the creation process of the window. 
  325.  
  326.  
  327. ΓòÉΓòÉΓòÉ 29. Help for Mouse Select ΓòÉΓòÉΓòÉ
  328.  
  329. This command allows you to select one window, to be added to the list of 
  330. windows, that spy will monitor the messages for. 
  331.  
  332. After selecting this command, simply move the mouse pointer over the desired 
  333. window, and press mouse button 1.  If the Control key is down, when you depress 
  334. mouse button 1, spy will walk up the window chain, until it finds a Frame 
  335. window (a window, whose window class has the CS_FRAME bit set). 
  336.  
  337.  
  338. ΓòÉΓòÉΓòÉ 30. Help for Mouse deselect ΓòÉΓòÉΓòÉ
  339.  
  340. This command allows you to use the mouse to remove one window, from the list of 
  341. windows, that spy will monitor the messages for. 
  342.  
  343. After selecting this command, simply move the mouse pointer over the desired 
  344. window, and press mouse button 1.  If the Control key is down, when you depress 
  345. mouse button 1, spy will walk up the window chain, until it finds a Frame 
  346. window (a window, whose window class has the CS_FRAME bit set). 
  347.  
  348.  
  349. ΓòÉΓòÉΓòÉ 31. Help for Select All Windows ΓòÉΓòÉΓòÉ
  350.  
  351. This command toggles on the All window state.  When the all window state is 
  352. selected, spy will monitor the messages going to all windows. 
  353.  
  354.  
  355. ΓòÉΓòÉΓòÉ 32. Help for Select All Frames ΓòÉΓòÉΓòÉ
  356.  
  357. This command toggles on the All window state.  When the all window state is 
  358. selected, spy will monitor the messages going to all frame windows. 
  359.  
  360. A Frame window is defined as a window who's window class is defined with the 
  361. CS_FRAME bit set). 
  362.  
  363.  
  364. ΓòÉΓòÉΓòÉ 33. Help for Dump One Window ΓòÉΓòÉΓòÉ
  365.  
  366. This command allows you to dump information about one window. The window is 
  367. selected with the mouse.  The dumped information contains: 
  368.  
  369.  H: - The window handle. 
  370.  P: - Parent window handle. 
  371.  C: - First child window handle. 
  372.  O: - Owner window handle. 
  373.  ID: - Window Identifier. 
  374.  MQ: - The handle to the message queue. 
  375.   (x1, y1) (x2, y2) - Coordinates of window. 
  376.  ST: - Window Style words. 
  377.  PID: - Process ID of the window. 
  378.  TID: - Thread ID of the window. 
  379.  PFN: - Pointer to window function. 
  380.  Cl: - Window Class name. 
  381.  xxxx xxxx  - Dump of extra window words. 
  382.  
  383.  
  384. ΓòÉΓòÉΓòÉ 34. Help for Dump All Windows ΓòÉΓòÉΓòÉ
  385.  
  386. Dumps information about all windows.  Warning, this can be a lengthy process, 
  387. unless your output is only going to a disk file. 
  388.  
  389. See Dump One Window for an explanation about the dump format. 
  390.  
  391.  
  392. ΓòÉΓòÉΓòÉ 35. Help for Dump Accel Table. ΓòÉΓòÉΓòÉ
  393.  
  394. This command allows you to display an accelerator table for one frame window. 
  395. After this command is selected, simply move the mouse over the desired frame 
  396. window, or one of it's decedents, and press mouse button 1.  The information 
  397. will be dumped to the current output devices. 
  398.  
  399. First a header line is displayed, which contains the following information: 
  400.  
  401.  HACCEL: - Handle to accelerator table. 
  402.  HWND: - Frame window handle. 
  403.  CP: - Which code page it is defined for. 
  404.  CNT: - Count of items in the accelerator table. 
  405.  
  406.  For each item in the accelerator table, a line of information will be 
  407.  displayed, which contains information like: 
  408.  
  409.  fs: - The AF_ bits are defined in pmwin.h. 
  410.  key: - Which key, may be Char, Virtual key, or Scan code. 
  411.  cmd: - Which command will be generated. 
  412.  
  413.  At the end of each of these lines, the FS field is broken up in to 
  414.  alphabetical names for each of the bits, the names are as follow: 
  415.  
  416.  CH - Use the Character. 
  417.  VK - Use the virtual key. 
  418.  SC - Use the Scan code. 
  419.  SHFT - Shift key must be depresed. 
  420.  CTRL - Control key must be depresed. 
  421.  ALT - Alt key must be depresed. 
  422.  LONE - Must be a lone key. 
  423.  SYS - Generate a WM_SYSCOMMAND message. 
  424.  HELP - Generate a WM_HELP message. 
  425.  
  426.  
  427. ΓòÉΓòÉΓòÉ 36. Help for Message List ΓòÉΓòÉΓòÉ
  428.  
  429. This command allows you to be selective about which messages, you wish to 
  430. monitor. 
  431.  
  432. A dialog will be displayed, which allows you to individually select the 
  433. messages, or classes of messages. 
  434.  
  435.  
  436. ΓòÉΓòÉΓòÉ 37. Help for Disable Message ΓòÉΓòÉΓòÉ
  437.  
  438. This command allows you to remove a message for the list of messages that are 
  439. currently being monitored.  This command will disable the message of the 
  440. currently selected line in the output listbox. 
  441.  
  442.  
  443. ΓòÉΓòÉΓòÉ 38. Help for Enable Message ΓòÉΓòÉΓòÉ
  444.  
  445. This command allows you to again monitor a message that was previously removed 
  446. using the Disable message command. 
  447.  
  448.  
  449. ΓòÉΓòÉΓòÉ 39. Help for Alpha Sort Message List ΓòÉΓòÉΓòÉ
  450.  
  451. This command is a toggle, which is used by the Message List dialog, to choose 
  452. if the messages should be displayed in numerical order, or in alphabetical 
  453. order. 
  454.  
  455.  
  456. ΓòÉΓòÉΓòÉ 40. Help for Send Message ΓòÉΓòÉΓòÉ
  457.  
  458. This command sends or posts messages to one or more windows. 
  459.  
  460.  
  461. ΓòÉΓòÉΓòÉ 41. Help for Input Hook ΓòÉΓòÉΓòÉ
  462.  
  463. This command toggles the state of whether to monitor the message that come in 
  464. the HK_INPUT hook or not. 
  465.  
  466.  
  467. ΓòÉΓòÉΓòÉ 42. Help for Send Message Hook ΓòÉΓòÉΓòÉ
  468.  
  469. This command toggles the state of whether to monitor the messages that come in 
  470. from the HK_SENDMSG hook or not. 
  471.  
  472.  
  473. ΓòÉΓòÉΓòÉ 43. Help for Send Message Extended Data ΓòÉΓòÉΓòÉ
  474.  
  475. This command toggles the state of whether we should display extended 
  476. information for messages that come in from the Send Message hook or not. 
  477.  
  478. The extended information may contain SWP structures, Rectangles, Queue 
  479. messages, etc.  See the Message format item for the formats of information. 
  480.  
  481.  
  482. ΓòÉΓòÉΓòÉ 44. Help for Send Message Call Stack ΓòÉΓòÉΓòÉ
  483.  
  484. This command toggles the state of whether we should dump stack information for 
  485. the commands that come back from the send message hook.  The stack information 
  486. includes: the process id(PID), the Thread ID(TID), and up to five address, of 
  487. where the Send message was called from. 
  488.  
  489.  
  490. ΓòÉΓòÉΓòÉ 45. Help for Output Screen Lines ΓòÉΓòÉΓòÉ
  491.  
  492. ***** To Be Filled in ***** 
  493.  
  494.  
  495. ΓòÉΓòÉΓòÉ 46. Help for Output Debug Terminal ΓòÉΓòÉΓòÉ
  496.  
  497. This command toggles the state of whether any displayed information should go 
  498. to the debug terminal or not. 
  499.  
  500. This command may depend of if you have a debugging version of OS2 or not, and 
  501. if you have added a /C1 or /C2 to the PMDD statement in config.sys, for Com1: 
  502. or Com2:.. 
  503.  
  504.  
  505. ΓòÉΓòÉΓòÉ 47. Help for Output File ΓòÉΓòÉΓòÉ
  506.  
  507. This command will toggle whetter outputs should go to an output file or not. 
  508. The name of the output file can be set, by the Outputs... command. 
  509.  
  510.  
  511. ΓòÉΓòÉΓòÉ 48. Help for Outputs ΓòÉΓòÉΓòÉ
  512.  
  513. This command toggles whetter output should go to the main spy window or not. 
  514.  
  515.  
  516. ΓòÉΓòÉΓòÉ 49. Help for How to Use Help ΓòÉΓòÉΓòÉ
  517.  
  518. Use this choice to find out what kind of help is available and how to use the 
  519. help that is available. 
  520.  
  521. In general, help is provided for every action bar choice, pull-down choice, and 
  522. other selections. 
  523.  
  524.  
  525. ΓòÉΓòÉΓòÉ 50. Help for Extended Help ΓòÉΓòÉΓòÉ
  526.  
  527. Extended help provides general information about the program you are using. 
  528.  
  529.  
  530. ΓòÉΓòÉΓòÉ 51. Help for Keys ΓòÉΓòÉΓòÉ
  531.  
  532. Use this choice to display a list of keys. 
  533.  
  534. The list of keys groups similar keys together so they are easier to find. 
  535.  
  536.  
  537. ΓòÉΓòÉΓòÉ 52. Help for Help Index ΓòÉΓòÉΓòÉ
  538.  
  539. The help index lists all of the titles of the help information that is 
  540. available. 
  541.  
  542.  
  543. ΓòÉΓòÉΓòÉ 53. Help for About. ΓòÉΓòÉΓòÉ
  544.  
  545. Use this choice to display the copyright information.