A virtual video device driver provides many VDHRequestVDD services for other virtual video device drivers. Some of the common services provided are listed below:

     VDHRequestVDD
     (
        HVDD  hvddVideo,
        HVDM  hvdm,
        INT   iFunc,    /* VVDDEVREQ_DEVACCEPT (5)            */
        PVOID pReqIn,   /* Undefined                          */
        PVOID pReqOut   /* Undefined                          */
     );                 /* Returns TRUE                       */

     VDHRequestVDD
     (
        HVDD  hvddVideo,
        HVDM  hvdm,
        INT   iFunc,    /* VVDDEVREQ_DEVRELEASE (6)           */
        PVOID pReqIn,   /* Undefined                          */
        PVOID pReqOut   /* Undefined                          */
     );                 /* Returns TRUE                       */
     VDHRequestVDD
     (
        HVDD  hvddVideo,
        HVDM  hvdm,
        INT   iFunc,    /* VVDDEVREQ_DSPACCEPT (7)            */
        PVOID pReqIn,   /* Undefined                          */
        PVOID pReqOut   /* Undefined                          */
     );                 /* Returns TRUE                       */

     VDHRequestVDD
     (
        HVDD  hvddVideo,
        HVDM  hvdm,
        INT   iFunc,    /* VVDDEVREQ_DSPRELEASE (8)           */
        PVOID pReqIn,   /* Undefined                          */
        PVOID pReqOut   /* Undefined                          */
     );                 /* Returns TRUE                       */

     VDHRequestVDD
     (
        HVDD  hvddVideo,
        HVDM  hvdm,
        INT   iFunc,    /* VVDDEVREQ_POSTEVENT (9)            */
        PVVPOST pvvp,   /* Pointer to event structure         */
        PVOID pReqOut   /* Undefined                          */
     );                 /* Returns TRUE                       */

Any virtual video device driver receiving a DEVRELEASE request that owns its respective device should release ownership (that is, uninstall all associated I/O hooks, page-fault hooks, page mappings, and so forth), so that an accompanying virtual device driver can manage the device in its stead.

This support is provided for multiple virtual video device drivers installed for the same device, but virtualizing different aspects of the hardware (for example, standard VGA and Super VGA virtual video device drivers for a single Super VGA adapter). A virtual video device driver that is not currently the owner must silently pass on any DosRequestVDD and VDHRequestVDD requests that it receives, using the VDDREQ_PASS return code.

Similarly, any virtual video device driver receiving a DEVACCEPT request that does not already own its respective device and can currently accept ownership should take it (that is, install appropriate I/O hooks, page-fault hooks, page mappings, and so forth).

The DSPACCEPT and DSPRELEASE requests are similar to the preceding requests but much more restricted in scope. They are generally intended to determine which virtual video device driver (for one or more adapters) is managing the image currently displayed. For example, on VGA and 8514/A single-display systems, the display owner is the virtual video device driver that responds to certain system requests (that is, QUERYMODE to COPYBITMAP) and virtual mouse device driver drawing requests.

The Post Event request also passes the following structure:

     /*
     ** Input for POSTEVENT request
     */

     typedef struct vvp_s
     {
        LONG   iEvent;  /* See the VVDEVENT_* constants       */
        PVOID  pEvent;  /* Event data (varies from one event  */
                        /* to another)                        */
        ULONG  flEvent; /* Event posting flags                */
                                   /*   (See POSTEVENT_*
                                   /*    constants)           */
     }  VVPOST;

     #define VVDEVENT_NONE        0 /* No change              */
     #define VVDEVENT_MODE        1 /* Change in VDM's mode   */
     #define VVDEVENT_PALETTE     2 /* Change in VDM's palette*/
     #define VVDEVENT_LVB         3 /* Change in VDM's LVB    */
     #define VVDEVENT_SCROLL      4 /* Scroll of VDM's LVB    */
     #define VVDEVENT_STRING      5 /* String output          */
     #define VVDEVENT_CURSOR      6 /* Cursor position/type   */
                                    /* change                 */
     #define VVDEVENT_INPUT       7 /* DOS session is checking*/
                                    /* for input data         */
     #define VVDEVENT_ENDPASTE    8 /* DOS session has        */
                                    /* cancelled pasting      */
     #define VVDEVENT_PASTE       9 /* DOS session is ready   */
                                    /* for additional pasting */
     #define VVDEVENT_SWITCHERROR 10 /* DOS session cannot be */
                                     /* switched foreground   */
     #define VVDEVENT_TITLECHANGE 11 /* DOS session title has */
                                     /* changed               */
     #define VVDEVENT_DDE         12 /* Set/Clear DDE flag    */
     #define POSTEVENT_ADD    0x0001 /* Add given event.      */
     #define POSTEVENT_FLUSH  0x0002 /* Flush given (or       */
                                     /* existing) event       */
     #define POSTEVENT_DELETE 0x0004 /* delete existing event */

This gives a virtual video device driver (for example, 8514/A) that is operating cooperatively with another virtual video device driver (for example, CGA/EGA/VGA) the ability to post events to the DOS Session Window Manager without having to duplicate the event management.


[Back: Presentation Manager Display Driver Services]
[Next: Super VGA Virtual Video Device Driver Support]