Share via


Sample DrvEscape Function (Windows Embedded CE 6.0)

1/6/2010

The following code example shows how a simple DrvEscape function could be implemented.

This example supports the QUERYESCSUPPORT and CONTRASTCOMMAND escape codes. For more information on display driver escape codes see Display Driver Escape Codes.

ULONG SampleDisp::DriverEscape(SURFOBJ *pso, ULONG iEsc, ULONG cjIn, PVOID pvIn, ULONG cjOut, PVOID pvOut) {
    int RetVal = 0; // default return value: "not supported"
    switch (iEsc) {
        case QUERYESCSUPPORT :
            if (CONTRASTCOMMAND == *(DWORD *)pvIn) {
                RetVal = 1;
            }
            break;
        case CONTRASTCOMMAND :
            HandleContrastCmd(cjIn, pvIn, cjOut, pvOut);
            break;
    }
    return RetVal;
}

See Also

Concepts

Display Driver Samples
FLAT Sample Display Driver
ATI Sample Display Driver
ATI Sample Display Driver Optimization
Sample Blit Acceleration
Display Driver Performance Profiling
Display Driver Registry Settings
Display Driver Development Concepts
Display Driver Extensions
Display Driver Recommendations