home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / PMDEBUG.ZIP / PMDEBUG.TXT < prev    next >
Text File  |  1990-03-05  |  3KB  |  71 lines

  1. PMDEBUG
  2. -------
  3.  
  4. PMDEBUG is a program which collects queue input and writes it to its main 
  5. window on a TTY style basis. The program is a PM program, but the collection 
  6. of queue messages is not PM dependant, so logging much debug information 
  7. won't block the message passing within the PM. The program has two functions:
  8.  
  9. debug_puts(char *txt)
  10.  
  11. A function like puts() to stdout, just puts TTY like output to the PMDEBUG 
  12. window, which acts as stdout. This function can be used by any OS/2 program, 
  13. PM or non-PM.
  14. In the TEST.C sample program is an example in which printf() is to be 
  15. rerouted to the PMDEBUG window. This also works under non-PM programs.
  16.  
  17. debug_logmessage(HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2, char far *txt)
  18.  
  19. This function is useful to examine which messages there are actually passing 
  20. to your PM program. The TXT parameter can just be used for comment.
  21.  
  22. These functions just use DosOpenQueue() and when this function fails (PMDEBUG 
  23. is not loaded) it returns immediately to the caller.
  24. Otherwise it creates a shared memory segment available to the server 
  25. (PMDEBUG) and performs DosWriteQueue(). This is considerably less 
  26. time-consuming than message passing by WinSendMsg() and is available to
  27. non-PM programs too. PMDEBUG performs a DosReadQueue() with wait in a
  28. separate thread, so its window procedure only repaints and waits for 
  29. keyboard/mouse input.
  30. The entire screen is saved in a buffer, so maximizing the window will show 
  31. the last page.
  32. PMDEBUG also logs all incoming text to a file called LO. The filename can be 
  33. changed.
  34. Keyboard Input :
  35.  
  36. d   deletes the current log file.
  37. l   turns loggin off and on, when turned on, output will be appended to the
  38.     current log file.
  39. F1 or ?
  40.     shows a little help box
  41. F3 or Ctrl-C 
  42.     exits PMDEBUG.
  43.  
  44. Command line switches:
  45.  
  46. PMDEBUG -1 loads small (6x8 pixels) font.
  47. PMDEBUG -f <file> logs to <file> rather than LO.
  48.  
  49. The file SEEFONTS.DLL provides two fonts because the fonts provided with PM 
  50. are too large to get much information on a 'normal' VGA screen and are only 
  51. useful on a 800x600 or higher resolution screen.
  52.  
  53. The routine PMDEBFUN.C contains code which you should add to your program to 
  54. enable debug output to the PMDEBUG window. The program TEST is a sample PM
  55. program which printf-s to PMDEBUG.
  56.  
  57. Another feature of PMDEBUG:
  58. It uses a color icon instead of a normal monochrome PM icon in OS/2 1.1. The
  59. code for it is in PMDEBUG.C.
  60.  
  61. PMDEBUG is made by:
  62. Klaas van Ditzhuyzen (colleague of MARTIN VERMEER (# /839)
  63. DATAD Telecomm Products
  64. P.O. Box 371
  65. Veenendaal Holland 
  66. +31 8385 33400
  67.  
  68. For suggestions (or bugs):
  69. Contact MARTIN VERMEER (/839 ) on MAGNUM BBS:
  70.  (805) 581-1275
  71.