WPD API/DDI Traffic Monitor Tool

 

[This is preliminary documentation and subject to change.]

 

SUMMARY

 

The WpdMon.exe application allows developers to analyze the traffic between the WPD API and WPD Drivers, or between the WPD Drivers and their I/O stacks.  It also captures PnP arrival/removal notifications to help debug connectivity issues.

WpdMon is made up of two components:

·         A UI-less components which intercepts the relevant traffic.  This is known as the WpdMon Shim and must be installed while no WPD Devices are active on the system (otherwise a reboot will be required, since the components it hooks will be in use).

·         A UI component which parses and displays the traffic.  This is a standalone application which can simply be copied and run, and is called the WpdMon Application.

As well as capturing the WPD Api traffic, WpdMon also has a plug-in system, which facilitates the parsing of vendor-specific messages between the WPD driver and the I/O stack (i.e. the I/O send to/from the device).  Contact WpdInfo@microsoft.com if you require information on how to write your own plug-in.

 

To Install WpdMon:

 

  1. Ensure that all WPD devices are unplugged
  2. For 32-bit systems, copy the Shim DLL to the AppPatch directory (“copy WpdMonShim.dll %windir%\AppPatch”).  On 64-bit systems, copy the Shim DLL to the AppPatch64 directory (“copy WpdMonShim.dll %windir%\AppPatch\AppPatch64”)
  3. Register the shim (“Regsvr32 %windir%\AppPatch\WpdMonShim.dll” for 32-bit, or “Regsvr32 %windir%\AppPatch\AppPatch64\WpdMonShim.dll” for 64-bit)
  4. Plug WPD devices back in
  5. The WPD Monitor Application (WpdMon.exe) is now ready to capture WPD API/DDI traffic, and can be copied and run directly from any directory

 

To Run WpdMon:

 

  1. After installing WpdMonShim, run WpdMon.exe
  2. By default, WpdMon is set to capture WPD API traffic.  This can be changed by clicking on the “Monitor” menu, and selecting the appropriate Parser to activate.
  3. By default, WpdMon logs its output in RTF format to its main text window, as well as saving to a log file called “WpdMon.html”.   This behavior can be adjusted by clicking on the “Options” menu.

 

To Uninstall WpdMon:

 

  1. Ensure that all WPD devices are unplugged
  2. Unregister the shim (“Regsvr32 –u %windir%\AppPatch\WpdMonShim.dll” for 32-bit, or “Regsvr32 –u %windir%\AppPatch\AppPatch64\WpdMonShim.dll” for 64-bit)

 

 

© 2005 Microsoft Corporation