ReactOS  0.4.15-dev-2103-g9dff498
NtGdiExtSelectClipRgn.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 NtGdiExtSelectClipRgn
5  * PROGRAMMERS:
6  */
7 
8 #include <win32nt.h>
9 
11 {
12  HRGN hRgnDest, hRgn1, hRgn2;
13  HDC hdc;
14 // test what params are accepted for what operations
15 // 0? invalid? are params maybe ignored in some cases?
16 // LastError
17 
18  /* Preparation */
19  hRgnDest = CreateRectRgn(100, 100, 100, 100);
20  hRgn1 = CreateRectRgn(1,1,4,4);
21  hRgn2 = CreateRectRgn(2,2,6,3);
22 
23  hdc = GetDC(NULL);
24 
25  /* RGN_AND = 1, RGN_OR = 2, RGN_XOR = 3, RGN_DIFF = 4, RGN_COPY = 5 */
26 
27  SetLastError(0xDEADFACE);
30  SetLastError(0xDEADFACE);
33  SetLastError(0xDEADFACE);
50  SetLastError(0xDEADFACE);
55  ok_long(GetLastError(), 0xDEADFACE);
57 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
HDC WINAPI GetDC(_In_opt_ HWND)
#define ERROR(name)
Definition: error_private.h:53
__kernel_entry W32KAPI INT APIENTRY NtGdiExtSelectClipRgn(_In_ HDC hdc, _In_opt_ HRGN hrgn, _In_ INT iMode)
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
static HDC
Definition: imagelist.c:92
#define COMPLEXREGION
Definition: wingdi.h:362
#define NULLREGION
Definition: wingdi.h:360
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
#define ok_long(expression, result)
Definition: atltest.h:133
#define RGN_AND
Definition: wingdi.h:355
#define RGN_XOR
Definition: wingdi.h:359
#define ok_int(expression, result)
Definition: atltest.h:134
#define RGN_OR
Definition: wingdi.h:358
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
START_TEST(NtGdiExtSelectClipRgn)
#define SetLastError(x)
Definition: compat.h:611
HDC hdc
Definition: main.c:9
#define RGN_COPY
Definition: wingdi.h:356
#define SIMPLEREGION
Definition: wingdi.h:361
#define RGN_DIFF
Definition: wingdi.h:357
#define NULL
Definition: types.h:112