[SHLWAPI_APITEST]: Use the 'add_rostests_file' command from Colin ;)
[reactos.git] / rostests / dxtest / win32kdxtest / NtGdiDdGetScanLine.c
1 #include <stdio.h>
2 /* SDK/DDK/NDK Headers. */
3 #include <windows.h>
4 #include <wingdi.h>
5 #include <winddi.h>
6 #include <d3dnthal.h>
7 #include <dll/directx/d3d8thk.h>
8 #include "test.h"
9
10 /*
11 * Test see if we can delete a DirectDrawObject from win32k
12 *
13 */
14 void
15 test_NtGdiDdGetScanLine(HANDLE hDirectDrawLocal)
16 {
17 int fails=0;
18 BOOL retValue=FALSE;
19 DD_GETSCANLINEDATA puGetScanLineData;
20
21 printf("Start testing of NtGdiDdGetScanLine\n");
22 RtlZeroMemory(&puGetScanLineData,sizeof(DD_GETSCANLINEDATA));
23
24 retValue = OsThunkDdGetScanLine(NULL,NULL);
25 testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"1. NtGdiDdGetScanLine(NULL,NULL);\0");
26
27 retValue = OsThunkDdGetScanLine(hDirectDrawLocal,NULL);
28 testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"2. NtGdiDdGetScanLine(hDirectDrawLocal,NULL);\0");
29
30 puGetScanLineData.ddRVal = DDERR_GENERIC;
31 retValue = OsThunkDdGetScanLine(hDirectDrawLocal,&puGetScanLineData);
32 testing_eq(retValue,DDHAL_DRIVER_NOTHANDLED,fails,"3. NtGdiDdGetScanLine(hDirectDrawLocal,puGetScanLineData);\0");
33 testing_noteq(puGetScanLineData.ddRVal,DD_OK,fails,"4. NtGdiDdGetScanLine(hDirectDrawLocal,puGetScanLineData);\0");
34 testing_eq(puGetScanLineData.dwScanLine,0,fails,"4. NtGdiDdGetScanLine(hDirectDrawLocal,puGetScanLineData);\0");
35
36
37 /* FIXME DDERR_VERTICALBLANKINPROGRESS test */
38
39 show_status(fails, "NtGdiDdGetScanLine\0");
40 }