Many virtual devices are written to replace one of the standard virtual devices, that is, one of the virtual devices provided with the Microsoft Windows 95 operating system. However, most virtual devices are written to support new hardware devices or software. In such cases, it is often easier to write a virtual device from scratch than to modify an existing virtual device, because so much of a virtual device is device-specific. Nevertheless, the sources for existing virtual devices should be carefully examined whenever possible because they can reveal the general format and structure of virtual devices, as well as illustrate how to use VMM and virtual device services to carry out useful tasks.
Use the following guidelines when writing a virtual device:
At each stage in writing a virtual device, you can install the virtual device and run Windows under the control of the debugger. Setting breakpoints in your virtual device and monitoring the various interrupts managed by your virtual device can help you determine whether your virtual device is operating correctly.