ReactOS 0.4.16-dev-319-g6cf4263
NtGdiDdCreateDirectDrawObject.c
Go to the documentation of this file.
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>
8#include "test.h"
9
10
11/*
12 * Test see if we getting a DirectDrawObject from win32k
13 *
14 */
17{
18 HANDLE retValue=0;
19 int fails=0;
20 HDC hdc=CreateDCW(L"Display",NULL,NULL,NULL);
21
22 if (hdc == NULL)
23 {
24 printf("No hdc was created with Display, trying now with DISPLAY\n");
25 hdc=CreateDCW(L"DISPLAY",NULL,NULL,NULL);
26 if (hdc == NULL)
27 {
28 printf("No hdc was created with DISPLAY, trying now with NULL\n");
30 }
31 }
32
33 if (hdc == NULL)
34 {
35 printf("No hdc was created at all perpare all test will fail\n");
36 return NULL;
37 }
38
39 printf("Start testing of NtGdiDdCreateDirectDrawObject\n");
40
42 testing_noteq(retValue,NULL,fails,"NtGdiDdCreateDirectDrawObject(NULL);\0");
43
45 testing_eq(retValue,NULL,fails,"NtGdiDdCreateDirectDrawObject(hdc);\0");
46
47 show_status(fails, "NtGdiDdCreateDirectDrawObject\0");
48
49 return retValue;
50}
HANDLE WINAPI OsThunkDdCreateDirectDrawObject(HDC hdc)
#define NULL
Definition: types.h:112
HANDLE test_NtGdiDdCreateDirectDrawObject()
#define printf
Definition: freeldr.h:97
#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
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:88
#define L(x)
Definition: ntvdm.h:50
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)