50 "SelectObject(NULL DC) expected 0, ERROR_INVALID_HANDLE, got %p, %lu\n",
57 "SelectObject(NULL obj) expected 0, NO_ERROR, got %p, %lu\n",
64 "SelectObject(post NULL) expected non-null, NO_ERROR, got %p, %lu\n",
71 "GetCurrentObject(NULL DC) expected 0, NO_ERROR, got %p, %lu\n",
77 "DeleteObject(NULL obj), expected 0, NO_ERROR, got %d, %lu\n",
84 "GetObject(NULL obj), expected 0, NO_ERROR, got %d, %lu\n",
92 "GetObject(invalid buff), expected 0, ERROR_NOACCESS, got %d, %lu\n",
99 "GetObjectType(NULL obj), expected 0, ERROR_INVALID_HANDLE, got %d, %lu\n",
106 "UnrealizeObject(NULL obj), expected 0, NO_ERROR, got %d, %lu\n",
225 ok(hobj ==
hpen,
"OBJ_PEN is wrong: %p\n", hobj);
227 ok(hobj ==
hpen,
"OBJ_EXTPEN is wrong: %p\n", hobj);
233 ok(hobj ==
hbrush,
"OBJ_BRUSH is wrong: %p\n", hobj);
239 ok(hobj == hpal,
"OBJ_PAL is wrong: %p\n", hobj);
247 ok(hobj ==
hfont,
"OBJ_FONT is wrong: %p\n", hobj);
253 ok(hobj ==
hbmp,
"OBJ_BITMAP is wrong: %p\n", hobj);
261 ok(hobj ==
hpen,
"OBJ_PEN is wrong: %p\n", hobj);
263 ok(hobj ==
hpen,
"OBJ_EXTPEN is wrong: %p\n", hobj);
268 trace(
"current color space is not NULL\n");
271 ok(hcs != 0,
"CreateColorSpace failed\n");
274 ok(hobj == hcs,
"OBJ_COLORSPACE is wrong: %p\n", hobj);
281 ok(!hobj,
"OBJ_REGION is wrong: %p\n", hobj);
289 RECT rc = { 5, 5, 15, 15 };
291 ok(
ret,
"RectInRegion should return TRUE\n");
295 ok(
ret,
"RectInRegion should return TRUE\n");
299 ok(
ret,
"RectInRegion should return TRUE\n");
303 ok(
ret,
"RectInRegion should return TRUE\n");
309 ok(
ret,
"RectInRegion should return TRUE\n");
313 ok(
ret,
"RectInRegion should return TRUE\n");
317 ok(
ret,
"RectInRegion should return TRUE\n");
321 ok(
ret,
"RectInRegion should return TRUE\n");
330 HRGN
hrgn, hrgn_test;
339 { 0x00000000, 0x00000000,
TRUE },
340 { 0x00000000, 0x0000ffe0,
FALSE },
341 { 0x00000000, 0x0000ffb0,
FALSE },
342 { 0xffffffff, 0xffff0000,
FALSE },
343 { 0xffffffff, 0x00000000,
TRUE },
344 { 0xdeadbeef, 0x00000000,
TRUE },
345 { 0xcccccccc, 0xcccccccc,
FALSE }
348 if (
sizeof(
void*) != 8)
361 ok( cases[
i].
ret ==
ret,
"DeleteObject should return %s (%p)\n",
362 cases[
i].
ret ?
"TRUE" :
"FALSE", hrgn_test);
388 ok(
entry->Unique ==
handle >> 16,
"Unique = %x, expected %x\n",
399 "ExtType = %x, expected NTGDI_OBJ_DC\n",
entry->ExtType);
401 ok(
entry->StockFlag == is_stock,
"StockFlag = %x\n",
entry->StockFlag);
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);
422 if (
sizeof(
void *) == 4 && !
is_wow64)
424 skip(
"Skipping shared memory tests on 32-bit Windows\n");
430 ok(
hrgn != 0,
"CreateRectRgn failed\n");
440 ok(
entry->Unique ==
handle >> 16,
"Unique = %x, expected %x\n",
444 ok(
entry->Object,
"Object = NULL\n");
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);
static POBJECT_TYPE GetObjectType(IN PCWSTR TypeName)
#define ERROR_INVALID_PARAMETER
#define GetCurrentProcess()
#define ERROR_INVALID_HANDLE
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)
static unsigned char buff[32768]
GLuint GLuint GLsizei GLenum type
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
static void test_thread_objects(void)
static void test_shared_handle_table(void)
static void test_gdi_objects(void)
static void test_shared_handle_entry(HGDIOBJ obj, unsigned int type, BOOL is_stock)
static DWORD WINAPI thread_proc(void *param)
static void test_GetCurrentObject(void)
static void test_handles_on_win64(void)
static GDI_SHARED_MEMORY * get_gdi_shared(void)
static void test_region(void)
static const unsigned char metafile[]
static const unsigned char enhmetafile[]
unsigned __int3264 UINT_PTR
GDI_HANDLE_ENTRY Handles[GDI_MAX_HANDLE_COUNT]
ULONG64 GdiSharedHandleTable
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentProcessId(void)
#define NTGDI_OBJ_ENHMETAFILE
#define NTGDI_OBJ_ENHMETADC
#define NTGDI_OBJ_METAFILE
#define NTGDI_HANDLE_TYPE_SHIFT
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)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
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)
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)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateDCA(_In_opt_ LPCSTR pszDriver, _In_opt_ LPCSTR pszDevice, _In_opt_ LPCSTR pszOutput, _In_opt_ const DEVMODEA *pdmInit)
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)
HCOLORSPACE WINAPI CreateColorSpaceA(_In_ LPLOGCOLORSPACEA pLogColorSpace)
HDC WINAPI CreateMetaFileW(_In_opt_ LPCWSTR)
#define OUT_DEFAULT_PRECIS
HENHMETAFILE WINAPI CloseEnhMetaFile(_In_ HDC hdc)
#define CLIP_DEFAULT_PRECIS
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)
HPALETTE WINAPI CreateHalftonePalette(_In_opt_ HDC)
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)