ReactOS  0.4.15-dev-448-gd6c4411
NtGdiDdWaitForVerticalBlank.c File Reference
#include <stdio.h>
#include <windows.h>
#include <wingdi.h>
#include <winddi.h>
#include <d3dnthal.h>
#include <dll/directx/d3d8thk.h>
#include <ddrawi.h>
#include "test.h"
Include dependency graph for NtGdiDdWaitForVerticalBlank.c:

Go to the source code of this file.

Functions

void test_NtGdiDdWaitForVerticalBlank (HANDLE hDirectDrawLocal)
 

Function Documentation

◆ test_NtGdiDdWaitForVerticalBlank()

void test_NtGdiDdWaitForVerticalBlank ( HANDLE  hDirectDrawLocal)

Definition at line 17 of file NtGdiDdWaitForVerticalBlank.c.

18 {
19  int fails=0;
20  BOOL retValue=FALSE;
21  DDHAL_WAITFORVERTICALBLANKDATA pDdWaitForVerticalBlankData;
22 
23  RtlZeroMemory(&pDdWaitForVerticalBlankData,sizeof(DDHAL_WAITFORVERTICALBLANKDATA));
24 
26  testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"1. NtGdiDdWaitForVerticalBlank(NULL,NULL);\0");
27 
28  retValue = OsThunkDdWaitForVerticalBlank(hDirectDrawLocal,NULL);
29  testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"2. NtGdiDdWaitForVerticalBlank(hDirectDrawLocal,NULL);\0");
30 
31  retValue = OsThunkDdWaitForVerticalBlank(hDirectDrawLocal,(PDD_WAITFORVERTICALBLANKDATA)&pDdWaitForVerticalBlankData);
32  testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"3. NtGdiDdWaitForVerticalBlank(hDirectDrawLocal,NULL);\0");
33  testing_eq(pDdWaitForVerticalBlankData.ddRVal, DD_OK,fails,"4. NtGdiDdWaitForVerticalBlank(hDirectDrawLocal,NULL);\0");
34 
35  RtlZeroMemory(&pDdWaitForVerticalBlankData,sizeof(DDHAL_WAITFORVERTICALBLANKDATA));
36  pDdWaitForVerticalBlankData.dwFlags = DDWAITVB_I_TESTVB;
37  retValue = OsThunkDdWaitForVerticalBlank(hDirectDrawLocal,(PDD_WAITFORVERTICALBLANKDATA)&pDdWaitForVerticalBlankData);
38 
39  testing_eq(retValue, DDHAL_DRIVER_NOTHANDLED,fails,"5. NtGdiDdWaitForVerticalBlank(hDirectDrawLocal,NULL);\0");
40  testing_noteq(pDdWaitForVerticalBlankData.ddRVal, DD_OK,fails,"6. NtGdiDdWaitForVerticalBlank(hDirectDrawLocal,NULL);\0");
41 
42  retValue = OsThunkDdWaitForVerticalBlank(hDirectDrawLocal,(PDD_WAITFORVERTICALBLANKDATA)&pDdWaitForVerticalBlankData);
43 
44  show_status(fails, "NtGdiDdWaitForVerticalBlank\0");
45 }
#define testing_noteq(input, value, counter, text)
Definition: test.h:32
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
#define DDHAL_DRIVER_HANDLED
Definition: ddrawi.h:321
#define DD_OK
Definition: ddraw.h:186
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define DDWAITVB_I_TESTVB
Definition: ddrawi.h:1623
DWORD WINAPI OsThunkDdWaitForVerticalBlank(HANDLE hDirectDraw, PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData)
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
#define show_status(counter, text)
Definition: test.h:40
#define testing_eq(input, value, counter, text)
Definition: test.h:24

Referenced by main().