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
November 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
1 participants
1171 discussions
Start a n
N
ew thread
Rémi Bernon : comctl32/tests: Remove a now succeeding todo_wine.
by Alexandre Julliard
07 Nov '22
07 Nov '22
Module: wine Branch: master Commit: d7538e339c62770629b5d39506e27269193870ec URL:
https://gitlab.winehq.org/wine/wine/-/commit/d7538e339c62770629b5d39506e272…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Nov 7 19:16:59 2022 +0100 comctl32/tests: Remove a now succeeding todo_wine. Fixed by 33617af8145b6fadfe41d48968a728ff57b3064b. --- dlls/comctl32/tests/edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/comctl32/tests/edit.c b/dlls/comctl32/tests/edit.c index 876cddf0de2..91d16e044a0 100644 --- a/dlls/comctl32/tests/edit.c +++ b/dlls/comctl32/tests/edit.c @@ -3469,7 +3469,7 @@ static void test_change_focus(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); SetFocus(hwnd); while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); - ok_sequence(sequences, COMBINED_SEQ_INDEX, setfocus_combined_seq, "Set focus", TRUE); + ok_sequence(sequences, COMBINED_SEQ_INDEX, setfocus_combined_seq, "Set focus", FALSE); flush_sequences(sequences, NUM_MSG_SEQUENCES); SetFocus(parent_wnd);
1
0
0
0
Sebastián Aedo : netprofm: Implement network_GetNetworkConnections.
by Alexandre Julliard
07 Nov '22
07 Nov '22
Module: wine Branch: master Commit: d0923a2f729fc8d5e872e7882ef00bcd2ef4032f URL:
https://gitlab.winehq.org/wine/wine/-/commit/d0923a2f729fc8d5e872e7882ef00b…
Author: Sebastián Aedo <saedo(a)codeweavers.com> Date: Fri Nov 4 12:39:22 2022 -0300 netprofm: Implement network_GetNetworkConnections. Signed-off-by: Sebastián Aedo <saedo(a)codeweavers.com> --- dlls/netprofm/list.c | 52 ++++++++++++++++++++++++++++++++++++---------- dlls/netprofm/tests/list.c | 4 ++-- 2 files changed, 43 insertions(+), 13 deletions(-) diff --git a/dlls/netprofm/list.c b/dlls/netprofm/list.c index e22609dcaf6..db4f13f532e 100644 --- a/dlls/netprofm/list.c +++ b/dlls/netprofm/list.c @@ -94,6 +94,9 @@ struct sink_entry IUnknown *unk; }; +static HRESULT create_connections_enum( + struct list_manager *, IEnumNetworkConnections** ); + static inline struct list_manager *impl_from_IConnectionPointContainer(IConnectionPointContainer *iface) { return CONTAINING_RECORD(iface, struct list_manager, IConnectionPointContainer_iface); @@ -111,6 +114,12 @@ static inline struct connection_point *impl_from_IConnectionPoint( return CONTAINING_RECORD( iface, struct connection_point, IConnectionPoint_iface ); } +static inline struct list_manager *impl_from_INetworkListManager( + INetworkListManager *iface ) +{ + return CONTAINING_RECORD( iface, struct list_manager, INetworkListManager_iface ); +} + static HRESULT WINAPI connection_point_QueryInterface( IConnectionPoint *iface, REFIID riid, @@ -432,12 +441,42 @@ static HRESULT WINAPI network_GetDomainType( return S_OK; } +static ULONG WINAPI connection_Release( + INetworkConnection *iface ); + static HRESULT WINAPI network_GetNetworkConnections( INetwork *iface, IEnumNetworkConnections **ppEnumNetworkConnection ) { - FIXME( "%p, %p\n", iface, ppEnumNetworkConnection ); - return E_NOTIMPL; + HRESULT hr; + INetworkListManager *network_list_mgr = NULL; + struct list_manager *mgr = NULL; + struct network *current_network = impl_from_INetwork( iface ); + + struct connection *connection, *next; + struct network *network; + + if (FAILED(hr = list_manager_create((void**)&network_list_mgr))) + return hr; + + mgr = impl_from_INetworkListManager(network_list_mgr); + + if (FAILED(hr = create_connections_enum(mgr, ppEnumNetworkConnection))) + return hr; + + TRACE("%p, %s\n", iface, debugstr_guid(¤t_network->id)); + + LIST_FOR_EACH_ENTRY_SAFE(connection, next, &mgr->connections, struct connection, entry) + { + network = impl_from_INetwork(connection->network); + if (!IsEqualGUID(&network->id, ¤t_network->id)) + { + TRACE("Filtering %s\n", debugstr_guid(&network->id)); + list_remove(&connection->entry); + } + } + + return S_OK; } static HRESULT WINAPI network_GetTimeCreatedAndConnected( @@ -881,12 +920,6 @@ static HRESULT create_networks_enum( return S_OK; } -static inline struct list_manager *impl_from_INetworkListManager( - INetworkListManager *iface ) -{ - return CONTAINING_RECORD( iface, struct list_manager, INetworkListManager_iface ); -} - struct connections_enum { IEnumNetworkConnections IEnumNetworkConnections_iface; @@ -1057,9 +1090,6 @@ static HRESULT WINAPI connections_enum_Reset( return S_OK; } -static HRESULT create_connections_enum( - struct list_manager *, IEnumNetworkConnections** ); - static HRESULT WINAPI connections_enum_Clone( IEnumNetworkConnections *iface, IEnumNetworkConnections **ret ) { diff --git a/dlls/netprofm/tests/list.c b/dlls/netprofm/tests/list.c index 6f46c125763..b58aef9bdec 100644 --- a/dlls/netprofm/tests/list.c +++ b/dlls/netprofm/tests/list.c @@ -98,7 +98,7 @@ static void test_INetwork( INetwork *network, INetworkConnection *conn ) conn_iter = NULL; hr = INetwork_GetNetworkConnections( network, &conn_iter ); - todo_wine ok( hr == S_OK, "got %08lx\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); is_connection_present = FALSE; if (conn_iter) @@ -120,7 +120,7 @@ static void test_INetwork( INetwork *network, INetworkConnection *conn ) IEnumNetworkConnections_Release( conn_iter ); } - todo_wine ok( is_connection_present, "connection was not present in network\n" ); + ok( is_connection_present, "connection was not present in network\n" ); } static void test_INetworkConnection( INetworkConnection *conn )
1
0
0
0
Sebastián Aedo : netprofm: Add INetwork_GetNetworkConnections test.
by Alexandre Julliard
07 Nov '22
07 Nov '22
Module: wine Branch: master Commit: ecbc5da92471fe21dc9d7caee5d1a3dcb3074754 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ecbc5da92471fe21dc9d7caee5d1a3…
Author: Sebastián Aedo <saedo(a)codeweavers.com> Date: Fri Nov 4 16:12:29 2022 -0300 netprofm: Add INetwork_GetNetworkConnections test. Signed-off-by: Sebastián Aedo <saedo(a)codeweavers.com> --- dlls/netprofm/tests/list.c | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/dlls/netprofm/tests/list.c b/dlls/netprofm/tests/list.c index 9295eeebc7c..6f46c125763 100644 --- a/dlls/netprofm/tests/list.c +++ b/dlls/netprofm/tests/list.c @@ -25,15 +25,21 @@ #include "netlistmgr.h" #include "wine/test.h" -static void test_INetwork( INetwork *network ) +static void test_INetwork( INetwork *network, INetworkConnection *conn ) { NLM_NETWORK_CATEGORY category; NLM_CONNECTIVITY connectivity; NLM_DOMAIN_TYPE domain_type; VARIANT_BOOL connected; + IEnumNetworkConnections *conn_iter; + VARIANT_BOOL is_connection_present; + GUID conn_id; + GUID local_conn_id; GUID id; BSTR str; HRESULT hr; + INetworkConnection *local_conn; + ULONG fetched; str = NULL; hr = INetwork_GetName( network, &str ); @@ -81,6 +87,40 @@ static void test_INetwork( INetwork *network ) hr = INetwork_get_IsConnectedToInternet( network, &connected ); ok( hr == S_OK, "got %08lx\n", hr ); trace("connected to internet %d\n", connected); + + if (!conn) return; + + trace("about to test GetNetworkConnections\n"); + memset( &conn_id, 0, sizeof(conn_id) ); + hr = INetworkConnection_GetConnectionId( conn, &conn_id ); + ok( hr == S_OK, "got %08lx\n", hr ); + trace("input connection id %s\n", wine_dbgstr_guid(&conn_id)); + + conn_iter = NULL; + hr = INetwork_GetNetworkConnections( network, &conn_iter ); + todo_wine ok( hr == S_OK, "got %08lx\n", hr ); + + is_connection_present = FALSE; + if (conn_iter) + { + while ((hr = IEnumNetworkConnections_Next( conn_iter, 1, &local_conn, &fetched )) == S_OK) + { + memset( &local_conn_id, 0, sizeof(local_conn_id) ); + hr = INetworkConnection_GetConnectionId( local_conn, &local_conn_id ); + ok( hr == S_OK, "got %08lx\n", hr ); + trace("local connection id %s\n", wine_dbgstr_guid(&local_conn_id)); + + if (IsEqualGUID(&conn_id, &local_conn_id)) + is_connection_present = TRUE; + + INetworkConnection_Release( local_conn ); + local_conn = (void *)0xdeadbeef; + } + ok( !local_conn, "got wrong pointer: %p.\n", local_conn ); + IEnumNetworkConnections_Release( conn_iter ); + } + + todo_wine ok( is_connection_present, "connection was not present in network\n" ); } static void test_INetworkConnection( INetworkConnection *conn ) @@ -130,7 +170,7 @@ static void test_INetworkConnection( INetworkConnection *conn ) ok( hr == S_OK, "got %08lx\n", hr ); if (network) { - test_INetwork( network ); + test_INetwork( network, conn ); INetwork_Release( network ); } @@ -344,7 +384,7 @@ static void test_INetworkListManager( void ) { while ((hr = IEnumNetworks_Next( network_iter, 1, &network, NULL )) == S_OK) { - test_INetwork( network ); + test_INetwork( network, NULL ); INetwork_Release( network ); } IEnumNetworks_Release( network_iter );
1
0
0
0
Tarcísio Ladeia de Oliveira : gdi32/tests: Fix assertion message.
by Alexandre Julliard
07 Nov '22
07 Nov '22
Module: wine Branch: master Commit: 61f566260bd9b461e1ddb93ef9bdeeb94851555f URL:
https://gitlab.winehq.org/wine/wine/-/commit/61f566260bd9b461e1ddb93ef9bdee…
Author: Tarcísio Ladeia de Oliveira <wyrquill(a)gmail.com> Date: Thu Nov 3 11:33:02 2022 -0300 gdi32/tests: Fix assertion message. --- dlls/gdi32/tests/font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 12a5bff5969..86c34a0deaa 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -6520,7 +6520,7 @@ static void test_max_height(void) r = GetTextMetricsA(hdc, &tm1); ok(r, "GetTextMetrics failed\n"); ok(tm1.tmHeight > 0, "expected a positive value, got %ld\n", tm1.tmHeight); - ok(tm1.tmAveCharWidth > 0, "expected a positive value, got %ld\n", tm1.tmHeight); + ok(tm1.tmAveCharWidth > 0, "expected a positive value, got %ld\n", tm1.tmAveCharWidth); DeleteObject(SelectObject(hdc, hfont_old)); /* test the largest value */
1
0
0
0
Eric Pouech : rpcrt4: Fix unexpected exception in ndr_marshal tests.
by Alexandre Julliard
07 Nov '22
07 Nov '22
Module: wine Branch: master Commit: c5e23886b2290304c78101d7927898700974b84a URL:
https://gitlab.winehq.org/wine/wine/-/commit/c5e23886b2290304c78101d7927898…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Fri Nov 4 15:42:41 2022 +0100 rpcrt4: Fix unexpected exception in ndr_marshal tests. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52909
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> --- dlls/rpcrt4/tests/ndr_marshall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c index 5d72f5efc61..bae9b12f7ab 100644 --- a/dlls/rpcrt4/tests/ndr_marshall.c +++ b/dlls/rpcrt4/tests/ndr_marshall.c @@ -154,6 +154,7 @@ static void test_ndr_simple_type(void) StubMsg.BufferLength = 16; StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); + StubMsg.BufferEnd = StubMsg.Buffer + StubMsg.BufferLength; l = 0xcafebabe; NdrSimpleTypeMarshall(&StubMsg, (unsigned char*)&l, FC_LONG); ok(StubMsg.Buffer == StubMsg.BufferStart + 4, "%p %p\n", StubMsg.Buffer, StubMsg.BufferStart);
1
0
0
0
Zebediah Figura : winecoreaudio: Clean up the timer queue handle in DllMain().
by Alexandre Julliard
07 Nov '22
07 Nov '22
Module: wine Branch: master Commit: 98c0bdb9a8c4f658d87a7ded7653e9e74b3769cc URL:
https://gitlab.winehq.org/wine/wine/-/commit/98c0bdb9a8c4f658d87a7ded7653e9…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Oct 16 23:24:11 2022 -0500 winecoreaudio: Clean up the timer queue handle in DllMain(). --- dlls/winecoreaudio.drv/mmdevdrv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index ae2b88d6b79..6715ab72e88 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -210,6 +210,7 @@ BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved) case DLL_PROCESS_DETACH: if (reserved) break; DeleteCriticalSection(&g_sessions_lock); + CloseHandle(g_timer_q); break; } return TRUE;
1
0
0
0
Zebediah Figura : winecoreaudio: Disable thread DllMain() calls.
by Alexandre Julliard
07 Nov '22
07 Nov '22
Module: wine Branch: master Commit: 1a451cb91c14e9a7abdad94045b223517c02c8cb URL:
https://gitlab.winehq.org/wine/wine/-/commit/1a451cb91c14e9a7abdad94045b223…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Oct 16 23:23:56 2022 -0500 winecoreaudio: Disable thread DllMain() calls. --- dlls/winecoreaudio.drv/mmdevdrv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index 5d8a9654a3a..ae2b88d6b79 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -198,6 +198,7 @@ BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved) switch (reason) { case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(dll); if(NtQueryVirtualMemory(GetCurrentProcess(), dll, MemoryWineUnixFuncs, &coreaudio_handle, sizeof(coreaudio_handle), NULL)) return FALSE;
1
0
0
0
Brendan Shanks : ntdll: Add native thread renaming for exception method.
by Alexandre Julliard
07 Nov '22
07 Nov '22
Module: wine Branch: master Commit: 93577c001372460a145460648581fab9a4f3c075 URL:
https://gitlab.winehq.org/wine/wine/-/commit/93577c001372460a145460648581fa…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Wed Oct 19 10:45:16 2022 -0700 ntdll: Add native thread renaming for exception method. --- dlls/ntdll/ntdll_misc.h | 2 ++ dlls/ntdll/signal_arm.c | 2 ++ dlls/ntdll/signal_arm64.c | 2 ++ dlls/ntdll/signal_i386.c | 2 ++ dlls/ntdll/signal_x86_64.c | 2 ++ dlls/ntdll/thread.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ dlls/ntdll/unix/thread.c | 10 ++++++++++ 7 files changed, 65 insertions(+) diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index d55083ae34c..973e985ff42 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -20,6 +20,7 @@ #define __WINE_NTDLL_MISC_H #include <stdarg.h> +#include <stdlib.h> #include <sys/types.h> #include "windef.h" @@ -61,6 +62,7 @@ extern RUNTIME_FUNCTION *lookup_function_info( ULONG_PTR pc, ULONG_PTR *base, LD /* debug helpers */ extern LPCSTR debugstr_us( const UNICODE_STRING *str ) DECLSPEC_HIDDEN; extern const char *debugstr_exception_code( DWORD code ) DECLSPEC_HIDDEN; +extern void set_native_thread_name( DWORD tid, const char *name ) DECLSPEC_HIDDEN; /* init routines */ extern void version_init(void) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c index 0952be6ba33..37f2144e078 100644 --- a/dlls/ntdll/signal_arm.c +++ b/dlls/ntdll/signal_arm.c @@ -482,6 +482,8 @@ NTSTATUS WINAPI KiUserExceptionDispatcher( EXCEPTION_RECORD *rec, CONTEXT *conte else WARN_(threadname)( "Thread ID %04x renamed to %s\n", (DWORD)rec->ExceptionInformation[2], debugstr_a((char *)rec->ExceptionInformation[1]) ); + + set_native_thread_name((DWORD)rec->ExceptionInformation[2], (char *)rec->ExceptionInformation[1]); } else if (rec->ExceptionCode == DBG_PRINTEXCEPTION_C) { diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 799e152ff4c..f644816fb1c 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -514,6 +514,8 @@ NTSTATUS WINAPI KiUserExceptionDispatcher( EXCEPTION_RECORD *rec, CONTEXT *conte else WARN_(threadname)( "Thread ID %04x renamed to %s\n", (DWORD)rec->ExceptionInformation[2], debugstr_a((char *)rec->ExceptionInformation[1]) ); + + set_native_thread_name((DWORD)rec->ExceptionInformation[2], (char *)rec->ExceptionInformation[1]); } else if (rec->ExceptionCode == DBG_PRINTEXCEPTION_C) { diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index acb3937efa8..c8e1b495ac0 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -200,6 +200,8 @@ NTSTATUS WINAPI dispatch_exception( EXCEPTION_RECORD *rec, CONTEXT *context ) else WARN_(threadname)( "Thread ID %04x renamed to %s\n", (DWORD)rec->ExceptionInformation[2], debugstr_a((char *)rec->ExceptionInformation[1]) ); + + set_native_thread_name((DWORD)rec->ExceptionInformation[2], (char *)rec->ExceptionInformation[1]); } else if (rec->ExceptionCode == DBG_PRINTEXCEPTION_C) { diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index b1ab4933b93..b6fb0a2ff1f 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -531,6 +531,8 @@ NTSTATUS WINAPI dispatch_exception( EXCEPTION_RECORD *rec, CONTEXT *context ) else WARN_(threadname)( "Thread ID %04x renamed to %s\n", (DWORD)rec->ExceptionInformation[2], debugstr_a((char *)rec->ExceptionInformation[1]) ); + + set_native_thread_name((DWORD)rec->ExceptionInformation[2], (char *)rec->ExceptionInformation[1]); } else if (rec->ExceptionCode == DBG_PRINTEXCEPTION_C) { diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 37dc7c8ab37..c78ce038892 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -178,6 +178,51 @@ int __cdecl __wine_dbg_output( const char *str ) } +/*********************************************************************** + * set_native_thread_name + */ +void set_native_thread_name( DWORD tid, const char *name ) +{ + THREAD_NAME_INFORMATION info; + HANDLE h = GetCurrentThread(); + WCHAR nameW[64]; + + if (tid != -1) + { + OBJECT_ATTRIBUTES attr; + CLIENT_ID cid; + + attr.Length = sizeof(attr); + attr.RootDirectory = 0; + attr.Attributes = 0; + attr.ObjectName = NULL; + attr.SecurityDescriptor = NULL; + attr.SecurityQualityOfService = NULL; + + cid.UniqueProcess = 0; + cid.UniqueThread = ULongToHandle( tid ); + + if (NtOpenThread( &h, THREAD_QUERY_LIMITED_INFORMATION, &attr, &cid )) return; + } + + if (name) + { + mbstowcs( nameW, name, ARRAY_SIZE(nameW) ); + nameW[ARRAY_SIZE(nameW) - 1] = '\0'; + } + else + { + nameW[0] = '\0'; + } + + RtlInitUnicodeString( &info.ThreadName, nameW ); + NtSetInformationThread( h, ThreadWineNativeThreadName, &info, sizeof(info) ); + + if (h != GetCurrentThread()) + NtClose(h); +} + + /*********************************************************************** * RtlExitUserThread (NTDLL.@) */ diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c index 0cf0da4ad4c..029f13dc4f9 100644 --- a/dlls/ntdll/unix/thread.c +++ b/dlls/ntdll/unix/thread.c @@ -2304,6 +2304,16 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class, return status; } + case ThreadWineNativeThreadName: + { + const THREAD_NAME_INFORMATION *info = data; + + if (length != sizeof(*info)) return STATUS_INFO_LENGTH_MISMATCH; + + set_native_thread_name( handle, &info->ThreadName ); + return STATUS_SUCCESS; + } + case ThreadWow64Context: return set_thread_wow64_context( handle, data, length );
1
0
0
0
Brendan Shanks : ntdll: Add a Wine-specific THREADINFOCLASS to set just the native thread name.
by Alexandre Julliard
07 Nov '22
07 Nov '22
Module: wine Branch: master Commit: d3416d90812beee619e5e509985c3fd363a30a58 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d3416d90812beee619e5e509985c3f…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Tue Dec 7 15:42:02 2021 -0800 ntdll: Add a Wine-specific THREADINFOCLASS to set just the native thread name. --- include/winternl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/winternl.h b/include/winternl.h index c64ff0f9082..26e61463f35 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -1894,7 +1894,10 @@ typedef enum _THREADINFOCLASS { ThreadManageWritesToExecutableMemory, ThreadPowerThrottlingState, ThreadWorkloadClass, - MaxThreadInfoClass + MaxThreadInfoClass, +#ifdef __WINESRC__ + ThreadWineNativeThreadName = 1000, +#endif } THREADINFOCLASS; typedef struct _THREAD_BASIC_INFORMATION
1
0
0
0
Nikolay Sivov : user32/edit: Check for control destruction on notification return.
by Alexandre Julliard
07 Nov '22
07 Nov '22
Module: wine Branch: master Commit: b40ddf42370e8344a862fbbc40384678db3871a9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b40ddf42370e8344a862fbbc403846…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Nov 6 18:07:38 2022 +0300 user32/edit: Check for control destruction on notification return. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/user32/edit.c | 51 +++++++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index e48d63f2870..d950cb89889 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -141,15 +141,13 @@ typedef struct #define SWAP_UINT32(x,y) do { UINT temp = (UINT)(x); (x) = (UINT)(y); (y) = temp; } while(0) #define ORDER_UINT(x,y) do { if ((UINT)(y) < (UINT)(x)) SWAP_UINT32((x),(y)); } while(0) -/* used for disabled or read-only edit control */ -#define EDIT_NOTIFY_PARENT(es, wNotifyCode) \ - do \ - { /* Notify parent which has created this edit control */ \ - TRACE("notification " #wNotifyCode " sent to hwnd=%p\n", es->hwndParent); \ - SendMessageW(es->hwndParent, WM_COMMAND, \ - MAKEWPARAM(GetWindowLongPtrW((es->hwndSelf),GWLP_ID), wNotifyCode), \ - (LPARAM)(es->hwndSelf)); \ - } while(0) +static inline BOOL notify_parent(const EDITSTATE *es, INT code) +{ + HWND hwnd = es->hwndSelf; + TRACE("notification %d sent to %p.\n", code, es->hwndParent); + SendMessageW(es->hwndParent, WM_COMMAND, MAKEWPARAM(GetWindowLongPtrW(es->hwndSelf, GWLP_ID), code), (LPARAM)es->hwndSelf); + return IsWindow(hwnd); +} static LRESULT EDIT_EM_PosFromChar(EDITSTATE *es, INT index, BOOL after_wrap); @@ -1364,7 +1362,7 @@ static BOOL EDIT_MakeFit(EDITSTATE *es, UINT size) if (es->buffer_size < size) { WARN("FAILED ! We now have %d+1\n", es->buffer_size); - EDIT_NOTIFY_PARENT(es, EN_ERRSPACE); + notify_parent(es, EN_ERRSPACE); return FALSE; } else { TRACE("We now have %d+1\n", es->buffer_size); @@ -1411,7 +1409,7 @@ static void EDIT_UpdateTextRegion(EDITSTATE *es, HRGN hrgn, BOOL bErase) { if (es->flags & EF_UPDATE) { es->flags &= ~EF_UPDATE; - EDIT_NOTIFY_PARENT(es, EN_UPDATE); + if (!notify_parent(es, EN_UPDATE)) return; } NtUserInvalidateRgn(es->hwndSelf, hrgn, bErase); } @@ -1426,7 +1424,7 @@ static void EDIT_UpdateText(EDITSTATE *es, const RECT *rc, BOOL bErase) { if (es->flags & EF_UPDATE) { es->flags &= ~EF_UPDATE; - EDIT_NOTIFY_PARENT(es, EN_UPDATE); + if (!notify_parent(es, EN_UPDATE)) return; } NtUserInvalidateRect(es->hwndSelf, rc, bErase); } @@ -1706,9 +1704,9 @@ static BOOL EDIT_EM_LineScroll_internal(EDITSTATE *es, INT dx, INT dy) EDIT_UpdateScrollInfo(es); } if (dx && !(es->flags & EF_HSCROLL_TRACK)) - EDIT_NOTIFY_PARENT(es, EN_HSCROLL); + notify_parent(es, EN_HSCROLL); if (dy && !(es->flags & EF_VSCROLL_TRACK)) - EDIT_NOTIFY_PARENT(es, EN_VSCROLL); + notify_parent(es, EN_VSCROLL); return TRUE; } @@ -2567,8 +2565,9 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r /* Issue the EN_MAXTEXT notification and continue with replacing text * so that buffer limit is honored. */ - if ((honor_limit) && (size > es->buffer_limit)) { - EDIT_NOTIFY_PARENT(es, EN_MAXTEXT); + if ((honor_limit) && (size > es->buffer_limit)) + { + if (!notify_parent(es, EN_MAXTEXT)) return; /* Buffer limit can be smaller than the actual length of text in combobox */ if (es->buffer_limit < (tl - (e-s))) strl = 0; @@ -2626,7 +2625,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r strl = 0; e = s; SetRectRgn(hrgn, 0, 0, 0, 0); - EDIT_NOTIFY_PARENT(es, EN_MAXTEXT); + if (!notify_parent(es, EN_MAXTEXT)) return; } } else { @@ -2643,7 +2642,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r EDIT_CalcLineWidth_SL(es); } text_buffer_changed(es); - EDIT_NOTIFY_PARENT(es, EN_MAXTEXT); + if (!notify_parent(es, EN_MAXTEXT)) return; } } @@ -2734,7 +2733,7 @@ static void EDIT_EM_ReplaceSel(EDITSTATE *es, BOOL can_undo, const WCHAR *lpsz_r if(send_update || (es->flags & EF_UPDATE)) { es->flags &= ~EF_UPDATE; - EDIT_NOTIFY_PARENT(es, EN_CHANGE); + if (!notify_parent(es, EN_CHANGE)) return; } EDIT_InvalidateUniscribeData(es); } @@ -3044,7 +3043,7 @@ static BOOL EDIT_EM_Undo(EDITSTATE *es) EDIT_EM_ReplaceSel(es, TRUE, utext, ulength, TRUE, TRUE); EDIT_EM_SetSel(es, es->undo_position, es->undo_position + es->undo_insert_count, FALSE); /* send the notification after the selection start and end are set */ - EDIT_NOTIFY_PARENT(es, EN_CHANGE); + if (!notify_parent(es, EN_CHANGE)) return TRUE; EDIT_EM_ScrollCaret(es); HeapFree(GetProcessHeap(), 0, utext); @@ -3565,7 +3564,7 @@ static LRESULT EDIT_WM_KillFocus(EDITSTATE *es) DestroyCaret(); if(!(es->style & ES_NOHIDESEL)) EDIT_InvalidateText(es, es->selection_start, es->selection_end); - EDIT_NOTIFY_PARENT(es, EN_KILLFOCUS); + if (!notify_parent(es, EN_KILLFOCUS)) return 0; /* throw away left over scroll when we lose focus */ es->wheelDeltaRemainder = 0; return 0; @@ -3808,7 +3807,7 @@ static void EDIT_WM_SetFocus(EDITSTATE *es) EDIT_SetCaretPos(es, es->selection_end, es->flags & EF_AFTER_WRAP); NtUserShowCaret( es->hwndSelf ); - EDIT_NOTIFY_PARENT(es, EN_SETFOCUS); + notify_parent(es, EN_SETFOCUS); } static DWORD get_font_margins(HDC hdc, const TEXTMETRICW *tm, BOOL unicode) @@ -3948,8 +3947,8 @@ static void EDIT_WM_SetText(EDITSTATE *es, LPCWSTR text, BOOL unicode) */ if( !((es->style & ES_MULTILINE) || es->hwndListBox)) { - EDIT_NOTIFY_PARENT(es, EN_UPDATE); - EDIT_NOTIFY_PARENT(es, EN_CHANGE); + if (!notify_parent(es, EN_UPDATE)) return; + if (!notify_parent(es, EN_CHANGE)) return; } EDIT_EM_ScrollCaret(es); EDIT_UpdateScrollInfo(es); @@ -4150,7 +4149,7 @@ static LRESULT EDIT_WM_HScroll(EDITSTATE *es, INT action, INT pos) if (!dx) { /* force scroll info update */ EDIT_UpdateScrollInfo(es); - EDIT_NOTIFY_PARENT(es, EN_HSCROLL); + notify_parent(es, EN_HSCROLL); } break; case SB_ENDSCROLL: @@ -4273,7 +4272,7 @@ static LRESULT EDIT_WM_VScroll(EDITSTATE *es, INT action, INT pos) { /* force scroll info update */ EDIT_UpdateScrollInfo(es); - EDIT_NOTIFY_PARENT(es, EN_VSCROLL); + notify_parent(es, EN_VSCROLL); } break; case SB_ENDSCROLL:
1
0
0
0
← Newer
1
...
98
99
100
101
102
103
104
...
118
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Results per page:
10
25
50
100
200