ReactOS  0.4.12-dev-918-g6c6e7b8
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>
7 #include <dll/directx/d3d8thk.h>
8 #include "test.h"
9 
10 
11 /*
12  * Test see if we getting a DirectDrawObject from win32k
13  *
14  */
15 HANDLE
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 }
#define testing_noteq(input, value, counter, text)
Definition: test.h:32
HANDLE test_NtGdiDdCreateDirectDrawObject()
static HDC
Definition: imagelist.c:92
HANDLE WINAPI OsThunkDdCreateDirectDrawObject(HDC hdc)
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR L[]
Definition: oid.c:1250
HDC hdc
Definition: main.c:9
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)
#define show_status(counter, text)
Definition: test.h:40
#define testing_eq(input, value, counter, text)
Definition: test.h:24
#define printf
Definition: config.h:203