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 2018
----- 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
951 discussions
Start a n
N
ew thread
Andreas Maier : dbghelp: Add SYMFLAG_- and SYMTYPE_-defines.
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: 3b01149d8677fa86addfb67414d793684779c5ce URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3b01149d8677fa86addfb674…
Author: Andreas Maier <staubim(a)quantentunnel.de> Date: Sun Nov 25 10:15:47 2018 +0100 dbghelp: Add SYMFLAG_- and SYMTYPE_-defines. Signed-off-by: Andreas Maier <staubim(a)quantentunnel.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/dbghelp.h | 7 +++++++ include/wine/mscvpdb.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/include/dbghelp.h b/include/dbghelp.h index e6015ff..6e8d375 100644 --- a/include/dbghelp.h +++ b/include/dbghelp.h @@ -951,6 +951,13 @@ BOOL WINAPI SymUnloadModule64(HANDLE, DWORD64); #define SYMFLAG_THUNK 0x00002000 #define SYMFLAG_TLSREL 0x00004000 #define SYMFLAG_SLOT 0x00008000 +#define SYMFLAG_ILREL 0x00010000 +#define SYMFLAG_METADATA 0x00020000 +#define SYMFLAG_CLR_TOKEN 0x00040000 +#define SYMFLAG_NULL 0x00080000 +#define SYMFLAG_FUNC_NO_RETURN 0x00100000 +#define SYMFLAG_SYNTHETIC_ZEROBASE 0x00200000 +#define SYMFLAG_PUBLIC_CODE 0x00400000 #define MAX_SYM_NAME 2000 diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h index 7a4a69b..a44331b 100644 --- a/include/wine/mscvpdb.h +++ b/include/wine/mscvpdb.h @@ -1227,6 +1227,13 @@ union codeview_fieldtype #define LF_COMPLEX128 0x800f #define LF_VARSTRING 0x8010 +/* symtype e.g. for public_vx.symtype */ +#define SYMTYPE_NONE 0x0000 +#define SYMTYPE_CODE 0x0001 +#define SYMTYPE_FUNCTION 0x0002 +#define SYMTYPE_MANAGED 0x0004 +#define SYMTYPE_MSIL 0x0008 + /* ======================================== * * Symbol information * ======================================== */
1
0
0
0
Andreas Maier : dbghelp: Use correct record in codeview_snarf_public.
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: dbcf9728fa13ade68cc9d380002a5f6ae50fc0c0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dbcf9728fa13ade68cc9d380…
Author: Andreas Maier <staubim(a)quantentunnel.de> Date: Sun Nov 25 10:15:46 2018 +0100 dbghelp: Use correct record in codeview_snarf_public. Use public_vx iststead of data_vx for public symbols. Signed-off-by: Andreas Maier <staubim(a)quantentunnel.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/msc.c | 18 +++++++++--------- include/wine/mscvpdb.h | 10 ++++++++++ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 493c440..ae51884 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -2067,29 +2067,29 @@ static BOOL codeview_snarf_public(const struct msc_debug_info* msc_dbg, const BY switch (sym->generic.id) { - case S_PUB_V1: /* FIXME is this really a 'data_v1' structure ?? */ + case S_PUB_V1: if (!(dbghelp_options & SYMOPT_NO_PUBLICS)) { symt_new_public(msc_dbg->module, compiland, - terminate_string(&sym->data_v1.p_name), - codeview_get_address(msc_dbg, sym->data_v1.segment, sym->data_v1.offset), 1); + terminate_string(&sym->public_v1.p_name), + codeview_get_address(msc_dbg, sym->public_v1.segment, sym->public_v1.offset), 1); } break; - case S_PUB_V2: /* FIXME is this really a 'data_v2' structure ?? */ + case S_PUB_V2: if (!(dbghelp_options & SYMOPT_NO_PUBLICS)) { symt_new_public(msc_dbg->module, compiland, - terminate_string(&sym->data_v2.p_name), - codeview_get_address(msc_dbg, sym->data_v2.segment, sym->data_v2.offset), 1); + terminate_string(&sym->public_v2.p_name), + codeview_get_address(msc_dbg, sym->public_v2.segment, sym->public_v2.offset), 1); } - break; + break; case S_PUB_V3: if (!(dbghelp_options & SYMOPT_NO_PUBLICS)) { symt_new_public(msc_dbg->module, compiland, - sym->data_v3.name, - codeview_get_address(msc_dbg, sym->data_v3.segment, sym->data_v3.offset), 1); + sym->public_v3.name, + codeview_get_address(msc_dbg, sym->public_v3.segment, sym->public_v3.offset), 1); } break; case S_PUB_FUNC1_V3: diff --git a/include/wine/mscvpdb.h b/include/wine/mscvpdb.h index 2f0b479..7a4a69b 100644 --- a/include/wine/mscvpdb.h +++ b/include/wine/mscvpdb.h @@ -1352,6 +1352,16 @@ union codeview_symbol { short int len; short int id; + unsigned int offset; + unsigned short segment; + unsigned short symtype; + struct p_string p_name; + } public_v1; + + struct + { + short int len; + short int id; unsigned int symtype; unsigned int offset; unsigned short segment;
1
0
0
0
Józef Kucia : winevulkan: Update vk.xml to 1.1.94.
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: eb39d3dbcac7a8d9c17211ab358cda4b7e07708a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eb39d3dbcac7a8d9c17211ab…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Nov 26 12:13:45 2018 +0100 winevulkan: Update vk.xml to 1.1.94. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winevulkan/make_vulkan | 3 +- dlls/winevulkan/vulkan_thunks.c | 335 ++++++ dlls/winevulkan/vulkan_thunks.h | 148 ++- include/wine/vulkan.h | 2210 ++++++++++++++++++++++----------------- 4 files changed, 1748 insertions(+), 948 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=eb39d3dbcac7a8d9c172…
1
0
0
0
Hans Leidekker : winhttp: Store Accept headers like the other headers.
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: 2f752970360977597cdd450d7793b7d0e2a53b51 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2f752970360977597cdd450d…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon Nov 26 12:08:57 2018 +0100 winhttp: Store Accept headers like the other headers. Based on a patch by Sebastian Lackner. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winhttp/request.c | 10 ++-------- dlls/winhttp/session.c | 31 +++++-------------------------- dlls/winhttp/winhttp_private.h | 5 ++--- 3 files changed, 9 insertions(+), 37 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index a081b60..5525c1c 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -398,8 +398,7 @@ static BOOL delete_header( struct request *request, DWORD index ) return TRUE; } -static BOOL process_header( struct request *request, const WCHAR *field, const WCHAR *value, DWORD flags, - BOOL request_only ) +BOOL process_header( struct request *request, const WCHAR *field, const WCHAR *value, DWORD flags, BOOL request_only ) { int index; struct header hdr; @@ -2180,16 +2179,11 @@ static BOOL send_request( struct request *request, const WCHAR *headers, DWORD h struct session *session = connect->session; char *wire_req; int bytes_sent; - DWORD len, i, flags; + DWORD len; clear_response_headers( request ); drain_content( request ); - flags = WINHTTP_ADDREQ_FLAG_ADD|WINHTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA; - for (i = 0; i < request->num_accept_types; i++) - { - process_header( request, attr_accept, request->accept_types[i], flags, TRUE ); - } if (session->agent) process_header( request, attr_user_agent, session->agent, WINHTTP_ADDREQ_FLAG_ADD_IF_NEW, TRUE ); diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c index f8d98d0..39e8d82 100644 --- a/dlls/winhttp/session.c +++ b/dlls/winhttp/session.c @@ -626,8 +626,6 @@ static void request_destroy( struct object_header *hdr ) heap_free( request->headers[i].value ); } heap_free( request->headers ); - for (i = 0; i < request->num_accept_types; i++) heap_free( request->accept_types[i] ); - heap_free( request->accept_types ); for (i = 0; i < TARGET_MAX; i++) { for (j = 0; j < SCHEME_MAX; j++) @@ -1042,34 +1040,15 @@ static const struct object_vtbl request_vtbl = request_set_option }; -static BOOL store_accept_types( struct request *request, const WCHAR **accept_types ) +static BOOL add_accept_types_header( struct request *request, const WCHAR **types ) { - const WCHAR **types = accept_types; - DWORD i; + static const WCHAR acceptW[] = {'A','c','c','e','p','t',0}; + static const DWORD flags = WINHTTP_ADDREQ_FLAG_ADD | WINHTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA; if (!types) return TRUE; while (*types) { - request->num_accept_types++; - types++; - } - if (!request->num_accept_types) return TRUE; - if (!(request->accept_types = heap_alloc( request->num_accept_types * sizeof(WCHAR *)))) - { - request->num_accept_types = 0; - return FALSE; - } - types = accept_types; - for (i = 0; i < request->num_accept_types; i++) - { - if (!(request->accept_types[i] = strdupW( *types ))) - { - for ( ; i > 0; --i) heap_free( request->accept_types[i - 1] ); - heap_free( request->accept_types ); - request->accept_types = NULL; - request->num_accept_types = 0; - return FALSE; - } + if (!process_header( request, acceptW, *types, flags, TRUE )) return FALSE; types++; } return TRUE; @@ -1151,7 +1130,7 @@ HINTERNET WINAPI WinHttpOpenRequest( HINTERNET hconnect, LPCWSTR verb, LPCWSTR o if (!version || !version[0]) version = http1_1; if (!(request->version = strdupW( version ))) goto end; - if (!(store_accept_types( request, types ))) goto end; + if (!(add_accept_types_header( request, types ))) goto end; if (!(hrequest = alloc_handle( &request->hdr ))) goto end; request->hdr.handle = hrequest; diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h index 14cee44..b46f708 100644 --- a/dlls/winhttp/winhttp_private.h +++ b/dlls/winhttp/winhttp_private.h @@ -198,8 +198,6 @@ struct request char read_buf[8192]; /* buffer for already read but not returned data */ struct header *headers; DWORD num_headers; - WCHAR **accept_types; - DWORD num_accept_types; struct authinfo *authinfo; struct authinfo *proxy_authinfo; HANDLE task_wait; @@ -288,7 +286,8 @@ void destroy_cookies( struct session * ) DECLSPEC_HIDDEN; BOOL set_server_for_hostname( struct connect *, const WCHAR *, INTERNET_PORT ) DECLSPEC_HIDDEN; void destroy_authinfo( struct authinfo * ) DECLSPEC_HIDDEN; -void release_host( struct hostdata *host ) DECLSPEC_HIDDEN; +void release_host( struct hostdata * ) DECLSPEC_HIDDEN; +BOOL process_header( struct request *, const WCHAR *, const WCHAR *, DWORD, BOOL ) DECLSPEC_HIDDEN; extern HRESULT WinHttpRequest_create( void ** ) DECLSPEC_HIDDEN; void release_typelib( void ) DECLSPEC_HIDDEN;
1
0
0
0
Hans Leidekker : winhttp: Use the thread pool for COM object requests.
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: c81fa0175186bce7f15941bead9dbd2d746818b2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c81fa0175186bce7f15941be…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon Nov 26 12:08:56 2018 +0100 winhttp: Use the thread pool for COM object requests. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winhttp/request.c | 52 ++++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index f78cb2e..a081b60 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -3067,9 +3067,10 @@ struct winhttp_request HINTERNET hrequest; VARIANT data; WCHAR *verb; - HANDLE thread; + HANDLE done; HANDLE wait; HANDLE cancel; + BOOL proc_running; char *buffer; DWORD offset; DWORD bytes_available; @@ -3103,15 +3104,16 @@ static void cancel_request( struct winhttp_request *request ) { if (request->state <= REQUEST_STATE_CANCELLED) return; - SetEvent( request->cancel ); - LeaveCriticalSection( &request->cs ); - WaitForSingleObject( request->thread, INFINITE ); - EnterCriticalSection( &request->cs ); + if (request->proc_running) + { + SetEvent( request->cancel ); + LeaveCriticalSection( &request->cs ); - request->state = REQUEST_STATE_CANCELLED; + WaitForSingleObject( request->done, INFINITE ); - CloseHandle( request->thread ); - request->thread = NULL; + EnterCriticalSection( &request->cs ); + } + request->state = REQUEST_STATE_CANCELLED; } /* critical section must be held */ @@ -3121,7 +3123,7 @@ static void free_request( struct winhttp_request *request ) WinHttpCloseHandle( request->hrequest ); WinHttpCloseHandle( request->hconnect ); WinHttpCloseHandle( request->hsession ); - CloseHandle( request->thread ); + CloseHandle( request->done ); CloseHandle( request->wait ); CloseHandle( request->cancel ); heap_free( request->proxy.lpszProxy ); @@ -3450,6 +3452,7 @@ static void initialize_request( struct winhttp_request *request ) { request->wait = CreateEventW( NULL, FALSE, FALSE, NULL ); request->cancel = CreateEventW( NULL, FALSE, FALSE, NULL ); + request->done = CreateEventW( NULL, FALSE, FALSE, NULL ); request->connect_timeout = 60000; request->send_timeout = 30000; request->receive_timeout = 30000; @@ -3747,19 +3750,22 @@ static void wait_set_status_callback( struct winhttp_request *request, DWORD sta static DWORD wait_for_completion( struct winhttp_request *request ) { HANDLE handles[2] = { request->wait, request->cancel }; + DWORD ret; switch (WaitForMultipleObjects( 2, handles, FALSE, INFINITE )) { case WAIT_OBJECT_0: + ret = request->error; break; case WAIT_OBJECT_0 + 1: - request->error = ERROR_CANCELLED; + ret = request->error = ERROR_CANCELLED; + SetEvent( request->done ); break; default: - request->error = GetLastError(); + ret = request->error = GetLastError(); break; } - return request->error; + return ret; } static HRESULT request_receive( struct winhttp_request *request ) @@ -3917,27 +3923,21 @@ error: return HRESULT_FROM_WIN32( err ); } -static HRESULT request_send_and_receive( struct winhttp_request *request ) -{ - HRESULT hr = request_send( request ); - if (hr == S_OK) hr = request_receive( request ); - return hr; -} - -static DWORD CALLBACK send_and_receive_proc( void *arg ) +static void CALLBACK send_and_receive_proc( TP_CALLBACK_INSTANCE *instance, void *ctx ) { - struct winhttp_request *request = (struct winhttp_request *)arg; - return request_send_and_receive( request ); + struct winhttp_request *request = (struct winhttp_request *)ctx; + if (request_send( request ) == S_OK) request_receive( request ); + SetEvent( request->done ); } /* critical section must be held */ static DWORD request_wait( struct winhttp_request *request, DWORD timeout ) { - HANDLE thread = request->thread; + HANDLE done = request->done; DWORD err, ret; LeaveCriticalSection( &request->cs ); - while ((err = MsgWaitForMultipleObjects( 1, &thread, FALSE, timeout, QS_ALLINPUT )) == WAIT_OBJECT_0 + 1) + while ((err = MsgWaitForMultipleObjects( 1, &done, FALSE, timeout, QS_ALLINPUT )) == WAIT_OBJECT_0 + 1) { MSG msg; while (PeekMessageW( &msg, NULL, 0, 0, PM_REMOVE )) @@ -3960,6 +3960,7 @@ static DWORD request_wait( struct winhttp_request *request, DWORD timeout ) break; } EnterCriticalSection( &request->cs ); + if (!ret) request->proc_running = FALSE; return ret; } @@ -3989,11 +3990,12 @@ static HRESULT WINAPI winhttp_request_Send( LeaveCriticalSection( &request->cs ); return hr; } - if (!(request->thread = CreateThread( NULL, 0, send_and_receive_proc, request, 0, NULL ))) + if (!TrySubmitThreadpoolCallback( send_and_receive_proc, request, NULL )) { LeaveCriticalSection( &request->cs ); return HRESULT_FROM_WIN32( GetLastError() ); } + request->proc_running = TRUE; if (!request->async) { hr = HRESULT_FROM_WIN32( request_wait( request, INFINITE ) );
1
0
0
0
Hans Leidekker : winhttp: Make sure the COM request object is properly initialized.
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: 911316e7c8819c486704b75c71562db600e3168e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=911316e7c8819c486704b75c…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon Nov 26 12:08:55 2018 +0100 winhttp: Make sure the COM request object is properly initialized. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winhttp/request.c | 47 ++++++++++++++--------------------------------- 1 file changed, 14 insertions(+), 33 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index edfebac..f78cb2e 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -3049,7 +3049,6 @@ BOOL WINAPI WinHttpWriteData( HINTERNET hrequest, LPCVOID buffer, DWORD to_write enum request_state { - REQUEST_STATE_UNINITIALIZED, REQUEST_STATE_INITIALIZED, REQUEST_STATE_CANCELLED, REQUEST_STATE_OPEN, @@ -3113,10 +3112,6 @@ static void cancel_request( struct winhttp_request *request ) CloseHandle( request->thread ); request->thread = NULL; - CloseHandle( request->wait ); - request->wait = NULL; - CloseHandle( request->cancel ); - request->cancel = NULL; } /* critical section must be held */ @@ -3453,25 +3448,8 @@ done: static void initialize_request( struct winhttp_request *request ) { - request->hrequest = NULL; - request->hconnect = NULL; - request->hsession = NULL; - request->thread = NULL; - request->wait = NULL; - request->cancel = NULL; - request->buffer = NULL; - request->verb = NULL; - request->offset = 0; - request->bytes_available = 0; - request->bytes_read = 0; - request->error = ERROR_SUCCESS; - request->async = FALSE; - request->logon_policy = WINHTTP_AUTOLOGON_SECURITY_LEVEL_MEDIUM; - request->disable_feature = 0; - request->proxy.dwAccessType = WINHTTP_ACCESS_TYPE_DEFAULT_PROXY; - request->proxy.lpszProxy = NULL; - request->proxy.lpszProxyBypass = NULL; - request->resolve_timeout = 0; + request->wait = CreateEventW( NULL, FALSE, FALSE, NULL ); + request->cancel = CreateEventW( NULL, FALSE, FALSE, NULL ); request->connect_timeout = 60000; request->send_timeout = 30000; request->receive_timeout = 30000; @@ -3495,8 +3473,17 @@ static void reset_request( struct winhttp_request *request ) request->bytes_available = 0; request->bytes_read = 0; request->error = ERROR_SUCCESS; + request->logon_policy = 0; + request->disable_feature = 0; request->async = FALSE; + request->connect_timeout = 60000; + request->send_timeout = 30000; + request->receive_timeout = 30000; request->url_codepage = CP_UTF8; + heap_free( request->proxy.lpszProxy ); + request->proxy.lpszProxy = NULL; + heap_free( request->proxy.lpszProxyBypass ); + request->proxy.lpszProxyBypass = NULL; VariantClear( &request->data ); request->state = REQUEST_STATE_INITIALIZED; } @@ -3533,8 +3520,7 @@ static HRESULT WINAPI winhttp_request_Open( if (!WinHttpCrackUrl( url, 0, 0, &uc )) return HRESULT_FROM_WIN32( GetLastError() ); EnterCriticalSection( &request->cs ); - if (request->state < REQUEST_STATE_INITIALIZED) initialize_request( request ); - else reset_request( request ); + reset_request( request ); if (!(hostname = heap_alloc( (uc.dwHostNameLength + 1) * sizeof(WCHAR) ))) goto error; memcpy( hostname, uc.lpszHostName, uc.dwHostNameLength * sizeof(WCHAR) ); @@ -4008,8 +3994,6 @@ static HRESULT WINAPI winhttp_request_Send( LeaveCriticalSection( &request->cs ); return HRESULT_FROM_WIN32( GetLastError() ); } - request->wait = CreateEventW( NULL, FALSE, FALSE, NULL ); - request->cancel = CreateEventW( NULL, FALSE, FALSE, NULL ); if (!request->async) { hr = HRESULT_FROM_WIN32( request_wait( request, INFINITE ) ); @@ -4613,15 +4597,12 @@ HRESULT WinHttpRequest_create( void **obj ) TRACE("%p\n", obj); - if (!(request = heap_alloc( sizeof(*request) ))) return E_OUTOFMEMORY; + if (!(request = heap_alloc_zero( sizeof(*request) ))) return E_OUTOFMEMORY; request->IWinHttpRequest_iface.lpVtbl = &winhttp_request_vtbl; request->refs = 1; - request->state = REQUEST_STATE_UNINITIALIZED; - request->proxy.lpszProxy = NULL; - request->proxy.lpszProxyBypass = NULL; - request->url_codepage = CP_UTF8; InitializeCriticalSection( &request->cs ); request->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": winhttp_request.cs"); + initialize_request( request ); *obj = &request->IWinHttpRequest_iface; TRACE("returning iface %p\n", *obj);
1
0
0
0
Hans Leidekker : winhttp: Use the thread pool for the connection collector.
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: 682ddd826a6efb53827c7979be6716b8ce6c7d50 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=682ddd826a6efb53827c7979…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon Nov 26 12:08:54 2018 +0100 winhttp: Use the thread pool for the connection collector. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winhttp/request.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 61af6ea..edfebac 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -1457,7 +1457,7 @@ void release_host( struct hostdata *host ) static BOOL connection_collector_running; -static DWORD WINAPI connection_collector(void *arg) +static void CALLBACK connection_collector( TP_CALLBACK_INSTANCE *instance, void *ctx ) { unsigned int remaining_connections; struct netconn *netconn, *next_netconn; @@ -1483,10 +1483,7 @@ static DWORD WINAPI connection_collector(void *arg) list_remove(&netconn->entry); netconn_close(netconn); } - else - { - remaining_connections++; - } + else remaining_connections++; } } @@ -1495,7 +1492,7 @@ static DWORD WINAPI connection_collector(void *arg) LeaveCriticalSection(&connection_pool_cs); } while(remaining_connections); - FreeLibraryAndExitThread( winhttp_instance, 0 ); + FreeLibraryWhenCallbackReturns( instance, winhttp_instance ); } static void cache_connection( struct netconn *netconn ) @@ -1510,20 +1507,11 @@ static void cache_connection( struct netconn *netconn ) if (!connection_collector_running) { HMODULE module; - HANDLE thread; - GetModuleHandleExW( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (const WCHAR*)winhttp_instance, &module ); + GetModuleHandleExW( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (const WCHAR *)winhttp_instance, &module ); - thread = CreateThread(NULL, 0, connection_collector, NULL, 0, NULL); - if (thread) - { - CloseHandle( thread ); - connection_collector_running = TRUE; - } - else - { - FreeLibrary( winhttp_instance ); - } + if (TrySubmitThreadpoolCallback( connection_collector, NULL, NULL )) connection_collector_running = TRUE; + else FreeLibrary( winhttp_instance ); } LeaveCriticalSection( &connection_pool_cs );
1
0
0
0
Brendan McGrath : msi: Set stale function pointers to NULL.
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: 256ca317a2871c62ca121e49f29fc37a64b4fb64 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=256ca317a2871c62ca121e49…
Author: Brendan McGrath <brendan(a)redmandi.com> Date: Mon Nov 26 20:23:34 2018 +1100 msi: Set stale function pointers to NULL. A crash occurs during install of dotnet35 on a 64-bit prefix as when msi_destroy_assembly_caches is called, the mscoree library is unloaded but the function pointers are not set back to NULL. Signed-off-by: Brendan McGrath <brendan(a)redmandi.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/assembly.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/msi/assembly.c b/dlls/msi/assembly.c index 7857e8b..f46ff02 100644 --- a/dlls/msi/assembly.c +++ b/dlls/msi/assembly.c @@ -36,7 +36,6 @@ static HRESULT (WINAPI *pCreateAssemblyCacheNet11)( IAssemblyCache **, DWORD ); static HRESULT (WINAPI *pCreateAssemblyCacheNet20)( IAssemblyCache **, DWORD ); static HRESULT (WINAPI *pCreateAssemblyCacheNet40)( IAssemblyCache **, DWORD ); static HRESULT (WINAPI *pCreateAssemblyCacheSxs)( IAssemblyCache **, DWORD ); -static HRESULT (WINAPI *pLoadLibraryShim)( LPCWSTR, LPCWSTR, LPVOID, HMODULE * ); static HRESULT (WINAPI *pGetFileVersion)( LPCWSTR, LPWSTR, DWORD, DWORD * ); static HRESULT (WINAPI *pCreateAssemblyNameObject)( IAssemblyName **, LPCWSTR, DWORD, LPVOID ); static HRESULT (WINAPI *pCreateAssemblyEnum)( IAssemblyEnum **, IUnknown *, IAssemblyName *, DWORD, LPVOID ); @@ -52,6 +51,7 @@ static BOOL init_function_pointers( void ) static const WCHAR szVersion11[] = {'v','1','.','1','.','4','3','2','2',0}; static const WCHAR szVersion20[] = {'v','2','.','0','.','5','0','7','2','7',0}; static const WCHAR szVersion40[] = {'v','4','.','0','.','3','0','3','1','9',0}; + HRESULT (WINAPI *pLoadLibraryShim)( LPCWSTR, LPCWSTR, LPVOID, HMODULE * ); WCHAR path[MAX_PATH]; DWORD len = GetSystemDirectoryW( path, MAX_PATH ); @@ -121,6 +121,9 @@ void msi_destroy_assembly_caches( MSIPACKAGE *package ) pCreateAssemblyCacheNet11 = NULL; pCreateAssemblyCacheNet20 = NULL; pCreateAssemblyCacheNet40 = NULL; + pGetFileVersion = NULL; + pCreateAssemblyNameObject = NULL; + pCreateAssemblyEnum = NULL; FreeLibrary( hfusion10 ); FreeLibrary( hfusion11 ); FreeLibrary( hfusion20 );
1
0
0
0
Nikolay Sivov : shell32: Forward some functions to shcore.dll.
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: 74042733b132ff52e5d8a12785442fbfaac2a8f9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=74042733b132ff52e5d8a127…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 26 11:53:13 2018 +0300 shell32: Forward some functions to shcore.dll. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/shell32.spec | 6 +- dlls/shell32/shell32_main.c | 279 -------------------------------------------- tools/make_specfiles | 14 +-- 3 files changed, 10 insertions(+), 289 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=74042733b132ff52e5d8…
1
0
0
0
Nikolay Sivov : shcore: Add CommandLineToArgvW().
by Alexandre Julliard
26 Nov '18
26 Nov '18
Module: wine Branch: master Commit: e4115e36c4c42df1b1aa357bc8f172e2424b8b93 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e4115e36c4c42df1b1aa357b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 26 11:53:12 2018 +0300 shcore: Add CommandLineToArgvW(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shcore/main.c | 258 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/shcore/shcore.spec | 2 +- 2 files changed, 259 insertions(+), 1 deletion(-) diff --git a/dlls/shcore/main.c b/dlls/shcore/main.c index ccea518..8f674a2 100644 --- a/dlls/shcore/main.c +++ b/dlls/shcore/main.c @@ -29,6 +29,7 @@ #include "ocidl.h" #include "shellscalingapi.h" #include "wine/debug.h" +#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(shcore); @@ -234,3 +235,260 @@ HRESULT WINAPI GetCurrentProcessExplicitAppUserModelID(const WCHAR **appid) *appid = NULL; return E_NOTIMPL; } + +/************************************************************************* + * CommandLineToArgvW [SHCORE.@] + * + * We must interpret the quotes in the command line to rebuild the argv + * array correctly: + * - arguments are separated by spaces or tabs + * - quotes serve as optional argument delimiters + * '"a b"' -> 'a b' + * - escaped quotes must be converted back to '"' + * '\"' -> '"' + * - consecutive backslashes preceding a quote see their number halved with + * the remainder escaping the quote: + * 2n backslashes + quote -> n backslashes + quote as an argument delimiter + * 2n+1 backslashes + quote -> n backslashes + literal quote + * - backslashes that are not followed by a quote are copied literally: + * 'a\b' -> 'a\b' + * 'a\\b' -> 'a\\b' + * - in quoted strings, consecutive quotes see their number divided by three + * with the remainder modulo 3 deciding whether to close the string or not. + * Note that the opening quote must be counted in the consecutive quotes, + * that's the (1+) below: + * (1+) 3n quotes -> n quotes + * (1+) 3n+1 quotes -> n quotes plus closes the quoted string + * (1+) 3n+2 quotes -> n+1 quotes plus closes the quoted string + * - in unquoted strings, the first quote opens the quoted string and the + * remaining consecutive quotes follow the above rule. + */ +WCHAR** WINAPI CommandLineToArgvW(const WCHAR *cmdline, int *numargs) +{ + int qcount, bcount; + const WCHAR *s; + WCHAR **argv; + DWORD argc; + WCHAR *d; + + if (!numargs) + { + SetLastError(ERROR_INVALID_PARAMETER); + return NULL; + } + + if (*cmdline == 0) + { + /* Return the path to the executable */ + DWORD len, deslen = MAX_PATH, size; + + size = sizeof(WCHAR *) * 2 + deslen * sizeof(WCHAR); + for (;;) + { + if (!(argv = LocalAlloc(LMEM_FIXED, size))) return NULL; + len = GetModuleFileNameW(0, (WCHAR *)(argv + 2), deslen); + if (!len) + { + LocalFree(argv); + return NULL; + } + if (len < deslen) break; + deslen *= 2; + size = sizeof(WCHAR *) * 2 + deslen * sizeof(WCHAR); + LocalFree(argv); + } + argv[0] = (WCHAR *)(argv + 2); + argv[1] = NULL; + *numargs = 1; + + return argv; + } + + /* --- First count the arguments */ + argc = 1; + s = cmdline; + /* The first argument, the executable path, follows special rules */ + if (*s == '"') + { + /* The executable path ends at the next quote, no matter what */ + s++; + while (*s) + if (*s++ == '"') + break; + } + else + { + /* The executable path ends at the next space, no matter what */ + while (*s && *s != ' ' && *s != '\t') + s++; + } + /* skip to the first argument, if any */ + while (*s == ' ' || *s == '\t') + s++; + if (*s) + argc++; + + /* Analyze the remaining arguments */ + qcount = bcount = 0; + while (*s) + { + if ((*s == ' ' || *s == '\t') && qcount == 0) + { + /* skip to the next argument and count it if any */ + while (*s == ' ' || *s == '\t') + s++; + if (*s) + argc++; + bcount = 0; + } + else if (*s == '\\') + { + /* '\', count them */ + bcount++; + s++; + } + else if (*s == '"') + { + /* '"' */ + if ((bcount & 1) == 0) + qcount++; /* unescaped '"' */ + s++; + bcount = 0; + /* consecutive quotes, see comment in copying code below */ + while (*s == '"') + { + qcount++; + s++; + } + qcount = qcount % 3; + if (qcount == 2) + qcount = 0; + } + else + { + /* a regular character */ + bcount = 0; + s++; + } + } + + /* Allocate in a single lump, the string array, and the strings that go + * with it. This way the caller can make a single LocalFree() call to free + * both, as per MSDN. + */ + argv = LocalAlloc(LMEM_FIXED, (argc + 1) * sizeof(WCHAR *) + (strlenW(cmdline) + 1) * sizeof(WCHAR)); + if (!argv) + return NULL; + + /* --- Then split and copy the arguments */ + argv[0] = d = strcpyW((WCHAR *)(argv + argc + 1), cmdline); + argc = 1; + /* The first argument, the executable path, follows special rules */ + if (*d == '"') + { + /* The executable path ends at the next quote, no matter what */ + s = d + 1; + while (*s) + { + if (*s == '"') + { + s++; + break; + } + *d++ = *s++; + } + } + else + { + /* The executable path ends at the next space, no matter what */ + while (*d && *d != ' ' && *d != '\t') + d++; + s = d; + if (*s) + s++; + } + /* close the executable path */ + *d++ = 0; + /* skip to the first argument and initialize it if any */ + while (*s == ' ' || *s == '\t') + s++; + if (!*s) + { + /* There are no parameters so we are all done */ + argv[argc] = NULL; + *numargs = argc; + return argv; + } + + /* Split and copy the remaining arguments */ + argv[argc++] = d; + qcount = bcount = 0; + while (*s) + { + if ((*s == ' ' || *s == '\t') && qcount == 0) + { + /* close the argument */ + *d++ = 0; + bcount = 0; + + /* skip to the next one and initialize it if any */ + do { + s++; + } while (*s == ' ' || *s == '\t'); + if (*s) + argv[argc++] = d; + } + else if (*s=='\\') + { + *d++ = *s++; + bcount++; + } + else if (*s == '"') + { + if ((bcount & 1) == 0) + { + /* Preceded by an even number of '\', this is half that + * number of '\', plus a quote which we erase. + */ + d -= bcount / 2; + qcount++; + } + else + { + /* Preceded by an odd number of '\', this is half that + * number of '\' followed by a '"' + */ + d = d - bcount / 2 - 1; + *d++ = '"'; + } + s++; + bcount = 0; + /* Now count the number of consecutive quotes. Note that qcount + * already takes into account the opening quote if any, as well as + * the quote that lead us here. + */ + while (*s == '"') + { + if (++qcount == 3) + { + *d++ = '"'; + qcount = 0; + } + s++; + } + if (qcount == 2) + qcount = 0; + } + else + { + /* a regular character */ + *d++ = *s++; + bcount = 0; + } + } + *d = '\0'; + argv[argc] = NULL; + *numargs = argc; + + return argv; +} diff --git a/dlls/shcore/shcore.spec b/dlls/shcore/shcore.spec index 2f3ca99..1266a02 100644 --- a/dlls/shcore/shcore.spec +++ b/dlls/shcore/shcore.spec @@ -1,5 +1,5 @@ 1 stub @ -@ stdcall CommandLineToArgvW(wstr ptr) shell32.CommandLineToArgvW +@ stdcall CommandLineToArgvW(wstr ptr) @ stub CreateRandomAccessStreamOnFile @ stub CreateRandomAccessStreamOverStream @ stub CreateStreamOverRandomAccessStream
1
0
0
0
← Newer
1
...
36
37
38
39
40
41
42
...
96
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
Results per page:
10
25
50
100
200