ReactOS 0.4.17-dev-116-ga4b6fe9
gdiobj.c
Go to the documentation of this file.
1/*
2 * Unit test suite for GDI objects
3 *
4 * Copyright 2002 Mike McCormack
5 * Copyright 2004 Dmitry Timoshkov
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#include <stdarg.h>
23#include <assert.h>
24
25#include "windef.h"
26#include "winbase.h"
27#include "ntgdi.h"
28#include "winuser.h"
29#include "winternl.h"
30
31#include "wine/test.h"
32
34
35static void test_gdi_objects(void)
36{
37 BYTE buff[256];
38 HDC hdc = GetDC(NULL);
39 HPEN hp;
40 int i;
41 BOOL ret;
42
43 /* SelectObject() with a NULL DC returns 0 and sets ERROR_INVALID_HANDLE.
44 * Note: Under XP at least invalid ptrs can also be passed, not just NULL;
45 * Don't test that here in case it crashes earlier win versions.
46 */
47 SetLastError(0);
50 "SelectObject(NULL DC) expected 0, ERROR_INVALID_HANDLE, got %p, %lu\n",
51 hp, GetLastError());
52
53 /* With a valid DC and a NULL object, the call returns 0 but does not SetLastError() */
54 SetLastError(0);
55 hp = SelectObject(hdc, NULL);
56 ok(!hp && !GetLastError(),
57 "SelectObject(NULL obj) expected 0, NO_ERROR, got %p, %lu\n",
58 hp, GetLastError());
59
60 /* The DC is unaffected by the NULL SelectObject */
61 SetLastError(0);
63 ok(hp && !GetLastError(),
64 "SelectObject(post NULL) expected non-null, NO_ERROR, got %p, %lu\n",
65 hp, GetLastError());
66
67 /* GetCurrentObject does not SetLastError() on a null object */
68 SetLastError(0);
70 ok(!hp && !GetLastError(),
71 "GetCurrentObject(NULL DC) expected 0, NO_ERROR, got %p, %lu\n",
72 hp, GetLastError());
73
74 /* DeleteObject does not SetLastError() on a null object */
76 ok( !ret && !GetLastError(),
77 "DeleteObject(NULL obj), expected 0, NO_ERROR, got %d, %lu\n",
78 ret, GetLastError());
79
80 /* GetObject does not SetLastError() on a null object */
81 SetLastError(0);
82 i = GetObjectA(NULL, sizeof(buff), buff);
84 "GetObject(NULL obj), expected 0, NO_ERROR, got %d, %lu\n",
85 i, GetLastError());
86
87 /* GetObject expects ERROR_NOACCESS when passed an invalid buffer */
89 SetLastError(0);
90 i = GetObjectA(hp, (INT_PTR)buff, (LPVOID)sizeof(buff));
91 ok (!i && (GetLastError() == 0 || GetLastError() == ERROR_NOACCESS),
92 "GetObject(invalid buff), expected 0, ERROR_NOACCESS, got %d, %lu\n",
93 i, GetLastError());
94
95 /* GetObjectType does SetLastError() on a null object */
96 SetLastError(0);
99 "GetObjectType(NULL obj), expected 0, ERROR_INVALID_HANDLE, got %d, %lu\n",
100 i, GetLastError());
101
102 /* UnrealizeObject does not SetLastError() on a null object */
103 SetLastError(0);
105 ok (!i && !GetLastError(),
106 "UnrealizeObject(NULL obj), expected 0, NO_ERROR, got %d, %lu\n",
107 i, GetLastError());
108
110}
111
113{
119};
120
122{
123 LOGPEN lp;
126
127 hgdiobj_event->hdc = CreateDCA("display", NULL, NULL, NULL);
128 ok(hgdiobj_event->hdc != NULL, "CreateDC error %lu\n", GetLastError());
129
131 ok(hgdiobj_event->hgdiobj1 != 0, "Failed to create pen\n");
132
133 hgdiobj_event->hgdiobj2 = CreateRectRgn(0, 1, 12, 17);
134 ok(hgdiobj_event->hgdiobj2 != 0, "Failed to create pen\n");
135
138 ok(status == WAIT_OBJECT_0, "WaitForSingleObject error %lu\n", GetLastError());
139
140 ok(!GetObjectA(hgdiobj_event->hgdiobj1, sizeof(lp), &lp), "GetObject should fail\n");
141
142 ok(!GetDeviceCaps(hgdiobj_event->hdc, TECHNOLOGY), "GetDeviceCaps(TECHNOLOGY) should fail\n");
143
144 return 0;
145}
146
147static void test_thread_objects(void)
148{
149 LOGPEN lp;
150 DWORD tid, type;
151 HANDLE hthread;
153 INT ret;
155 BOOL bRet;
156
158 ok(hgdiobj_event.stop_event != NULL, "CreateEvent error %lu\n", GetLastError());
160 ok(hgdiobj_event.ready_event != NULL, "CreateEvent error %lu\n", GetLastError());
161
162 hthread = CreateThread(NULL, 0, thread_proc, &hgdiobj_event, 0, &tid);
163 ok(hthread != NULL, "CreateThread error %lu\n", GetLastError());
164
166 ok(status == WAIT_OBJECT_0, "WaitForSingleObject error %lu\n", GetLastError());
167
168 ret = GetObjectA(hgdiobj_event.hgdiobj1, sizeof(lp), &lp);
169 ok(ret == sizeof(lp), "GetObject error %lu\n", GetLastError());
170 ok(lp.lopnStyle == PS_DASHDOTDOT, "wrong pen style %d\n", lp.lopnStyle);
171 ok(lp.lopnWidth.x == 17, "wrong pen width.y %ld\n", lp.lopnWidth.x);
172 ok(lp.lopnWidth.y == 0, "wrong pen width.y %ld\n", lp.lopnWidth.y);
173 ok(lp.lopnColor == RGB(1, 2, 3), "wrong pen width.y %08lx\n", lp.lopnColor);
174
176 ok(ret == DT_RASDISPLAY, "GetDeviceCaps(TECHNOLOGY) should return DT_RASDISPLAY not %d\n", ret);
177
179 ok(bRet, "DeleteObject error %lu\n", GetLastError());
180 bRet = DeleteDC(hgdiobj_event.hdc);
181 ok(bRet, "DeleteDC error %lu\n", GetLastError());
182
184 ok(type == OBJ_REGION, "GetObjectType returned %lu\n", type);
185
188 ok(status == WAIT_OBJECT_0, "WaitForSingleObject error %lu\n", GetLastError());
189 CloseHandle(hthread);
190
192 ok(type == OBJ_REGION, "GetObjectType returned %lu\n", type);
194 ok(bRet, "DeleteObject error %lu\n", GetLastError());
195
198}
199
200static void test_GetCurrentObject(void)
201{
202 DWORD type;
203 HPEN hpen;
204 HBRUSH hbrush;
205 HPALETTE hpal;
206 HFONT hfont;
208 HRGN hrgn;
209 HDC hdc;
210 HCOLORSPACE hcs;
211 HGDIOBJ hobj;
212 LOGBRUSH lb;
213 LOGCOLORSPACEA lcs;
214
216 assert(hdc != 0);
217
219 ok(type == OBJ_MEMDC, "GetObjectType returned %lu\n", type);
220
221 hpen = CreatePen(PS_SOLID, 10, RGB(10, 20, 30));
222 assert(hpen != 0);
225 ok(hobj == hpen, "OBJ_PEN is wrong: %p\n", hobj);
227 ok(hobj == hpen, "OBJ_EXTPEN is wrong: %p\n", hobj);
228
229 hbrush = CreateSolidBrush(RGB(10, 20, 30));
230 assert(hbrush != 0);
233 ok(hobj == hbrush, "OBJ_BRUSH is wrong: %p\n", hobj);
234
236 assert(hpal != 0);
237 SelectPalette(hdc, hpal, FALSE);
239 ok(hobj == hpal, "OBJ_PAL is wrong: %p\n", hobj);
240
241 hfont = CreateFontA(10, 5, 0, 0, FW_DONTCARE, 0, 0, 0, ANSI_CHARSET,
243 DEFAULT_PITCH, "MS Sans Serif");
244 assert(hfont != 0);
247 ok(hobj == hfont, "OBJ_FONT is wrong: %p\n", hobj);
248
249 hbmp = CreateBitmap(100, 100, 1, 1, NULL);
250 assert(hbmp != 0);
253 ok(hobj == hbmp, "OBJ_BITMAP is wrong: %p\n", hobj);
254
255 assert(GetObjectA(hbrush, sizeof(lb), &lb) == sizeof(lb));
257 10, &lb, 0, NULL);
258 assert(hpen != 0);
261 ok(hobj == hpen, "OBJ_PEN is wrong: %p\n", hobj);
263 ok(hobj == hpen, "OBJ_EXTPEN is wrong: %p\n", hobj);
264
265 hcs = GetColorSpace(hdc);
266 if (hcs)
267 {
268 trace("current color space is not NULL\n");
269 ok(GetLogColorSpaceA(hcs, &lcs, sizeof(lcs)), "GetLogColorSpace failed\n");
270 hcs = CreateColorSpaceA(&lcs);
271 ok(hcs != 0, "CreateColorSpace failed\n");
272 SelectObject(hdc, hcs);
274 ok(hobj == hcs, "OBJ_COLORSPACE is wrong: %p\n", hobj);
275 }
276
277 hrgn = CreateRectRgn(1, 1, 100, 100);
278 assert(hrgn != 0);
281 ok(!hobj, "OBJ_REGION is wrong: %p\n", hobj);
282
283 DeleteDC(hdc);
284}
285
286static void test_region(void)
287{
288 HRGN hrgn = CreateRectRgn(10, 10, 20, 20);
289 RECT rc = { 5, 5, 15, 15 };
290 BOOL ret = RectInRegion( hrgn, &rc);
291 ok( ret, "RectInRegion should return TRUE\n");
292 /* swap left and right */
293 SetRect( &rc, 15, 5, 5, 15 );
294 ret = RectInRegion( hrgn, &rc);
295 ok( ret, "RectInRegion should return TRUE\n");
296 /* swap top and bottom */
297 SetRect( &rc, 5, 15, 15, 5 );
298 ret = RectInRegion( hrgn, &rc);
299 ok( ret, "RectInRegion should return TRUE\n");
300 /* swap both */
301 SetRect( &rc, 15, 15, 5, 5 );
302 ret = RectInRegion( hrgn, &rc);
303 ok( ret, "RectInRegion should return TRUE\n");
305 /* swap left and right in the region */
306 hrgn = CreateRectRgn(20, 10, 10, 20);
307 SetRect( &rc, 5, 5, 15, 15 );
308 ret = RectInRegion( hrgn, &rc);
309 ok( ret, "RectInRegion should return TRUE\n");
310 /* swap left and right */
311 SetRect( &rc, 15, 5, 5, 15 );
312 ret = RectInRegion( hrgn, &rc);
313 ok( ret, "RectInRegion should return TRUE\n");
314 /* swap top and bottom */
315 SetRect( &rc, 5, 15, 15, 5 );
316 ret = RectInRegion( hrgn, &rc);
317 ok( ret, "RectInRegion should return TRUE\n");
318 /* swap both */
319 SetRect( &rc, 15, 15, 5, 5 );
320 ret = RectInRegion( hrgn, &rc);
321 ok( ret, "RectInRegion should return TRUE\n");
323}
324
325static void test_handles_on_win64(void)
326{
327 int i;
328 BOOL ret;
329 DWORD type;
330 HRGN hrgn, hrgn_test;
331
332 static const struct
333 {
334 ULONG high;
335 ULONG low;
336 BOOL ret;
337 } cases[] =
338 {
339 { 0x00000000, 0x00000000, TRUE },
340 { 0x00000000, 0x0000ffe0, FALSE }, /* just over MAX_LARGE_HANDLES */
341 { 0x00000000, 0x0000ffb0, FALSE }, /* just under MAX_LARGE_HANDLES */
342 { 0xffffffff, 0xffff0000, FALSE },
343 { 0xffffffff, 0x00000000, TRUE },
344 { 0xdeadbeef, 0x00000000, TRUE },
345 { 0xcccccccc, 0xcccccccc, FALSE }
346 };
347
348 if (sizeof(void*) != 8)
349 return;
350
351 for (i = 0; i < ARRAY_SIZE(cases); i++)
352 {
353 hrgn = CreateRectRgn(10, 10, 20, 20);
354 hrgn_test = (HRGN)(ULONG_PTR)((ULONG_PTR)hrgn | ((ULONGLONG)cases[i].high << 32) | cases[i].low);
355 type = GetObjectType( hrgn_test );
356 if (cases[i].ret)
357 ok( type == OBJ_REGION, "wrong type %lu\n", type );
358 else
359 ok( type == 0, "wrong type %lu\n", type );
360 ret = DeleteObject(hrgn_test);
361 ok( cases[i].ret == ret, "DeleteObject should return %s (%p)\n",
362 cases[i].ret ? "TRUE" : "FALSE", hrgn_test);
363 /* actually free it if above is expected to fail */
364 if (!ret) DeleteObject(hrgn);
365 }
366}
367
369{
370#ifndef _WIN64
371 if (NtCurrentTeb()->GdiBatchCount)
372 {
373 TEB64 *teb64 = (TEB64 *)(UINT_PTR)NtCurrentTeb()->GdiBatchCount;
374 PEB64 *peb64 = (PEB64 *)(UINT_PTR)teb64->Peb;
376 }
377#endif
378 return (GDI_SHARED_MEMORY *)NtCurrentTeb()->Peb->GdiSharedHandleTable;
379}
380
381static void test_shared_handle_entry( HGDIOBJ obj, unsigned int type, BOOL is_stock )
382{
383 GDI_SHARED_MEMORY *gdi_shared = get_gdi_shared();
384 unsigned int handle = HandleToULong( obj );
386
387 entry = &gdi_shared->Handles[handle & 0xffff];
388 ok(entry->Unique == handle >> 16, "Unique = %x, expected %x\n",
389 entry->Unique, handle >> 16);
390 if (type != NTGDI_OBJ_MEMDC)
391 {
392 ok(entry->ExtType << NTGDI_HANDLE_TYPE_SHIFT == type, "ExtType = %x, expected %x\n",
393 entry->ExtType, type);
394 }
395 else
396 {
399 "ExtType = %x, expected NTGDI_OBJ_DC\n", entry->ExtType);
400 }
401 ok(entry->StockFlag == is_stock, "StockFlag = %x\n", entry->StockFlag);
402 ok(entry->Type << NTGDI_HANDLE_TYPE_SHIFT == (type & 0x1f0000),
403 "Type = %x, expected %x\n", entry->Type, type & 0x1f);
404 ok(entry->Object, "Object = NULL\n");
405 ok(entry->Owner.Count == 0, "Count = %u\n", entry->Owner.Count);
406 ok(entry->Generation <= (sizeof(void *) == 8) ? 127 : 255, "Generation = %u\n", entry->Generation);
407}
408
410{
411 GDI_SHARED_MEMORY *gdi_shared;
413 unsigned int handle;
414 HENHMETAFILE enhmetafile;
415 HMETAFILE metafile;
416 HPEN pen;
417 HRGN hrgn;
418 HBRUSH brush;
419 LOGBRUSH lb;
420 HDC dc;
421
422 if (sizeof(void *) == 4 && !is_wow64)
423 {
424 skip("Skipping shared memory tests on 32-bit Windows\n");
425 return;
426 }
427 gdi_shared = get_gdi_shared();
428
429 hrgn = CreateRectRgn(10, 10, 20, 20);
430 ok(hrgn != 0, "CreateRectRgn failed\n");
432 entry = &gdi_shared->Handles[handle & 0xffff];
434 ok(entry->Owner.ProcessId == GetCurrentProcessId(), "ProcessId = %x, expected %lx\n",
435 entry->Owner.ProcessId, GetCurrentProcessId());
436
438
440 ok(entry->Unique == handle >> 16, "Unique = %x, expected %x\n",
441 entry->Unique, handle >> 16);
443 ok(entry->Type == 4, "Type = %x\n", entry->Type);
444 ok(entry->Object, "Object = NULL\n");
446 ok(entry->Owner.ProcessId == GetCurrentProcessId(), "ProcessId = %x, expected %lx\n",
447 entry->Owner.ProcessId, GetCurrentProcessId());
448 ok(entry->Owner.Count == 0, "Count = %u\n", entry->Owner.Count);
449 ok(entry->Generation <= (sizeof(void *) == 8) ? 127 : 255, "Generation = %u\n", entry->Generation);
450
453
454 brush = CreateSolidBrush(0);
456 DeleteObject(brush);
457
458 lb.lbStyle = BS_SOLID;
459 lb.lbColor = RGB(12,34,56);
460 lb.lbHatch = HS_CROSS;
461 pen = ExtCreatePen( PS_DOT | PS_GEOMETRIC, 3, &lb, 0, NULL );
463 DeleteObject(pen);
464
468
469 dc = CreateDCW(L"display", NULL, NULL, NULL);
470 ok(GetObjectType(dc) == OBJ_DC, "GetObjectType(dc) = %lx\n", GetObjectType(dc));
472 DeleteDC(dc);
473
479
485
488 DeleteDC(dc);
489}
490
492{
494
498 test_region();
501}
static HFONT hfont
static HRGN hrgn
static HBRUSH hbrush
static HPEN hpen
static POBJECT_TYPE GetObjectType(IN PCWSTR TypeName)
Definition: ObTypes.c:15
#define trace
Definition: atltest.h:70
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define broken(x)
Definition: atltest.h:178
#define START_TEST(x)
Definition: atltest.h:75
#define ARRAY_SIZE(A)
Definition: main.h:20
#define HandleToULong(h)
Definition: basetsd.h:89
HBITMAP hbmp
HDC dc
Definition: cylfrac.c:34
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CloseHandle
Definition: compat.h:739
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
#define GetCurrentProcess()
Definition: compat.h:759
#define IsWow64Process
Definition: compat.h:760
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
#define assert(_expr)
Definition: assert.h:32
#define RGB(r, g, b)
Definition: precomp.h:67
return ret
Definition: mutex.c:146
#define L(x)
Definition: resources.c:13
#define INFINITE
Definition: serial.h:102
#define ULONG_PTR
Definition: config.h:101
static unsigned char buff[32768]
Definition: fatten.c:17
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
pKey DeleteObject()
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLfloat param
Definition: glext.h:5796
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static TfClientId tid
#define NtCurrentTeb
uint32_t entry
Definition: isohybrid.c:63
#define todo_wine
Definition: minitest.h:80
HDC hdc
Definition: main.c:9
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:88
static void test_thread_objects(void)
Definition: gdiobj.c:147
static void test_shared_handle_table(void)
Definition: gdiobj.c:409
static void test_gdi_objects(void)
Definition: gdiobj.c:35
static void test_shared_handle_entry(HGDIOBJ obj, unsigned int type, BOOL is_stock)
Definition: gdiobj.c:381
static DWORD WINAPI thread_proc(void *param)
Definition: gdiobj.c:121
static BOOL is_wow64
Definition: gdiobj.c:33
static void test_GetCurrentObject(void)
Definition: gdiobj.c:200
static void test_handles_on_win64(void)
Definition: gdiobj.c:325
static GDI_SHARED_MEMORY * get_gdi_shared(void)
Definition: gdiobj.c:368
static void test_region(void)
Definition: gdiobj.c:286
static const unsigned char metafile[]
Definition: olepicture.c:138
static const unsigned char enhmetafile[]
Definition: olepicture.c:149
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
#define OBJ_EXTPEN
Definition: objidl.idl:1024
#define OBJ_REGION
Definition: objidl.idl:1021
#define OBJ_DC
Definition: objidl.idl:1016
#define OBJ_PEN
Definition: objidl.idl:1014
#define OBJ_BRUSH
Definition: objidl.idl:1015
#define OBJ_FONT
Definition: objidl.idl:1019
#define OBJ_BITMAP
Definition: objidl.idl:1020
#define OBJ_PAL
Definition: objidl.idl:1018
#define OBJ_MEMDC
Definition: objidl.idl:1023
Definition: ntgdi.h:36
GDI_HANDLE_ENTRY Handles[GDI_MAX_HANDLE_COUNT]
Definition: ntgdi.h:88
ULONG64 GdiSharedHandleTable
Definition: winternl.h:1086
ULONG64 Peb
Definition: winternl.h:1254
HANDLE ready_event
Definition: gdiobj.c:118
HGDIOBJ hgdiobj1
Definition: gdiobj.c:115
HGDIOBJ hgdiobj2
Definition: gdiobj.c:116
HANDLE stop_event
Definition: gdiobj.c:117
Definition: ps.c:97
UINT lbStyle
Definition: wingdi.h:2193
ULONG_PTR lbHatch
Definition: wingdi.h:2195
COLORREF lbColor
Definition: wingdi.h:2194
COLORREF lopnColor
Definition: wingdi.h:2293
POINT lopnWidth
Definition: wingdi.h:2292
UINT lopnStyle
Definition: wingdi.h:2291
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
Definition: synch.c:573
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:669
int32_t INT_PTR
Definition: typedefs.h:64
int32_t INT
Definition: typedefs.h:58
uint64_t ULONGLONG
Definition: typedefs.h:67
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
DWORD WINAPI GetCurrentProcessId(void)
Definition: proc.c:1156
#define WAIT_OBJECT_0
Definition: winbase.h:383
#define WINAPI
Definition: msvc.h:6
#define NTGDI_OBJ_BITMAP
Definition: ntgdi.h:73
#define NTGDI_OBJ_MEMDC
Definition: ntgdi.h:80
#define NTGDI_OBJ_ENHMETAFILE
Definition: ntgdi.h:70
#define NTGDI_OBJ_DC
Definition: ntgdi.h:65
#define NTGDI_OBJ_PEN
Definition: ntgdi.h:76
#define NTGDI_OBJ_METADC
Definition: ntgdi.h:71
#define NTGDI_OBJ_ENHMETADC
Definition: ntgdi.h:66
#define NTGDI_OBJ_REGION
Definition: ntgdi.h:67
#define NTGDI_OBJ_BRUSH
Definition: ntgdi.h:75
#define NTGDI_OBJ_FONT
Definition: ntgdi.h:74
#define NTGDI_OBJ_PAL
Definition: ntgdi.h:72
#define NTGDI_OBJ_METAFILE
Definition: ntgdi.h:69
#define NTGDI_HANDLE_TYPE_SHIFT
Definition: ntgdi.h:82
#define NTGDI_OBJ_EXTPEN
Definition: ntgdi.h:77
#define ERROR_NOACCESS
Definition: winerror.h:902
#define DEFAULT_PITCH
Definition: wingdi.h:443
BOOL WINAPI UnrealizeObject(_In_ HGDIOBJ)
HGDIOBJ WINAPI GetStockObject(_In_ int)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
#define FW_DONTCARE
Definition: wingdi.h:368
#define DT_RASDISPLAY
Definition: wingdi.h:708
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define STOCK_LAST
Definition: wingdi.h:923
#define PS_JOIN_BEVEL
Definition: wingdi.h:597
#define DEFAULT_PALETTE
Definition: wingdi.h:913
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HPEN WINAPI ExtCreatePen(_In_ DWORD iPenStyle, _In_ DWORD cWidth, _In_ const LOGBRUSH *plbrush, _In_ DWORD cStyle, _In_reads_opt_(cStyle) const DWORD *pstyle)
#define PS_ENDCAP_SQUARE
Definition: wingdi.h:595
#define DEFAULT_QUALITY
Definition: wingdi.h:436
#define OBJ_COLORSPACE
Definition: wingdi.h:704
#define PS_DOT
Definition: wingdi.h:588
BOOL WINAPI GetLogColorSpaceA(_In_ HCOLORSPACE hColorSpace, _Out_writes_bytes_(nSize) LPLOGCOLORSPACEA lpBuffer, _In_ DWORD nSize)
HPALETTE WINAPI SelectPalette(_In_ HDC, _In_ HPALETTE, _In_ BOOL)
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
Definition: dc.c:428
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
HDC WINAPI CreateDCA(_In_opt_ LPCSTR pszDriver, _In_opt_ LPCSTR pszDevice, _In_opt_ LPCSTR pszOutput, _In_opt_ const DEVMODEA *pdmInit)
#define PS_GEOMETRIC
Definition: wingdi.h:583
HDC WINAPI CreateEnhMetaFileW(_In_opt_ HDC, _In_opt_ LPCWSTR, _In_opt_ LPCRECT, _In_opt_ LPCWSTR)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
HMETAFILE WINAPI CloseMetaFile(_In_ HDC hdc)
#define HS_CROSS
Definition: wingdi.h:577
HCOLORSPACE WINAPI CreateColorSpaceA(_In_ LPLOGCOLORSPACEA pLogColorSpace)
HDC WINAPI CreateMetaFileW(_In_opt_ LPCWSTR)
#define WHITE_PEN
Definition: wingdi.h:905
#define WHITE_BRUSH
Definition: wingdi.h:902
#define OUT_DEFAULT_PRECIS
Definition: wingdi.h:415
#define BLACK_PEN
Definition: wingdi.h:903
#define ANSI_CHARSET
Definition: wingdi.h:383
HENHMETAFILE WINAPI CloseEnhMetaFile(_In_ HDC hdc)
#define CLIP_DEFAULT_PRECIS
Definition: wingdi.h:426
#define SYSTEM_FONT
Definition: wingdi.h:911
BOOL WINAPI RectInRegion(_In_ HRGN, _In_ LPCRECT)
HFONT WINAPI CreateFontA(_In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCSTR)
HCOLORSPACE WINAPI GetColorSpace(_In_ HDC)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
#define BS_SOLID
Definition: wingdi.h:1086
#define PS_SOLID
Definition: wingdi.h:586
HPALETTE WINAPI CreateHalftonePalette(_In_opt_ HDC)
#define TECHNOLOGY
Definition: wingdi.h:706
#define PS_DASHDOTDOT
Definition: wingdi.h:590
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
unsigned char BYTE
Definition: xxhash.c:193