ReactOS 0.4.15-dev-8339-g4028de8
NtGdiDdCanCreateSurface.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 NtGdiDdCanCreateSurface.c:

Go to the source code of this file.

Functions

void test_NtGdiDdCanCreateSurface (HANDLE hDirectDrawLocal)
 

Function Documentation

◆ test_NtGdiDdCanCreateSurface()

void test_NtGdiDdCanCreateSurface ( HANDLE  hDirectDrawLocal)

Definition at line 17 of file NtGdiDdCanCreateSurface.c.

18{
19 int fails=0;
20 BOOL retValue=FALSE;
21 DDHAL_CANCREATESURFACEDATA pCanCreateSurface;
23
24 RtlZeroMemory(&pCanCreateSurface,sizeof(DDHAL_CANCREATESURFACEDATA));
26
27 /* crash in windows 2000 */
29 testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"1. NtGdiDdCanCreateSurface(NULL,NULL);\0");
30
31 retValue = OsThunkDdCanCreateSurface(hDirectDrawLocal,NULL);
32 testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"2. NtGdiDdCanCreateSurface(hDirectDrawLocal,NULL);\0");
33
34 retValue = OsThunkDdCanCreateSurface(hDirectDrawLocal,(PDD_CANCREATESURFACEDATA)&pCanCreateSurface);
35 testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"3. NtGdiDdCanCreateSurface(hDirectDrawLocal,pCanCreateSurface);\0");
36
37 pCanCreateSurface.lpDDSurfaceDesc = (DDSURFACEDESC*)&desc;
38 desc.dwSize = sizeof(DDSURFACEDESC2);
39
40 retValue = OsThunkDdCanCreateSurface(hDirectDrawLocal,(PDD_CANCREATESURFACEDATA)&pCanCreateSurface);
41 testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"4. NtGdiDdCanCreateSurface(hDirectDrawLocal,pCanCreateSurface);\0");
42
43}
DWORD WINAPI OsThunkDdCanCreateSurface(HANDLE hDirectDraw, PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
#define DDHAL_DRIVER_HANDLED
Definition: ddrawi.h:321
#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
static const WCHAR desc[]
Definition: protectdata.c:36
struct _DDSURFACEDESC2 DDSURFACEDESC2
LPDDSURFACEDESC lpDDSurfaceDesc
Definition: ddrawi.h:785
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262

Referenced by main().