VITD: A VxD that Simulates an Interval Timer Device
VITD, the virtual interval timer device, is a VxD that creates an "interval timer"--a non-existent piece of hardware that enables programs to measure elapsed CPU time in a virtual machine. Applications communicate with VITD the same way they communicate with real hardware timers: through I/O ports.
VITD uses the following virtual machine manager (VMM) and virtual timer device (VTD) services:
_Allocate_Device_CB_Area
Fatal_Memory_Error
Install_Mult_IO_Handlers
Get_VM_Exec_Time
Set_VM_Time_Out
Cancel_Time_Out
Get_VM_Exec_Time
Call_Priority_VM_Event
Begin_Nest_Exec
End_Nest_Exec
Exec_Int
VTD_Get_Interrupt_Period
VTD_Begin_Min_Int_Period
VTD_End_Min_Int_Period
VTD_Get_Version
VTD_Get_Interrupt_Period
To use VITD, add the following line to the [386Enh] section of your SYSTEM.INI file:
DEVICE=VITD.386
Place VITD.386 in your Windows SYSTEM directory. Restart Microsoft(R) Windows(TM), and then create an MS-DOS virtual machine (VM). Inside the VM, run SAMPLE.EXE to set up an interval timer, run GETCOUNT.EXE to report the current interval timer count, and run DOSIT.EXE to register an interval timer interrupt handler that will start an interval timer. Wait until an interval timer interrupt occurs.
The interrupt usage, I/O addresses, status bits, and overall functioning of VITD is documented in the ITIMER.INC header file and the VITD.ASM source file. 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."
VITD was built and tested under Microsoft Windows version 3.1.
{ewc navigate.dll, ewbutton, /Bcodeview /T"Click to open or copy files in the vitd 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.