### Develop Virtual Device Drivers in OS/2 (C only)

Support for developing virtual device drivers is available for C programs only.

IBM C and C++ Compilers provides a number of features specifically for virtual device driver development.

A virtual device driver is essentially a DLL. It is responsible for presenting a virtual copy of the hardware resource to a DOS session and for coordinating physical access to that resource.

To achieve a certain level of hardware independence, a virtual device driver usually communicates with a physical device driver to interact with hardware. For example, OS/2 provides both virtual and physical device drivers for the mouse and keyboard.

User-supplied virtual device drivers simulate the hardware interfaces of an option adapter or device, and are usually used to migrate existing DOS applications into the OS/2 DOS environment.

You may need to create a virtual device driver if multiple sessions must share access to a device where the input and output is not based on file handles, or if the particular device requires that interrupts be serviced within a short period of time.

Create Code to Run at Ring Zero
Modify a Module Definition File for Virtual Device Drivers

Virtual Device Driver Calling Conventions
Using _Far32 _Pascal Function Pointers
/VDD Linker Option