## Virtual Device Driver Reference for OS/2

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

### VDHChangeVPMIF - Purpose

Context Issues: This function can be called only in the DOS session-task context.

DOS Session Terminations: There are no DOS session termination implications for this function.

Notes: The flVDMStatus kernel variable is exported from the kernel. Any virtual device driver can refer to it directly. flVDMStatus is a DD-sized variable that contains various DOS session status flags relating to protected mode and the DOS Protected Mode Interface (DPMI).

The flVDMStatus flags indicate:

DPMI was initialized (protected mode was enabled)
16-bit or 32-bit
The current execution mode (V86 or protected)

These flags and their values are:

       VDM_STATUS_VPM_32         0x00000001      /* 32-bit DPMI application   */

       VDM_STATUS_VPM_APP        0x00000002      /* DPMI application started  */

       VDM_STATUS_VPM_EXEC       0x00000004      /* In DOS session protected mode*/

       VDM_STATUS_VPM_IF_FLAG    0x00000010      /* Virtual IF flag           */

       VDM_STATUS_VPM_PERM       0x00000080      /* Protected mode allowed?   */

       VDM_STATUS_VPM_XDOS       0x00000100      /* DOS API extension active? */