VMIOD: A VxD that Monitors I/O Traffic on a Port
VMIOD, the virtual monitor I/O device, is a VxD that demonstrates how to call the Install_IO_Handler service to monitor I/O traffic on a port. Although most VxDs that use this service are designed to virtualize the I/O port, this VxD only monitors the port and writes to a secondary monitor to display the port activity.
Warning: The Microsoft(R) Windows(TM) operating system will allow only one I/O handler per port. This means that you can't install an I/O handler on a port that is already trapped in the system. Most of the hardware devices that Windows knows about (keyboard, timer, video) are trapped ports, and thus cannot be monitored by this VxD. For a simple demonstration of VMIOD, try 3F5, a floppy controller port. This port was untrapped in the retail release of Windows versions 3.0 and 3.1.
VMIOD only demonstrates I/O port trapping, not IRQ handling. See the VMIRQD sample for more information on working with IRQs.
You must have a secondary (monochrome) monitor on your system to use VMIOD. To install the VxD, place the following lines in the [386Enh] section of your SYSTEM.INI file:
DEBUGMONO=TRUE
VMIOD_Port=nnnn
DEVICE=VMIOD.386
where “nnnn” is the hex I/O port number to monitor.
VMIOD6 uses the following virtual machine manager (VMM) services:
Get_Profile_Hex_Int
Install_IO_Handler
Clear_Mono_Screen
Set_Mono_Cur_Pos
Out_Mono_String
This sample code requires special VxD tools and include files; see the "VxD Tools" and "VxD Include Files" abstracts to copy these files to your development system. For more information on using the Microsoft Windows version 3.1 Device Driver Kit (DDK) files included on this CD, read the technical article "The VxD-Lite Mini-DDK." For more information on virtual device programming, see the DDK "Virtual Device Adaptation Guide."
VMIOD.386 was built and tested under Microsoft Windows version 3.1.
{ewc navigate.dll, ewbutton, /Bcodeview /T"Click to open or copy files in the vmiod project." /C"samples}
THIS TOOL IS NOT SUPPORTED BY MICROSOFT CORPORATION. IT IS PROVIDED "AS IS" BECAUSE WE BELIEVE IT MAY BE USEFUL TO YOU. PLEASE DO NOT CONTACT MICROSOFT PRODUCT SUPPORT SERVICES FOR SUPPORT OR ASSISTANCE SHOULD YOU HAVE PROBLEMS USING THIS TOOL.
READ THE ASSOCIATED DOCUMENTATION, IF ANY, REGARDING THIS TOOL PRIOR TO USING. ANY USE BY YOU OF THE TOOL IS AT YOUR OWN RISK. THE TOOL IS PROVIDED FOR USE "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.