mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[GDI32_APITEST] Add tests for truncated and extended handle to GetObject test
This commit is contained in:
parent
bdd4d5d8d8
commit
4048935988
1 changed files with 15 additions and 0 deletions
|
@ -344,6 +344,21 @@ Test_Brush(void)
|
|||
|
||||
ok(GetObjectW((HANDLE)GDI_OBJECT_TYPE_BRUSH, sizeof(LOGBRUSH), &logbrush) == 0, "\n");
|
||||
ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
|
||||
|
||||
/* Test handle fixup */
|
||||
hBrush = (HBRUSH)((ULONG_PTR)GetStockObject(WHITE_BRUSH) & 0xFFFF);
|
||||
ok(GetObjectW(hBrush, sizeof(LOGBRUSH), &logbrush) == sizeof(LOGBRUSH),
|
||||
"GetObject(0x%p, ...) failed.\n", hBrush);
|
||||
|
||||
#ifdef _WIN64
|
||||
/* Test upper 32 bits */
|
||||
hBrush = (HBRUSH)((ULONG64)GetStockObject(WHITE_BRUSH) | 0xFFFFFFFF00000000ULL);
|
||||
ok(GetObjectW(hBrush, sizeof(LOGBRUSH), &logbrush) == sizeof(LOGBRUSH),
|
||||
"GetObject(0x%p, ...) failed.\n", hBrush);
|
||||
hBrush = (HBRUSH)((ULONG64)GetStockObject(WHITE_BRUSH) | 0x537F9F2F00000000ULL);
|
||||
ok(GetObjectW(hBrush, sizeof(LOGBRUSH), &logbrush) == sizeof(LOGBRUSH),
|
||||
"GetObject(0x%p, ...) failed.\n", hBrush);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue