home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / samples / mm / mcispy / mcispy.ipf < prev    next >
Text File  |  1999-05-11  |  11KB  |  191 lines

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