Ejemplo n.º 1
0
/*
 * Test see if we can delete a DirectDrawObject from win32k
 *
 */
void
test_NtGdiDdGetScanLine(HANDLE hDirectDrawLocal)
{
    int fails=0;
    BOOL retValue=FALSE;
    DD_GETSCANLINEDATA puGetScanLineData;

    printf("Start testing of NtGdiDdGetScanLine\n");
    RtlZeroMemory(&puGetScanLineData,sizeof(DD_GETSCANLINEDATA));

    retValue = OsThunkDdGetScanLine(NULL,NULL);
    testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"1. NtGdiDdGetScanLine(NULL,NULL);\0");

    retValue = OsThunkDdGetScanLine(hDirectDrawLocal,NULL);
    testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"2. NtGdiDdGetScanLine(hDirectDrawLocal,NULL);\0");

    puGetScanLineData.ddRVal = DDERR_GENERIC;
    retValue = OsThunkDdGetScanLine(hDirectDrawLocal,&puGetScanLineData);
    testing_eq(retValue,DDHAL_DRIVER_NOTHANDLED,fails,"3. NtGdiDdGetScanLine(hDirectDrawLocal,puGetScanLineData);\0");
    testing_noteq(puGetScanLineData.ddRVal,DD_OK,fails,"4. NtGdiDdGetScanLine(hDirectDrawLocal,puGetScanLineData);\0");
    testing_eq(puGetScanLineData.dwScanLine,0,fails,"4. NtGdiDdGetScanLine(hDirectDrawLocal,puGetScanLineData);\0");


    /* FIXME DDERR_VERTICALBLANKINPROGRESS test */

    show_status(fails, "NtGdiDdGetScanLine\0");
}
Ejemplo n.º 2
0
/*
 * Test see if we getting a DirectDrawObject from win32k
 *
 */
HANDLE
test_NtGdiDdCreateDirectDrawObject()
{
    HANDLE retValue=0;
    int fails=0;
    HDC hdc=CreateDCW(L"Display",NULL,NULL,NULL);

    if (hdc == NULL)
    {
        printf("No hdc was created with Display, trying now with DISPLAY\n");
        hdc=CreateDCW(L"DISPLAY",NULL,NULL,NULL);
        if (hdc == NULL)
        {
            printf("No hdc was created with DISPLAY, trying now with NULL\n");
            hdc=CreateDCW(NULL,NULL,NULL,NULL);
        }
    }

    if (hdc == NULL)
    {
        printf("No hdc was created at all perpare all test will fail\n");
        return NULL;
    }

    printf("Start testing of NtGdiDdCreateDirectDrawObject\n");

    retValue = OsThunkDdCreateDirectDrawObject(NULL);
    testing_noteq(retValue,NULL,fails,"NtGdiDdCreateDirectDrawObject(NULL);\0");

    retValue = OsThunkDdCreateDirectDrawObject(hdc);
    testing_eq(retValue,NULL,fails,"NtGdiDdCreateDirectDrawObject(hdc);\0");

    show_status(fails, "NtGdiDdCreateDirectDrawObject\0");

    return retValue;
}