Skip to content

Commit 6529244

Browse files
committed
[WIN32U_APITEST] Fix tests for NtGdiDeleteObjectApp on Vista+
1 parent 1cb7a74 commit 6529244

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

modules/rostests/apitests/win32u/ntgdi/NtGdiDeleteObjectApp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ START_TEST(NtGdiDeleteObjectApp)
5757
SelectObject(hdc, hpen);
5858
ok(NtGdiDeleteObjectApp(hdc) != 0, "NtGdiDeleteObjectApp(hdc) was zero.\n");
5959
ok_long(GetLastError(), 0);
60-
ok_int(GdiIsHandleValid(hdc), 1);
60+
ok_int(GdiIsHandleValid(hdc), (GetNTVersion() >= _WIN32_WINNT_VISTA) ? 0 : 1);
6161
ok_ptr(SelectObject(hdc, GetStockObject(WHITE_PEN)), NULL);
6262
ok_long(GetLastError(), ERROR_INVALID_PARAMETER);
6363

@@ -71,7 +71,7 @@ START_TEST(NtGdiDeleteObjectApp)
7171
ok_ptr(SelectObject(hdc, GetStockObject(WHITE_PEN)), NULL);
7272
ok_long(GetLastError(), ERROR_INVALID_PARAMETER);
7373
/* Make sure */
74-
ok_ptr((void *)NtUserCallOneParam((DWORD_PTR)hdc, ONEPARAM_ROUTINE_RELEASEDC), NULL);
74+
ok_long(ReleaseDC(NULL, hdc), 0);
7575

7676

7777
/* Delete a brush */
@@ -125,7 +125,7 @@ START_TEST(NtGdiDeleteObjectApp)
125125
NtGdiSelectBitmap(hdc, GetStockObject(DEFAULT_BITMAP));
126126
ok_int(GdiIsHandleValid(hbmp), 0);
127127

128-
ok_int(NtGdiDeleteObjectApp(hbmp), 1);
128+
ok_int(NtGdiDeleteObjectApp(hbmp), (GetNTVersion() >= _WIN32_WINNT_WIN10) ? 0 : 1);
129129
ok_long(GetLastError(), 0);
130130
ok_int(GdiIsHandleValid(hbmp), 0);
131131

0 commit comments

Comments
 (0)