## Display Device Driver Reference for OS/2

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

### Device Escapes() from Win Shield and GDI to Seamless Windows Driver

rc = Escape( hDC, SEAMLESS_ESC_INIT, nCount, lpInData, lpOutData )

        hDC       = GetDC( hWnd )
        nEscape   = 6000 - SEAMLESS_ESC_INIT
        nCount    = 0
        lpInData  = Pointer to Win Shield "call-back" entry point
        lpOutData = NULL

        On Exit: rc = negative......Error
                 rc = positive......Success

The SEAMLESS_ESC_INIT call is made by Win Shield at initialization time. On input, Win Shield provides the address of a call-back entry point. The seamless windows driver uses this entry point, in addition to passing a clip region, to cause an area of the Windows Desktop to be repainted. This function is used whenever the seamless windows driver is disabled but must write to the screen. Win Shield is responsible for accumulating the clip regions passed to it.

Note:

1.This call is made before the screen is enabled by the Win Shield via INT 2Fh.

2.The seamless driver must always invalidate the Windows Desktop when OEMUpdateColors is called and the driver is in the disabled state. Miscellaneous translation table and color-mapping problems can otherwise occur.

rc = Escape( hDC, SEAMLESS_ESC_ENABLE, nCount, lpInData, lpOutData )

        hDC       = GetDC( hWnd )
        nEscape   = 6002 - SEAMLESS_ESC_ENABLE
        nCount    = 0
        lpInData  = NULL
        lpOutData = Pointer to hw_access

        On Exit: rc = negative......Error
                 rc = positive......Success

SEAMLESS_ESC_ENABLE permits a Windows program to determine the current hardware state. The escape returns the address of the driver's internal variable, hw_access, which reflects the hardware state at any time.

rc = Escape( hDC, SEAMLESS_ESC_EXIT, nCount, lpInData, lpOutData )

        hDC       = GetDC( hWnd )
        nEscape   = 6001 - SEAMLESS_ESC_EXIT
        nCount    = 0
        lpInData  = NULL
        lpOutData = NULL

        On Exit: rc = negative......Error
                 rc = positive......Success

Win Shield issues this call, requesting the seamless windows driver to reset its Win Shield call-back entry point. This is performed when the seamless windows DOS session is closing.

rc = Escape( hDC, SEAMLESS_ESC_REQSEM, nCount, lpInData, lpOutData )

        hDC       = GetDC( hWnd )
        nEscape   = 6004 - SEAMLESS_ESC_REQSEM
        nCount    = 0
        lpInData  = NULL
        lpOutData = NULL

        On Exit: rc = negative......Error
                 rc = positive......Success

SEAMLESS_ESC_REQSEM requests the seamless windows driver to obtain the FSRamSemaphore on behalf of Win Shield.

rc = Escape( hDC, SEAMLESS_ESC_CLRSEM, nCount, lpInData, lpOutData )

        hDC       = GetDC( hWnd )
        nEscape   = 6005 - SEAMLESS_ESC_CLRSEM
        nCount    = 0
        lpInData  = NULL
        lpOutData = NULL

        On Exit: rc = negative......Error
                 rc = positive......Success

SEAMLESS_ESC_CLRSEM requests the seamless windows driver to clear the FSRamSemaphore on behalf of Win Shield.

rc = Escape( hDC, SEAMLESS_ESC_PALINIT, nCount, lpInData, lpOutData )

        hDC       = GetDC( hWnd )
        nEscape   = 6010 - SEAMLESS_ESC_PALINIT
        nCount    = 0
        lpInData  = NULL
        lpOutData = Pointer to the start of the palette-related data in the
                    PM and Windows shared data/code area

        On Exit: rc = negative......Error
                 rc = positive......Success

SEAMLESS_ESCAPE_PALINIT permits the Windows GDI component to obtain the address of the palette-related data in the PM and Windows shared data/code area. There are three palette-related entries in this shared area, arranged in the following sequence:

       bfPaletteIsFixed   db  ?   ; TRUE if Palette Manager not enabled
       ulLastPalUpdate    dd  ?   ; Timestamp of last foreground realize
       pHWPalette         dd  ?   ; 16:16 ptr to HWPalette structure