winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2022
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1024 discussions
Start a n
N
ew thread
Rafał Harabień : comctl32: Send WM_CTLCOLORSTATIC for all static control types.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: 176bd922dfaaa2052083474d439156a3d1501895 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=176bd922dfaaa2052083474d…
Author: Rafał Harabień <rafalh92(a)outlook.com> Date: Sun Apr 3 01:37:35 2022 +0200 comctl32: Send WM_CTLCOLORSTATIC for all static control types. Signed-off-by: Rafał Harabień <rafalh92(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/static.c | 134 ++++++++++++++++++++----------------------- dlls/comctl32/tests/misc.c | 4 +- dlls/comctl32/tests/static.c | 16 +++--- 3 files changed, 71 insertions(+), 83 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=176bd922dfaaa2052083…
1
0
0
0
Rafał Harabień : comctl32: Fix handling of SS_ETCHEDHORZ/SS_ETCHEDVERT static control styles.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: 4e8277e633ed9392f6d33388f0c7c7d9ec511861 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4e8277e633ed9392f6d33388…
Author: Rafał Harabień <rafalh92(a)outlook.com> Date: Sun Apr 3 01:37:34 2022 +0200 comctl32: Fix handling of SS_ETCHEDHORZ/SS_ETCHEDVERT static control styles. Instead of drawing the frame in WM_PAINT use WS_EX_STATICEDGE style that adds the frame outside of the client rect and change control size after creation to make it look like a line. Signed-off-by: Rafał Harabień <rafalh92(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/static.c | 30 +++++++++++++++--------------- dlls/comctl32/tests/static.c | 6 +++--- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c index 9b20e6a8b66..0d50c2fe31c 100644 --- a/dlls/comctl32/static.c +++ b/dlls/comctl32/static.c @@ -84,8 +84,8 @@ static const pfPaint staticPaintFunc[SS_TYPEMASK+1] = STATIC_PaintOwnerDrawfn, /* SS_OWNERDRAW */ STATIC_PaintBitmapfn, /* SS_BITMAP */ STATIC_PaintEnhMetafn, /* SS_ENHMETAFILE */ - STATIC_PaintEtchedfn, /* SS_ETCHEDHORZ */ - STATIC_PaintEtchedfn, /* SS_ETCHEDVERT */ + NULL, /* SS_ETCHEDHORZ */ + NULL, /* SS_ETCHEDVERT */ STATIC_PaintEtchedfn, /* SS_ETCHEDFRAME */ }; @@ -530,10 +530,21 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, { CREATESTRUCTW *cs = (CREATESTRUCTW *)lParam; - if (full_style & SS_SUNKEN) + if (full_style & SS_SUNKEN || style == SS_ETCHEDHORZ || style == SS_ETCHEDVERT) SetWindowLongW( hwnd, GWL_EXSTYLE, GetWindowLongW( hwnd, GWL_EXSTYLE ) | WS_EX_STATICEDGE ); + if (style == SS_ETCHEDHORZ || style == SS_ETCHEDVERT) { + RECT rc; + GetClientRect(hwnd, &rc); + if (style == SS_ETCHEDHORZ) + rc.bottom = rc.top; + else + rc.right = rc.left; + AdjustWindowRectEx(&rc, full_style, FALSE, GetWindowLongW(hwnd, GWL_EXSTYLE)); + SetWindowPos(hwnd, NULL, 0, 0, rc.right - rc.left, rc.bottom - rc.top, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER); + } + switch (style) { case SS_ICON: @@ -915,18 +926,7 @@ static void STATIC_PaintEtchedfn( HWND hwnd, HDC hdc, DWORD style ) /* FIXME: sometimes (not always) sends WM_CTLCOLORSTATIC */ GetClientRect( hwnd, &rc ); - switch (style & SS_TYPEMASK) - { - case SS_ETCHEDHORZ: - DrawEdge(hdc, &rc, EDGE_ETCHED, BF_TOP | BF_BOTTOM); - break; - case SS_ETCHEDVERT: - DrawEdge(hdc, &rc, EDGE_ETCHED, BF_LEFT | BF_RIGHT); - break; - case SS_ETCHEDFRAME: - DrawEdge(hdc, &rc, EDGE_ETCHED, BF_RECT); - break; - } + DrawEdge(hdc, &rc, EDGE_ETCHED, BF_RECT); } void STATIC_Register(void) diff --git a/dlls/comctl32/tests/static.c b/dlls/comctl32/tests/static.c index a8f8612747a..c78cf0d80b2 100644 --- a/dlls/comctl32/tests/static.c +++ b/dlls/comctl32/tests/static.c @@ -91,17 +91,17 @@ static void test_updates(int style, int flags) exstyle = GetWindowLongW(hStatic, GWL_EXSTYLE); if (style == SS_ETCHEDHORZ || style == SS_ETCHEDVERT || style == SS_SUNKEN) - todo_wine_if(style == SS_ETCHEDHORZ || style == SS_ETCHEDVERT) ok(exstyle == WS_EX_STATICEDGE, "expected WS_EX_STATICEDGE, got %d\n", exstyle); + ok(exstyle == WS_EX_STATICEDGE, "expected WS_EX_STATICEDGE, got %ld\n", exstyle); else ok(exstyle == 0, "expected 0, got %ld\n", exstyle); GetClientRect(hStatic, &rcClient); if (style == SS_ETCHEDVERT) - todo_wine ok(rcClient.right == 0, "expected zero width, got %d\n", rcClient.right); + ok(rcClient.right == 0, "expected zero width, got %ld\n", rcClient.right); else ok(rcClient.right > 0, "expected non-zero width, got %ld\n", rcClient.right); if (style == SS_ETCHEDHORZ) - todo_wine ok(rcClient.bottom == 0, "expected zero height, got %d\n", rcClient.bottom); + ok(rcClient.bottom == 0, "expected zero height, got %ld\n", rcClient.bottom); else ok(rcClient.bottom > 0, "expected non-zero height, got %ld\n", rcClient.bottom);
1
0
0
0
Rafał Harabień : comctl32/tests: Add more static control tests.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: 010eb02dc26e205ad0dd464d60eb2fcefdb549fa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=010eb02dc26e205ad0dd464d…
Author: Rafał Harabień <rafalh92(a)outlook.com> Date: Sun Apr 3 01:37:33 2022 +0200 comctl32/tests: Add more static control tests. Signed-off-by: Rafał Harabień <rafalh92(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/static.c | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/tests/static.c b/dlls/comctl32/tests/static.c index 7b6ac679c92..a8f8612747a 100644 --- a/dlls/comctl32/tests/static.c +++ b/dlls/comctl32/tests/static.c @@ -82,10 +82,29 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara static void test_updates(int style, int flags) { HWND hStatic = create_static(style); - RECT r1 = {20, 20, 30, 30}; + RECT r1 = {20, 20, 30, 30}, rcClient; int exp; + LONG exstyle; flush_events(); + trace("Testing style 0x%x\n", style); + + exstyle = GetWindowLongW(hStatic, GWL_EXSTYLE); + if (style == SS_ETCHEDHORZ || style == SS_ETCHEDVERT || style == SS_SUNKEN) + todo_wine_if(style == SS_ETCHEDHORZ || style == SS_ETCHEDVERT) ok(exstyle == WS_EX_STATICEDGE, "expected WS_EX_STATICEDGE, got %d\n", exstyle); + else + ok(exstyle == 0, "expected 0, got %ld\n", exstyle); + + GetClientRect(hStatic, &rcClient); + if (style == SS_ETCHEDVERT) + todo_wine ok(rcClient.right == 0, "expected zero width, got %d\n", rcClient.right); + else + ok(rcClient.right > 0, "expected non-zero width, got %ld\n", rcClient.right); + if (style == SS_ETCHEDHORZ) + todo_wine ok(rcClient.bottom == 0, "expected zero height, got %d\n", rcClient.bottom); + else + ok(rcClient.bottom > 0, "expected non-zero height, got %ld\n", rcClient.bottom); + g_nReceivedColorStatic = 0; /* during each update parent WndProc will test the WM_CTLCOLORSTATIC message */ InvalidateRect(hMainWnd, NULL, FALSE); @@ -404,14 +423,20 @@ START_TEST(static) ShowWindow(hMainWnd, SW_SHOW); test_updates(0, 0); - test_updates(SS_SIMPLE, 0); test_updates(SS_ICON, 0); - test_updates(SS_BITMAP, 0); - test_updates(SS_BITMAP | SS_CENTERIMAGE, 0); test_updates(SS_BLACKRECT, TODO_COUNT); test_updates(SS_WHITERECT, TODO_COUNT); + test_updates(SS_BLACKFRAME, TODO_COUNT); + test_updates(SS_WHITEFRAME, TODO_COUNT); + test_updates(SS_USERITEM, TODO_COUNT); + test_updates(SS_SIMPLE, 0); + test_updates(SS_OWNERDRAW, 0); + test_updates(SS_BITMAP, 0); + test_updates(SS_BITMAP | SS_CENTERIMAGE, 0); test_updates(SS_ETCHEDHORZ, TODO_COUNT); test_updates(SS_ETCHEDVERT, TODO_COUNT); + test_updates(SS_ETCHEDFRAME, TODO_COUNT); + test_updates(SS_SUNKEN, 0); test_set_text(); test_set_image(); test_STM_SETIMAGE();
1
0
0
0
Daniel Lehman : ntdll: Return success for magic handles.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: 1a18f3b916ef0735c5dd526251cd18a1866e2e1d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1a18f3b916ef0735c5dd5262…
Author: Daniel Lehman <dlehman25(a)gmail.com> Date: Sun Apr 3 00:13:36 2022 -0700 ntdll: Return success for magic handles. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51529
Signed-off-by: Daniel Lehman <dlehman25(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/exception.c | 8 -------- dlls/ntdll/unix/server.c | 3 +++ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index 8af8d6b70da..42722e7b952 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -1223,7 +1223,6 @@ static void test_debugger(DWORD cont_status) } else if (stage == 13) { - todo_wine ok(FALSE || broken(TRUE) /* < Win10 */, "should not throw exception\n"); continuestatus = DBG_EXCEPTION_NOT_HANDLED; } @@ -3923,7 +3922,6 @@ static void test_debugger(DWORD cont_status) } else if (stage == 13) { - todo_wine ok(FALSE || broken(TRUE) /* < Win10 */, "should not throw exception\n"); continuestatus = DBG_EXCEPTION_NOT_HANDLED; } @@ -6627,7 +6625,6 @@ static void test_debugger(DWORD cont_status) } else if (stage == 13) { - todo_wine ok(FALSE || broken(TRUE) /* < Win10 */, "should not throw exception\n"); continuestatus = DBG_EXCEPTION_NOT_HANDLED; } @@ -7881,7 +7878,6 @@ static void test_debugger(DWORD cont_status) } else if (stage == 13) { - todo_wine ok(FALSE || broken(TRUE) /* < Win10 */, "should not throw exception\n"); continuestatus = DBG_EXCEPTION_NOT_HANDLED; } @@ -8624,24 +8620,20 @@ static void test_closehandle(DWORD numexc, HANDLE handle) ret = CloseHandle(handle); ok(expectret || (GetLastError() == ERROR_INVALID_HANDLE), "CloseHandle had wrong GetLastError(), got %lu for %p\n", GetLastError(), handle); - todo_wine_if(is_magic_handle(handle)) { ok(ret == expectret || broken(HandleToLong(handle) < 0) /* < Win10 */, "CloseHandle expected %d, got %d for %p\n", expectret, ret, handle); ok(invalid_handle_exceptions == numexc || broken(!numexc && is_magic_handle(handle)), /* < Win10 */ "CloseHandle generated %ld exceptions, expected %ld for %p\n", invalid_handle_exceptions, numexc, handle); - } invalid_handle_exceptions = 0; expect = expectret ? STATUS_SUCCESS : STATUS_INVALID_HANDLE; status = pNtClose(handle); - todo_wine_if(is_magic_handle(handle)) { ok(status == expect || broken(HandleToLong(handle) < 0), /* < Win10 */ "NtClose returned unexpected status %#lx, expected %#lx for %p\n", status, expect, handle); ok(invalid_handle_exceptions == numexc || broken(!numexc && is_magic_handle(handle)), /* < Win10 */ "CloseHandle generated %ld exceptions, expected %ld for %p\n", invalid_handle_exceptions, numexc, handle); - } pRtlRemoveVectoredExceptionHandler(vectored_handler); } diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c index ab9d99c4f47..77e8d5c7566 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c @@ -1704,6 +1704,9 @@ NTSTATUS WINAPI NtClose( HANDLE handle ) NTSTATUS ret; int fd; + if (HandleToLong( handle ) >= ~5 && HandleToLong( handle ) <= ~0) + return STATUS_SUCCESS; + server_enter_uninterrupted_section( &fd_cache_mutex, &sigset ); /* always remove the cached fd; if the server request fails we'll just
1
0
0
0
Daniel Lehman : ntdll/tests: Test return values from CloseHandle.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: 18f46e5a57b6c7655dd0c75e89083cf76e67cf9d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=18f46e5a57b6c7655dd0c75e…
Author: Daniel Lehman <dlehman25(a)gmail.com> Date: Sun Apr 3 00:13:35 2022 -0700 ntdll/tests: Test return values from CloseHandle. Signed-off-by: Daniel Lehman <dlehman25(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/exception.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index 98d185f5f07..8af8d6b70da 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -8606,7 +8606,9 @@ static inline BOOL is_magic_handle(HANDLE handle) static void test_closehandle(DWORD numexc, HANDLE handle) { + NTSTATUS status, expect; PVOID vectored_handler; + BOOL ret, expectret; if (!pRtlAddVectoredExceptionHandler || !pRtlRemoveVectoredExceptionHandler || !pRtlRaiseException) { @@ -8618,18 +8620,28 @@ static void test_closehandle(DWORD numexc, HANDLE handle) ok(vectored_handler != 0, "RtlAddVectoredExceptionHandler failed\n"); invalid_handle_exceptions = 0; - CloseHandle(handle); - todo_wine_if(is_magic_handle(handle)) + expectret = is_magic_handle(handle) || broken(numexc && sizeof(handle) == 4); /* < Win10 */ + ret = CloseHandle(handle); + ok(expectret || (GetLastError() == ERROR_INVALID_HANDLE), + "CloseHandle had wrong GetLastError(), got %lu for %p\n", GetLastError(), handle); + todo_wine_if(is_magic_handle(handle)) { + ok(ret == expectret || broken(HandleToLong(handle) < 0) /* < Win10 */, + "CloseHandle expected %d, got %d for %p\n", expectret, ret, handle); ok(invalid_handle_exceptions == numexc || broken(!numexc && is_magic_handle(handle)), /* < Win10 */ "CloseHandle generated %ld exceptions, expected %ld for %p\n", invalid_handle_exceptions, numexc, handle); + } invalid_handle_exceptions = 0; - pNtClose(handle); - todo_wine_if(is_magic_handle(handle)) + expect = expectret ? STATUS_SUCCESS : STATUS_INVALID_HANDLE; + status = pNtClose(handle); + todo_wine_if(is_magic_handle(handle)) { + ok(status == expect || broken(HandleToLong(handle) < 0), /* < Win10 */ + "NtClose returned unexpected status %#lx, expected %#lx for %p\n", status, expect, handle); ok(invalid_handle_exceptions == numexc || broken(!numexc && is_magic_handle(handle)), /* < Win10 */ "CloseHandle generated %ld exceptions, expected %ld for %p\n", invalid_handle_exceptions, numexc, handle); + } pRtlRemoveVectoredExceptionHandler(vectored_handler); }
1
0
0
0
Daniel Lehman : ntdll/tests: Add some CloseHandle exception tests.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: bae702a0ee6b20b40c0584f054cbaf1a5339dcdb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bae702a0ee6b20b40c0584f0…
Author: Daniel Lehman <dlehman25(a)gmail.com> Date: Sun Apr 3 00:13:34 2022 -0700 ntdll/tests: Add some CloseHandle exception tests. Signed-off-by: Daniel Lehman <dlehman25(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/exception.c | 70 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 56 insertions(+), 14 deletions(-) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index e01e280d741..98d185f5f07 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -1211,7 +1211,7 @@ static void test_debugger(DWORD cont_status) if (stage == 10) continuestatus = DBG_EXCEPTION_NOT_HANDLED; } - else if (stage == 11 || stage == 12 || stage == 13) + else if (stage == 11 || stage == 12) { ok(de.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_INVALID_HANDLE, "unexpected exception code %08lx, expected %08lx\n", de.u.Exception.ExceptionRecord.ExceptionCode, @@ -1219,7 +1219,13 @@ static void test_debugger(DWORD cont_status) ok(de.u.Exception.ExceptionRecord.NumberParameters == 0, "unexpected number of parameters %ld, expected 0\n", de.u.Exception.ExceptionRecord.NumberParameters); - if (stage == 12|| stage == 13) continuestatus = DBG_EXCEPTION_NOT_HANDLED; + if (stage == 12) continuestatus = DBG_EXCEPTION_NOT_HANDLED; + } + else if (stage == 13) + { + todo_wine + ok(FALSE || broken(TRUE) /* < Win10 */, "should not throw exception\n"); + continuestatus = DBG_EXCEPTION_NOT_HANDLED; } else if (stage == 14 || stage == 15) { @@ -3905,7 +3911,7 @@ static void test_debugger(DWORD cont_status) "expected Rip = %p, got %p\n", (char *)code_mem_address + 2, (char *)ctx.Rip); if (stage == 10) continuestatus = DBG_EXCEPTION_NOT_HANDLED; } - else if (stage == 11 || stage == 12 || stage == 13) + else if (stage == 11 || stage == 12) { ok(de.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_INVALID_HANDLE, "unexpected exception code %08lx, expected %08lx\n", de.u.Exception.ExceptionRecord.ExceptionCode, @@ -3913,7 +3919,13 @@ static void test_debugger(DWORD cont_status) ok(de.u.Exception.ExceptionRecord.NumberParameters == 0, "unexpected number of parameters %ld, expected 0\n", de.u.Exception.ExceptionRecord.NumberParameters); - if (stage == 12|| stage == 13) continuestatus = DBG_EXCEPTION_NOT_HANDLED; + if (stage == 12) continuestatus = DBG_EXCEPTION_NOT_HANDLED; + } + else if (stage == 13) + { + todo_wine + ok(FALSE || broken(TRUE) /* < Win10 */, "should not throw exception\n"); + continuestatus = DBG_EXCEPTION_NOT_HANDLED; } else if (stage == 14 || stage == 15) { @@ -6603,7 +6615,7 @@ static void test_debugger(DWORD cont_status) "expected Pc = %p, got 0x%x\n", (char *)code_mem_address + 3, ctx.Pc); if (stage == 10) continuestatus = DBG_EXCEPTION_NOT_HANDLED; } - else if (stage == 11 || stage == 12 || stage == 13) + else if (stage == 11 || stage == 12) { ok(de.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_INVALID_HANDLE, "unexpected exception code %08x, expected %08x\n", de.u.Exception.ExceptionRecord.ExceptionCode, @@ -6611,7 +6623,13 @@ static void test_debugger(DWORD cont_status) ok(de.u.Exception.ExceptionRecord.NumberParameters == 0, "unexpected number of parameters %d, expected 0\n", de.u.Exception.ExceptionRecord.NumberParameters); - if (stage == 12|| stage == 13) continuestatus = DBG_EXCEPTION_NOT_HANDLED; + if (stage == 12) continuestatus = DBG_EXCEPTION_NOT_HANDLED; + } + else if (stage == 13) + { + todo_wine + ok(FALSE || broken(TRUE) /* < Win10 */, "should not throw exception\n"); + continuestatus = DBG_EXCEPTION_NOT_HANDLED; } else ok(FALSE, "unexpected stage %x\n", stage); @@ -7851,7 +7869,7 @@ static void test_debugger(DWORD cont_status) "expected Pc = %p, got %p\n", (char *)code_mem_address + 4, (char *)ctx.Pc); if (stage == 10) continuestatus = DBG_EXCEPTION_NOT_HANDLED; } - else if (stage == 11 || stage == 12 || stage == 13) + else if (stage == 11 || stage == 12) { ok(de.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_INVALID_HANDLE, "unexpected exception code %08x, expected %08x\n", de.u.Exception.ExceptionRecord.ExceptionCode, @@ -7859,7 +7877,13 @@ static void test_debugger(DWORD cont_status) ok(de.u.Exception.ExceptionRecord.NumberParameters == 0, "unexpected number of parameters %d, expected 0\n", de.u.Exception.ExceptionRecord.NumberParameters); - if (stage == 12|| stage == 13) continuestatus = DBG_EXCEPTION_NOT_HANDLED; + if (stage == 12) continuestatus = DBG_EXCEPTION_NOT_HANDLED; + } + else if (stage == 13) + { + todo_wine + ok(FALSE || broken(TRUE) /* < Win10 */, "should not throw exception\n"); + continuestatus = DBG_EXCEPTION_NOT_HANDLED; } else ok(FALSE, "unexpected stage %x\n", stage); @@ -8575,6 +8599,11 @@ static LONG CALLBACK invalid_handle_vectored_handler(EXCEPTION_POINTERS *Excepti return (rec->ExceptionCode == EXCEPTION_INVALID_HANDLE) ? EXCEPTION_CONTINUE_EXECUTION : EXCEPTION_CONTINUE_SEARCH; } +static inline BOOL is_magic_handle(HANDLE handle) +{ + return HandleToLong(handle) >= ~5 && HandleToLong(handle) <= ~0; +} + static void test_closehandle(DWORD numexc, HANDLE handle) { PVOID vectored_handler; @@ -8590,13 +8619,17 @@ static void test_closehandle(DWORD numexc, HANDLE handle) invalid_handle_exceptions = 0; CloseHandle(handle); - ok(invalid_handle_exceptions == numexc, "CloseHandle generated %ld exceptions, expected %ld\n", - invalid_handle_exceptions, numexc); + todo_wine_if(is_magic_handle(handle)) + ok(invalid_handle_exceptions == numexc || broken(!numexc && is_magic_handle(handle)), /* < Win10 */ + "CloseHandle generated %ld exceptions, expected %ld for %p\n", + invalid_handle_exceptions, numexc, handle); invalid_handle_exceptions = 0; pNtClose(handle); - ok(invalid_handle_exceptions == numexc, "NtClose generated %ld exceptions, expected %ld\n", - invalid_handle_exceptions, numexc); + todo_wine_if(is_magic_handle(handle)) + ok(invalid_handle_exceptions == numexc || broken(!numexc && is_magic_handle(handle)), /* < Win10 */ + "CloseHandle generated %ld exceptions, expected %ld for %p\n", + invalid_handle_exceptions, numexc, handle); pRtlRemoveVectoredExceptionHandler(vectored_handler); } @@ -10676,10 +10709,19 @@ START_TEST(exception) test_breakpoint(1); test_stage = 11; test_closehandle(0, (HANDLE)0xdeadbeef); + test_closehandle(0, (HANDLE)0x7fffffff); test_stage = 12; test_closehandle(1, (HANDLE)0xdeadbeef); - test_stage = 13; - test_closehandle(0, 0); /* Special case. */ + test_closehandle(1, (HANDLE)~(ULONG_PTR)6); + test_stage = 13; /* special cases */ + test_closehandle(0, 0); + test_closehandle(0, INVALID_HANDLE_VALUE); + test_closehandle(0, GetCurrentProcess()); + test_closehandle(0, GetCurrentThread()); + test_closehandle(0, (HANDLE)~(ULONG_PTR)2); + test_closehandle(0, GetCurrentProcessToken()); + test_closehandle(0, GetCurrentThreadToken()); + test_closehandle(0, GetCurrentThreadEffectiveToken()); #if defined(__i386__) || defined(__x86_64__) test_stage = 14; test_debuggee_xstate();
1
0
0
0
Alex Henrie : mciwave: Fix bad free in MCI_SendCommandAsync (Coverity).
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: c814fbe1df962d45134a7e00fe923d6707b03445 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c814fbe1df962d45134a7e00…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sun Apr 3 21:57:45 2022 -0600 mciwave: Fix bad free in MCI_SendCommandAsync (Coverity). Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mciwave/mciwave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/mciwave/mciwave.c b/dlls/mciwave/mciwave.c index 3ca884ed6e0..b2582a56123 100644 --- a/dlls/mciwave/mciwave.c +++ b/dlls/mciwave/mciwave.c @@ -124,7 +124,7 @@ static DWORD MCI_SendCommandAsync(UINT wDevID, async_cmd cmd, DWORD_PTR dwParam1 WARN("Couldn't allocate thread for async command handling, sending synchronously\n"); if (handles[1]) CloseHandle(handles[1]); sca->evt = NULL; - return MCI_SCAStarter(&sca); + return MCI_SCAStarter(sca); } SetThreadPriority(handles[0], THREAD_PRIORITY_TIME_CRITICAL);
1
0
0
0
Alex Henrie : shell32: Fix sizeof argument in DoPaste (Coverity).
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: 68c3ac76808e747f8a1fd9f5458bee5dc33fed03 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=68c3ac76808e747f8a1fd9f5…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sun Apr 3 21:56:22 2022 -0600 shell32: Fix sizeof argument in DoPaste (Coverity). Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/shlview_cmenu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c index 176ce6061e6..14cd9aeeebe 100644 --- a/dlls/shell32/shlview_cmenu.c +++ b/dlls/shell32/shlview_cmenu.c @@ -1217,7 +1217,7 @@ static HRESULT DoPaste(ContextMenu *This) TRACE("CF_HDROP=%p\n", medium.u.hGlobal); count = DragQueryFileW(medium.u.hGlobal, -1, NULL, 0); - pidls = SHAlloc(count*sizeof(ITEMIDLIST**)); + pidls = SHAlloc(count*sizeof(ITEMIDLIST*)); if (pidls) { for (i = 0; i < count; i++)
1
0
0
0
Jacek Caban : win32u: Don't use CDECL for user driver functions.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: f6524f7a3a8048424071dcef3e367bac00a68599 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f6524f7a3a8048424071dcef…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Apr 7 15:27:15 2022 +0200 win32u: Don't use CDECL for user driver functions. They are no longer used from PE code. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/win32u/driver.c | 168 ++++++++++++++++++++-------------------- dlls/wineandroid.drv/android.h | 52 ++++++------- dlls/wineandroid.drv/init.c | 12 +-- dlls/wineandroid.drv/keyboard.c | 6 +- dlls/wineandroid.drv/window.c | 42 +++++----- dlls/winemac.drv/clipboard.c | 2 +- dlls/winemac.drv/display.c | 17 ++-- dlls/winemac.drv/event.c | 4 +- dlls/winemac.drv/keyboard.c | 20 ++--- dlls/winemac.drv/macdrv.h | 112 +++++++++++++-------------- dlls/winemac.drv/macdrv_main.c | 4 +- dlls/winemac.drv/mouse.c | 12 +-- dlls/winemac.drv/opengl.c | 2 +- dlls/winemac.drv/vulkan.c | 2 +- dlls/winemac.drv/window.c | 42 +++++----- dlls/winex11.drv/clipboard.c | 2 +- dlls/winex11.drv/display.c | 4 +- dlls/winex11.drv/event.c | 6 +- dlls/winex11.drv/init.c | 4 +- dlls/winex11.drv/keyboard.c | 14 ++-- dlls/winex11.drv/mouse.c | 10 +-- dlls/winex11.drv/settings.c | 6 +- dlls/winex11.drv/window.c | 54 ++++++------- dlls/winex11.drv/x11drv.h | 106 ++++++++++++------------- dlls/winex11.drv/x11drv_main.c | 4 +- include/wine/gdi_driver.h | 99 +++++++++++------------ 26 files changed, 403 insertions(+), 403 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=f6524f7a3a8048424071…
1
0
0
0
Jacek Caban : win32u: Move __wine_set_user_driver implementation from user32.
by Alexandre Julliard
07 Apr '22
07 Apr '22
Module: wine Branch: master Commit: 1d0fbcc9d997b4d0adf5eeb8b467f54c9853d584 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1d0fbcc9d997b4d0adf5eeb8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Apr 7 15:26:59 2022 +0200 win32u: Move __wine_set_user_driver implementation from user32. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/Makefile.in | 1 - dlls/user32/clipboard.c | 2 +- dlls/user32/driver.c | 171 ------------------------------------------- dlls/user32/user32.spec | 1 - dlls/user32/user_main.c | 2 - dlls/user32/user_private.h | 7 -- dlls/win32u/driver.c | 34 +++++---- dlls/win32u/gdiobj.c | 2 +- dlls/win32u/ntuser_private.h | 1 - dlls/win32u/sysparams.c | 3 + dlls/win32u/win32u.spec | 2 +- dlls/win32u/win32u_private.h | 2 +- dlls/win32u/wrappers.c | 6 +- include/ntuser.h | 1 + include/wine/gdi_driver.h | 1 - 15 files changed, 31 insertions(+), 205 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=1d0fbcc9d997b4d0adf5…
1
0
0
0
← Newer
1
...
78
79
80
81
82
83
84
...
103
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
Results per page:
10
25
50
100
200