From a23e8da23edebbcdc6839a7172547b667f4493ed Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 13 Apr 2024 15:03:07 +0300 Subject: [PATCH] [WIN32NT_APITEST] Fix NtGdiCreateBitmap test on x64 --- .../rostests/apitests/win32nt/ntgdi/NtGdiCreateBitmap.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/rostests/apitests/win32nt/ntgdi/NtGdiCreateBitmap.c b/modules/rostests/apitests/win32nt/ntgdi/NtGdiCreateBitmap.c index fee272af496..2882b0ca332 100644 --- a/modules/rostests/apitests/win32nt/ntgdi/NtGdiCreateBitmap.c +++ b/modules/rostests/apitests/win32nt/ntgdi/NtGdiCreateBitmap.c @@ -54,10 +54,17 @@ void Test_NtGdiCreateBitmap_Params(void) ok_ptr(NtGdiCreateBitmap(1, -2, 1, 1, (BYTE*)(LONG_PTR)0x80001234), NULL); ok_long(GetLastError(), ERROR_SUCCESS); +#ifndef _WIN64 // Win64 doesn't fail here /* Test huge size */ SetLastError(ERROR_SUCCESS); ok_ptr(NtGdiCreateBitmap(100000, 100000, 1, 1, NULL), NULL); ok_long(GetLastError(), ERROR_NOT_ENOUGH_MEMORY); +#endif + + /* Test too huge size */ + SetLastError(ERROR_SUCCESS); + ok_ptr(NtGdiCreateBitmap(100000, 100000, 1, 32, NULL), NULL); + ok_long(GetLastError(), ERROR_INVALID_PARAMETER); /* Test huge size and valid bits */ SetLastError(ERROR_SUCCESS);