## Display Device Driver Reference for OS/2

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

### PM Driver Calls to VWIN - Accessed via DOSRequestVDD

Function = Pass initialization structure

         HVDD  = Handle of VDD (returned from DosOpenVDD)
         SGID  = NULL
         ULONG = 0x000000C0
         ULONG = Number of array elements
         PVOID = Pointer to array of SM_PMDISP structures
         ULONG = 0
         PVOID = NULL

         typedef struct _SM_PMDISP
         {
           ULONG  flOptions;/* BIT1 BIT0=xx ring level if BIT3=1  */
                            /* BIT2=0 for DATA    BIT2=1 for CODE */
                            /* BIT3=0 for 16:16   BIT3=1 for 0:32 */
                            /* BIT4=0 for mapping BIT4=1 for      */
                            /* passthru; if passthru, VWIN does   */
                            /* not touch                          */
                            /* BIT5=1 to force linear addresses   */
                            /* to match otherwise, 16:16 addrs    */
                               are remapped in the DOS session    */
                            /* BIT6 - BIT31 reserved (must be 0)  */

           ULONG  ulLength; /* Length of the data in bytes        */

           union            /* Pointer to the beginning address   */
                            /* of shared memory structure         */
           {
             PVOID  p16;    /* for 16:16 (BIT3=0)                 */
             ULONG  p32;    /* for  0:32 (BIT3=1)                 */
           } Start;

         } SM_PMDISP;

Function = Signal timeout of the hardware semaphore

        HVDD  = Handle of VDD (returned from DosOpenVDD)
        SGID  = NULL
        ULONG = 0x000000C1
        ULONG = PID to test/kill
        PVOID = NULL
        ULONG = TID to test/kill
        PVOID = NULL

        Returns 0 for "valid Seamless VDM PID/TID was killed"
                1 for "valid PID/TID was not killed" (held by a PM driver)
                2 for "non-valid PID/TID" (went away or is going away)

Function = DOS session Dirty notification (Send)

        HVDD  = Handle of VDD (returned from DosOpenVDD)
        SGID  = -1 indicates broadcast; the PM display driver
                always broadcasts
        ULONG = 0x000000C2
        ULONG = Function code to use for the interrupt ( 0x4001
                or 0x4002 )
        PVOID = NULL
        ULONG = Force Repaint ( 0 = NO, 1 = YES )
        PVOID = NULL

Sends VWIN a DOS session Dirty notification. This is used at PM death and resurrection to indicate to the DOS sessions to suspend drawing or resume redrawing and repainting.

Function = Set VMOUSE Display Resolution

        HVDD  = Handle of VDD (returned from DosOpenVDD)
        SGID  = NULL
        ULONG = 0x000000C4
        ULONG = sizeof(VMSSIZE structure)
        PVOID = pointer to VMSSIZE structure
        ULONG = NULL
        PVOID = NULL

        typedef struct vmss_s {
          ULONG  vmss_nb;             // Size of structure, in bytes (36)
          LONG   vmss_lMode;          // Video mode (eg, 00h-13h, or -1)
          ULONG  vmss_ulWidth;        // Width of screen, in pels
          ULONG  vmss_ulHeight;       // Height of screen, in pels
          ULONG  vmss_ulCellWidth;    // Width of screen cells, in pels
          ULONG  vmss_ulCellHeight;   // Height of screen cells, in pels
          ULONG  vmss_ulPtrWidth;     // Width of ptr drawing size, pels
          ULONG  vmss_ulPtrHeight;    // Height of ptr drawing size, pels
          ULONG  vmss_ulPtrUnitWidth; // Width of ptr drawing unit, pels
        } VMSSIZE;