ReactOS 0.4.16-dev-197-g92996da
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}
DWORD WINAPI OsThunkDdWaitForVerticalBlank(HANDLE hDirectDraw, PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData)
#define DDHAL_DRIVER_HANDLED
Definition: ddrawi.h:321
#define DDWAITVB_I_TESTVB
Definition: ddrawi.h:1623
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define testing_eq(input, value, counter, text)
Definition: test.h:24
#define show_status(counter, text)
Definition: test.h:40
#define testing_noteq(input, value, counter, text)
Definition: test.h:32
#define DD_OK
Definition: ddraw.h:186
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262

Referenced by main().