ReactOS
0.4.16-dev-61-ge128cbc
NtGdiDdCreateDirectDrawObject.c
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS api tests
3
* LICENSE: GPL - See COPYING in the top level directory
4
* PURPOSE: Test for NtGdiDdCreateDirectDrawObject
5
* PROGRAMMERS:
6
*/
7
8
#include "../win32nt.h"
9
10
START_TEST
(
NtGdiDdCreateDirectDrawObject
)
11
{
12
HANDLE
hDirectDraw;
13
HDC
hdc
=
CreateDCW
(
L
"DISPLAY"
,
NULL
,
NULL
,
NULL
);
14
ok
(
hdc
!=
NULL
,
"CreateDCW() failed\n"
);
15
16
hDirectDraw =
NtGdiDdCreateDirectDrawObject
(
NULL
);
17
ok
(hDirectDraw ==
NULL
,
18
"NtGdiDdCreateDirectDrawObject() succeeded on NULL device context\n"
);
19
if
(hDirectDraw !=
NULL
)
20
{
21
ok
(
NtGdiDdDeleteDirectDrawObject
(hDirectDraw) ==
TRUE
,
22
"NtGdiDdDeleteDirectDrawObject() failed on unwanted object\n"
);
23
}
24
25
if
(
hdc
==
NULL
)
26
{
27
skip
(
"No DC\n"
);
28
return
;
29
}
30
31
hDirectDraw =
NtGdiDdCreateDirectDrawObject
(
hdc
);
32
ok
(hDirectDraw !=
NULL
,
"NtGdiDdCreateDirectDrawObject() failed\n"
);
33
if
(hDirectDraw !=
NULL
)
34
{
35
ok
(
NtGdiDdDeleteDirectDrawObject
(hDirectDraw) ==
TRUE
,
36
"NtGdiDdDeleteDirectDrawObject() failed\n"
);
37
}
38
39
ok
(
DeleteDC
(
hdc
) != 0,
"DeleteDC() failed\n"
);
40
}
ok
#define ok(value,...)
Definition:
atltest.h:57
skip
#define skip(...)
Definition:
atltest.h:64
START_TEST
#define START_TEST(x)
Definition:
atltest.h:75
NULL
#define NULL
Definition:
types.h:112
TRUE
#define TRUE
Definition:
types.h:120
void
Definition:
nsiface.idl:2307
hdc
HDC hdc
Definition:
main.c:9
HDC
static HDC
Definition:
imagelist.c:88
NtGdiDdDeleteDirectDrawObject
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdDeleteDirectDrawObject(_In_ HANDLE hDirectDrawLocal)
NtGdiDdCreateDirectDrawObject
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiDdCreateDirectDrawObject(_In_ HDC hdc)
L
#define L(x)
Definition:
ntvdm.h:50
DeleteDC
BOOL WINAPI DeleteDC(_In_ HDC)
CreateDCW
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)
modules
rostests
apitests
win32nt
ntdd
NtGdiDdCreateDirectDrawObject.c
Generated on Fri Sep 20 2024 06:08:05 for ReactOS by
1.9.6