home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / samples / mm / mcispy / mcispy.hlp (.txt) < prev    next >
OS/2 Help File  |  1999-05-12  |  9KB  |  173 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Multimedia MCI Message Spy (MCISPY) ΓòÉΓòÉΓòÉ
  3.  
  4. The Multimedia MCI Message Spy (MCISPY) is a sample program that can be used to 
  5. monitor Media Control Interface (MCI) messages that are exchanged between 
  6. various devices in the OS/2 Multimedia subsystem. The application is used to 
  7. understand the device interactions to application requests in the MMPM/2 
  8. subsystem. In order to begin monitoring messages select Spy On pull down from 
  9. the menu bar and choose start spying. Messages will be intercepted only after 
  10. this choice is made. A description of how MCISPY traps MCI messages Follows. 
  11.  
  12.  
  13.  
  14.  
  15.                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  16.                         Γöé Shared Memory  Γöé
  17.                         Γöé  (Named)       Γöé
  18.                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  19.        APIs Exported    Γöé                Γöé                     Γöé              Γöé
  20.                         Γöé                Γöé                     Γöé  True MDM    Γöé
  21.                         Γöé  Stub or       Γöé                     Γöé  renamed     Γöé
  22.        mciSendCommand() Γöé  Proxy         Γöé Forwarder entry     Γöé  to MCI.DLL  Γöé
  23.        ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ  MDM.DLL       Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ containing   Γöé
  24.        mciSendString()  Γöé                Γöé Forwarder entry     Γöé the API      Γöé
  25.        ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ maintain Open  Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ workers.     Γöé
  26.        mdmDriverNotify()Γöé Device Ids     Γöé Forwarder entry     Γöé              Γöé
  27.        ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ              Γöé
  28.                         Γöé Notify Spy     Γöé                     Γöé              Γöé
  29.                         Γöé Application    Γöé                     Γöé              Γöé
  30.                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ                     ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  31.                        ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  32.                        Γöé Shared Memory   Γöé
  33.                        Γöé  (Named)        Γöé
  34.                        Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  35.                        Γöé                 Γöé
  36.                        Γöé  MCISPY         Γöé
  37.                        Γöé  Application    Γöé
  38.                        Γöé                 Γöé
  39.                        Γöé                 Γöé
  40.                        Γöé                 Γöé
  41.                        ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  42.  
  43. MDM and MCI Message monitoring application interaction.
  44.  
  45. The above diagram depicts a high level view of how MCI messages are monitored. 
  46. MDM is the MCI interface provider. The MCISPY application comprises of an EXE 
  47. (MCISPY.EXE) and a corresponding DLL pair. The above diagram depicts the MCISPY 
  48. application implementation model. The diagram shows a stub or proxy DLL which 
  49. replaces the true MDM.DLL renaming existing MDM to MCI. The proxy MDM exports 
  50. the same APIs at the same ordinals as true MDM. The stub or proxy MDM has 
  51. forwarder entries into the true MDM (renamed to MCI.DLL) for API workers, ie it 
  52. exports the APIs and also imports the same APIs from the true MDM. 
  53.  
  54. MCISPY monitors both the MCI string interface and the MCI command interface. 
  55. The display consits of originating Process ID (PID), device Id, MCI message 
  56. Flags, User parameter and Data. The above fields are displayed for the MCI 
  57. command interface. For the string interface the PID and the string input is 
  58. displayed. 
  59.  
  60. The MCISPY application has 5 groups of possible user actions provided for by 
  61. the application. The user menu has the following groups of choices. Logfile 
  62. enables the user to select a logfile to log the displayed messages. The menubar 
  63. pull down choice Enable message Logging item must be selected to turn on 
  64. message logging. The Edit group of menu permit editing operations on the 
  65. displayed screen contents. Copy,Delete,Discard, and Font operations on the 
  66. application screen contents are permitted. The View permits viewing of 
  67. installed multimedia devices in the system and also provides a simple MCI Flag 
  68. parser. The user enters the Flag value (in hex) and selects a MCI message and 
  69. the parser displays what the flag combination is. The Filter pulldown has 
  70. various means by which messages can be filtered. The Disable choices (String 
  71. Interface,Command Interface, and Driver Notifications) respectively filter 
  72. inputs from the above APIs. Filtering by MCI Messages is permitted. If MCI_OPEN 
  73. is filtered then the application will not see MCI_OPEN messages at all till it 
  74. is turned of. To turn off reinvoke the Filter by Messages choice and select or 
  75. deslect the message. Filter by Device types allows a device type filter which 
  76. behaves similarly. Filtering by active device Ids is also permitted. There are 
  77. provisions to disable frequently occurring timer messages like 
  78. MCI_SETPOSITION_ADVISE. MCISPY also displays error return codes as they occur. 
  79.  
  80. To enable logging of messages to a file select enable message logging from the 
  81. menu bar under LogFile. Messages will be written to the default log file 
  82. "MCISPY.LOG". Select Open to specify a different log file. 
  83.  
  84. The Edit choices are intended for clearing messages on the screen and other 
  85. related operations. Copy is supported. Clear All clears all displayed messages. 
  86. Select text first before copying. Set font sets the window font. 
  87.  
  88.  
  89. ΓòÉΓòÉΓòÉ 2. Help for MCISPY Keys ΓòÉΓòÉΓòÉ
  90.  
  91. The following keys can be used to control the MCISPY App 
  92.  
  93.  Alt+L     Select LogFile from menu bar. 
  94.  
  95.  Alt+E     Select Edit from menu bar. 
  96.  
  97.  Alt+V     Select View from menu bar. 
  98.  
  99.  Alt+F     Select Filter from menu bar. 
  100.  
  101.  Alt+H     Select Help from menu bar. 
  102.  
  103.  
  104. ΓòÉΓòÉΓòÉ 3. MCISPY Filter MCI Messages ΓòÉΓòÉΓòÉ
  105.  
  106. You can filter or exclude messages you do not want to see. The list box 
  107. contains the list of all Multimedia MCI messages. You can select the message(s) 
  108. you want to exclude(not displayed) and select the "OK" pushbutton. 
  109.  
  110. Initially no message filter is in effect and hence all MCI messages are 
  111. displayed. The "All" pushbutton selects all items in the listbox. The "None" 
  112. pushbutton deselects all items in the listbox. The "Timer on" pushbutton 
  113. selects the timer messages like MM_MCIPOSITIONCHANGE. The "Timer Off" 
  114. pushbutton deselects the timer messages. the "Actions On" pushbutton selects 
  115. the MCI Actions group of messages like MCI_PLAY, MCI_RECORD, MCI_PAUSE, 
  116. MCI_RESUME, MCI_SEEK, and MCI_STOP. The 'Actions Off" pushbutton deselects the 
  117. actions group. To cancel any existing message filter in effect invoke the 
  118. dialog again and exit making a new selection or without selecting anything. All 
  119. Internal Filter members for the particular type are reset on entry to the 
  120. dialog. 
  121.  
  122.  
  123. ΓòÉΓòÉΓòÉ 4. MCISPY Device Type Filter ΓòÉΓòÉΓòÉ
  124.  
  125. You can filter or exclude messages you do not want to see for a particular 
  126. device. If the device type filter is in effect for a particular device you will 
  127. not see any messages (including String interface) for that device. CAVEAT If 
  128. the device was automatically opened by using an element to identify the device 
  129. then the filtering may not work. list box contains the list of all Multimedia 
  130. device types . You can select the device you want to exclude(not displayed) and 
  131. select the "OK" pushbutton. To cancel any existing device type filter invoke 
  132. the dialog again and exit without choosing anything. 
  133.  
  134.  
  135. ΓòÉΓòÉΓòÉ 5. MCISPY Device Id  or Alias Filter ΓòÉΓòÉΓòÉ
  136.  
  137. You can filter or exclude messages you do not want to see for a particular 
  138. device Id or alias. If the device Id filter is in effect for a particular 
  139. device Id you will not see any messages for that device id or alias. CAVEAT If 
  140. the device was automatically opened by using an element to identify the device 
  141. then the filtering may not work. list box contains the list of all Multimedia 
  142. device Id(s) and alias(es) currently open . You can select the device Id or 
  143. alias you want to exclude(not displayed) and select the "OK" pushbutton. To 
  144. cancel any existing device Id or alias filter invoke the dialog again and exit 
  145. without choosing anything or something else. 
  146.  
  147.  
  148. ΓòÉΓòÉΓòÉ 6. MCISPY Display MCI Flag values ΓòÉΓòÉΓòÉ
  149.  
  150. MCISPY Displays Flag values in hex as seen by the mciSendCommand interface. For 
  151. certain predetermined messages you can see the textual representation of the 
  152. hex value. For example on MCI_ACQUIRE message a flag value of 102(hex) means 
  153. MCI_EXCLUSIVE and MCI_WAIT. Enter the value of the flag in the entry field at 
  154. the top (in hex). Select the message for which the flag value was used. Select 
  155. Display to display the flag values in the Results list box. Use Clear to clear 
  156. the contents of the Results List box. To dismiss dialog select cancel In order 
  157. to add additional messages and flag values modify the source code provided. 
  158.  
  159.  
  160. ΓòÉΓòÉΓòÉ 7. MCISPY View Installed Multimedia Devices ΓòÉΓòÉΓòÉ
  161.  
  162. This dialog displays all the installed multimedia devices in the system. The 
  163. display includes logical device, physical device and product information 
  164. associated with each device. 
  165.  
  166.  
  167. ΓòÉΓòÉΓòÉ 8. MCISPY Open Log File ΓòÉΓòÉΓòÉ
  168.  
  169. You can open a Log file on any drive or in any directory by using this dialog. 
  170. Opening of the Log file merely provides a file name to the application. 
  171. Subsequently if logging is enabled all messages will be logged to the file just 
  172. opened. The default Log file is MCISPY.LOG in the current directory. Select OK 
  173. to dismiss the dialog.