How to Monitor or Intercept COMM Data Traffic in Windows 95

Last reviewed: August 5, 1996
Article ID: Q141230
The information in this article applies to:
  • Microsoft Win32 Device Development Kit (DDK) for Windows 95

SUMMARY

In Windows 95, you may sometimes want to set up a way to intercept all COMM data passing from any application to and from the hardware in use. Generally, not all traffic is successfully caught.

MORE INFORMATION

There are five basic ways data and control is passed to VCOMM/COMBUFF:

  • Exported protected mode API.
  • VCOMM_WRITE_COMM VxD calls used with helper VxD's - 16-bit or 32-bit applications.
  • DeviceIOControl for 32-bit applications.
  • int 2F calls used with USER/COMM.DRV - 16-bit applications.
  • COMMBUFF for MS-DOS VMs bypasses VCOMM altogether - MS-DOS-based applications

If you are only hooking one of these, you will eventually miss data in some application. The INT 2F and COMBUFF are not completely publically documented, so it isn't a simple job to monitor all data. The best way to intercept COMM data is to create a miniport driver (see Vcomm.doc and serial sample and Msports.inf) that would require its own enumerator (static VxD) to register the miniport with VCOMM. The miniport would receive the traffic and, on its own, open the actual port to relay through traffic.

A second solution is to register your custom port driver alone and have it talk directly to the hardware.

A third solution is to write your own version of Serial.vxd, name it something different (required) and write an .inf to install it.


Additional reference words: 4.00
KBCategory: kbgraphic kbhowto kbwebcontent
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 5, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.