Share via


ESCAPE_EXIT_CA Code Example (Compact 7)

3/12/2014

If the RemoteFX session ends while the device is in full-screen display mode, the RDC client sends the ESCAPE_EXIT_CA escape sequence to the display driver. The display driver uses this notification to return to non-RemoteFX display mode. The following code example demonstrates the ESCAPE_EXIT_CA escape sequence.

Note

In window-frame display mode, there is no equivalent to the ESCAPE_EXIT_CA escape sequence.

Important

For readability, the following code example does not contain security or error handling. Do not use the following code in a production environment.

#define ESCAPE_EXIT_CA                    (ESCAPE_CODE_BEGIN+0x99)

ULONG DrvEscape(
                SURFOBJ * pso,
                ULONG     iEsc,
                ULONG     cjIn,
                void    * pvIn,
                ULONG     cjOut,
                void    * pvOut
                )
{
    if (iEsc == QUERYESCSUPPORT)
    {
        if ( *(DWORD*)pvIn   == ESCAPE_GET_CAPABILITIES
            || *(DWORD*)pvIn == ESCAPE_DEC3
            || *(DWORD*)pvIn == ESCAPE_COPY_2BMP )

        {
            // The escape functions are supported.
            return 1;
        }
        if (*(DWORD*)pvIn == ESCAPE_EXIT_CA )
        {

            // TO DO: Switch to normal display mode when FullScreenRFXOnly 
            // is set.         
            return 1;

        }
        else
        {
            // The escape isn't supported.
            return 0;
        }
    }

}

See Also

Concepts

Implement a RemoteFX Display Driver