ReactOS  0.4.14-dev-831-gef8c9239
NtGdiDdDeleteDirectDrawObject.c File Reference
#include <win32nt.h>
Include dependency graph for NtGdiDdDeleteDirectDrawObject.c:

Go to the source code of this file.

Functions

 START_TEST (NtGdiDdDeleteDirectDrawObject)
 

Function Documentation

◆ START_TEST()

Definition at line 10 of file NtGdiDdDeleteDirectDrawObject.c.

11 {
12  HANDLE hDirectDraw;
13  HDC hdc = CreateDCW(L"DISPLAY", NULL, NULL, NULL);
14  ok(hdc != NULL, "CreateDCW() failed\n");
15 
17  "NtGdiDdDeleteDirectDrawObject() succeeded on NULL object\n");
18 
19  if (hdc == NULL)
20  {
21  skip("No DC\n");
22  return;
23  }
24 
25  hDirectDraw = NtGdiDdCreateDirectDrawObject(hdc);
26  ok(hDirectDraw != NULL, "NtGdiDdCreateDirectDrawObject() failed\n");
27 
28  if (hDirectDraw == NULL)
29  {
30  skip("No DirectDrawObject\n");
31  ok(DeleteDC(hdc) != 0, "DeleteDC() failed\n");
32  return;
33  }
34 
35  ok(NtGdiDdDeleteDirectDrawObject(hDirectDraw) == TRUE,
36  "NtGdiDdDeleteDirectDrawObject() failed on existing object\n");
37  ok(NtGdiDdDeleteDirectDrawObject(hDirectDraw) == FALSE,
38  "NtGdiDdDeleteDirectDrawObject() succeeded on deleted object\n");
39 
40  ok(DeleteDC(hdc) != 0, "DeleteDC() failed\n");
41 }
#define TRUE
Definition: types.h:120
static HDC
Definition: imagelist.c:92
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdDeleteDirectDrawObject(_In_ HANDLE hDirectDrawLocal)
smooth NULL
Definition: ftsmooth.c:416
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiDdCreateDirectDrawObject(_In_ HDC hdc)
static const WCHAR L[]
Definition: oid.c:1250
HDC hdc
Definition: main.c:9
BOOL WINAPI DeleteDC(_In_ HDC)
#define ok(value,...)
Definition: atltest.h:57
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)
#define skip(...)
Definition: atltest.h:64