## Virtual Device Driver Reference for OS/2

[prev][next][parent][TOC]

### Virtual DOS Protect-Mode Interface Device Driver

The virtual DOS protect-mode interface device driver (VDPMI) provides Version 0.9 DPMI support for applications in a DOS session. DPMI applications run in protect mode instead of V86 mode. The VDPMI provides the necessary support to allow DPMI applications to run under OS/2. The VDPMI supports the DPMI memory limit DOS setting, which allows the user to specify how much protect-mode memory should be available to the DOS session .

The VDPMI supports INT 31h in protect mode, which is issued by DPMI applications to request a DPMI service. The VDPMI device driver keeps track of the resources used by the application, such as memory, selector, interrupt, and debug watchpoint management. This virtual device driver also supports the mechanisms necessary to allow DPMI applications to switch the DOS session in and out of V86 mode (translation services). When a DPMI application terminates, the virtual DPMI device driver ensures that all of the DPMI application resources are freed.

If a DPMI application issues an interrupt in protect mode and there is no protect-mode interrupt handler, the request is reissued in V86 mode. Most virtual device drivers hook only interrupt requests in V86 mode, so they are not called until the interrupt is reflected to V86 mode unless the virtual device driver has issued VDHSetVPMIntVector. (see VDHSetVPMIntVector). However, it is up to the application or the virtual DOS protect-mode extender device driver (VDPX) to do any address translation that is necessary, such as converting the selector address to a segment address. See Virtual DOS Protect-Mode Extender Device Driver for further information on address translation.