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
September 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
670 discussions
Start a n
N
ew thread
Roger Zoellner : ntdll: Relax checks for valid affinity mask in NtSetInformationThread().
by Alexandre Julliard
14 Sep '18
14 Sep '18
Module: wine Branch: master Commit: 575c1c9066f353fdd6b9fb770c110705c4ddd6c5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=575c1c9066f353fdd6b9fb77…
Author: Roger Zoellner <zoellner.roger(a)gmail.com> Date: Tue Sep 11 02:41:09 2018 +0200 ntdll: Relax checks for valid affinity mask in NtSetInformationThread(). Signed-off-by: Roger Zoellner <zoellner.roger(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/info.c | 21 +++++++++++++++++++++ dlls/ntdll/thread.c | 7 +++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index e7b07e5..7690696 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -2049,6 +2049,27 @@ static void test_affinity(void) ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( tbi.AffinityMask == 1, "Unexpected thread affinity\n" ); + /* NOTE: Pre-Vista does not allow bits to be set that are higher than the highest set bit in process affinity mask */ + thread_affinity = (pbi.AffinityMask << 1) | pbi.AffinityMask; + status = pNtSetInformationThread( GetCurrentThread(), ThreadAffinityMask, &thread_affinity, sizeof(thread_affinity) ); + ok( broken(status == STATUS_INVALID_PARAMETER) || (status == STATUS_SUCCESS), "Expected STATUS_SUCCESS, got %08x\n", status ); + if (status == STATUS_SUCCESS) + { + status = pNtQueryInformationThread( GetCurrentThread(), ThreadBasicInformation, &tbi, sizeof(tbi), NULL ); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status ); + ok( tbi.AffinityMask == pbi.AffinityMask, "Unexpected thread affinity. Expected %lx, got %lx\n", pbi.AffinityMask, tbi.AffinityMask ); + } + + thread_affinity = ~(DWORD_PTR)0 - 1; + status = pNtSetInformationThread( GetCurrentThread(), ThreadAffinityMask, &thread_affinity, sizeof(thread_affinity) ); + ok( broken(status == STATUS_INVALID_PARAMETER) || (status == STATUS_SUCCESS), "Expected STATUS_SUCCESS, got %08x\n", status ); + if (status == STATUS_SUCCESS) + { + status = pNtQueryInformationThread( GetCurrentThread(), ThreadBasicInformation, &tbi, sizeof(tbi), NULL ); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status ); + ok( tbi.AffinityMask == (pbi.AffinityMask & (~(DWORD_PTR)0 - 1)), "Unexpected thread affinity. Expected %lx, got %lx\n", pbi.AffinityMask & (~(DWORD_PTR)0 - 1), tbi.AffinityMask ); + } + /* NOTE: Pre-Vista does not recognize the "all processors" flag (all bits set) */ thread_affinity = ~(DWORD_PTR)0; status = pNtSetInformationThread( GetCurrentThread(), ThreadAffinityMask, &thread_affinity, sizeof(thread_affinity) ); diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 59d64e1..f8b9ce1 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -1288,10 +1288,9 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class, ULONG_PTR req_aff; if (length != sizeof(ULONG_PTR)) return STATUS_INVALID_PARAMETER; - req_aff = *(const ULONG_PTR *)data; - if ((ULONG)req_aff == ~0u) req_aff = affinity_mask; - else if (req_aff & ~affinity_mask) return STATUS_INVALID_PARAMETER; - else if (!req_aff) return STATUS_INVALID_PARAMETER; + req_aff = *(const ULONG_PTR *)data & affinity_mask; + if (!req_aff) return STATUS_INVALID_PARAMETER; + SERVER_START_REQ( set_thread_info ) { req->handle = wine_server_obj_handle( handle );
1
0
0
0
Michael Müller : ntdll: Add stub for ApiSetQueryApiSetPresence.
by Alexandre Julliard
14 Sep '18
14 Sep '18
Module: wine Branch: master Commit: 3b0d0642830707e11341c24b975ed1432be2cbc8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3b0d0642830707e11341c24b…
Author: Michael Müller <michael(a)fds-team.de> Date: Wed Sep 12 03:53:50 2018 +0000 ntdll: Add stub for ApiSetQueryApiSetPresence. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-core-apiquery-l1-1-0.spec | 2 +- dlls/ntdll/misc.c | 12 ++++++++++++ dlls/ntdll/ntdll.spec | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dlls/api-ms-win-core-apiquery-l1-1-0/api-ms-win-core-apiquery-l1-1-0.spec b/dlls/api-ms-win-core-apiquery-l1-1-0/api-ms-win-core-apiquery-l1-1-0.spec index 6d63b5b..1d99dd7 100644 --- a/dlls/api-ms-win-core-apiquery-l1-1-0/api-ms-win-core-apiquery-l1-1-0.spec +++ b/dlls/api-ms-win-core-apiquery-l1-1-0/api-ms-win-core-apiquery-l1-1-0.spec @@ -1 +1 @@ -@ stub ApiSetQueryApiSetPresence +@ stdcall ApiSetQueryApiSetPresence(ptr ptr) ntdll.ApiSetQueryApiSetPresence diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c index 2431662..f2c0e14 100644 --- a/dlls/ntdll/misc.c +++ b/dlls/ntdll/misc.c @@ -504,3 +504,15 @@ NTSTATUS WINAPI NtCreateLowBoxToken(HANDLE *token_handle, HANDLE existing_token_ *token_handle = NULL; return STATUS_SUCCESS; } + +/********************************************************************* + * ApiSetQueryApiSetPresence (NTDLL.@) + */ +BOOL WINAPI ApiSetQueryApiSetPresence(const UNICODE_STRING *namespace, BOOLEAN *present) +{ + FIXME("(%s, %p) stub!\n", debugstr_us(namespace), present); + + if(present) + *present = TRUE; + return TRUE; +} diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 003e4f9..5e7c463 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -3,6 +3,7 @@ #if you change a Nt.. function DON'T FORGET to change the #Zw one too. +@ stdcall ApiSetQueryApiSetPresence(ptr ptr) @ stub CsrAllocateCaptureBuffer @ stub CsrAllocateCapturePointer @ stub CsrAllocateMessagePointer
1
0
0
0
Louis Lenders : advapi32: Add stub for TraceSetInformation.
by Alexandre Julliard
14 Sep '18
14 Sep '18
Module: wine Branch: master Commit: b80780ad0fbeba3853ebf2b9bb39dc20bce7044d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b80780ad0fbeba3853ebf2b9…
Author: Louis Lenders <xerox.xerox2000x(a)gmail.com> Date: Thu Sep 13 21:57:19 2018 +0200 advapi32: Add stub for TraceSetInformation. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=45813
Signed-off-by: Louis Lenders <xerox.xerox2000x(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/advapi32.spec | 2 +- dlls/advapi32/eventlog.c | 9 ++++++++ .../api-ms-win-eventing-controller-l1-1-0.spec | 2 +- include/evntrace.h | 25 ++++++++++++++++++++++ 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index bb817a5..5845ae0 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -818,7 +818,7 @@ @ varargs TraceMessage(int64 long ptr long) @ stdcall TraceMessageVa(int64 long ptr long ptr) # @ stub TraceQueryInformation -# @ stub TraceSetInformation +@ stdcall TraceSetInformation(int64 long ptr long) # @ stub TreeResetNamedSecurityInfoA @ stdcall TreeResetNamedSecurityInfoW(wstr long long ptr ptr ptr ptr long ptr long ptr) # @ stub TreeSetNamedSecurityInfoA diff --git a/dlls/advapi32/eventlog.c b/dlls/advapi32/eventlog.c index fbab8e8..32066c5 100644 --- a/dlls/advapi32/eventlog.c +++ b/dlls/advapi32/eventlog.c @@ -931,3 +931,12 @@ ULONG WINAPI EnumerateTraceGuids(PTRACE_GUID_PROPERTIES *propertiesarray, FIXME("%p %d %p: stub\n", propertiesarray, arraycount, guidcount); return ERROR_INVALID_PARAMETER; } + +/****************************************************************************** + * TraceSetInformation [ADVAPI32.@] + */ +ULONG WINAPI TraceSetInformation(TRACEHANDLE handle, TRACE_INFO_CLASS infoclass, VOID* info, ULONG len) +{ + FIXME("%s %d %p %d: stub\n", wine_dbgstr_longlong(handle), infoclass, info, len); + return ERROR_CALL_NOT_IMPLEMENTED; +} diff --git a/dlls/api-ms-win-eventing-controller-l1-1-0/api-ms-win-eventing-controller-l1-1-0.spec b/dlls/api-ms-win-eventing-controller-l1-1-0/api-ms-win-eventing-controller-l1-1-0.spec index 0b58510..60a4ff5 100644 --- a/dlls/api-ms-win-eventing-controller-l1-1-0/api-ms-win-eventing-controller-l1-1-0.spec +++ b/dlls/api-ms-win-eventing-controller-l1-1-0/api-ms-win-eventing-controller-l1-1-0.spec @@ -8,4 +8,4 @@ @ stdcall StartTraceW(ptr wstr ptr) advapi32.StartTraceW @ stdcall StopTraceW(int64 wstr ptr) advapi32.StopTraceW @ stub TraceQueryInformation -@ stub TraceSetInformation +@ stdcall TraceSetInformation(int64 long ptr long) advapi32.TraceSetInformation diff --git a/include/evntrace.h b/include/evntrace.h index 5722b28..2c1c625 100644 --- a/include/evntrace.h +++ b/include/evntrace.h @@ -259,6 +259,31 @@ typedef struct _ENABLE_TRACE_PARAMETERS ULONG FilterDescCount; } ENABLE_TRACE_PARAMETERS, *PENABLE_TRACE_PARAMETERS; +typedef enum _TRACE_QUERY_INFO_CLASS +{ + TraceGuidQueryList, + TraceGuidQueryInfo, + TraceGuidQueryProcess, + TraceStackTracingInfo, + TraceSystemTraceEnableFlagsInfo, + TraceSampledProfileIntervalInfo, + TraceProfileSourceConfigInfo, + TraceProfileSourceListInfo, + TracePmcEventListInfo, + TracePmcCounterListInfo, + TraceSetDisallowList, + TraceVersionInfo, + TraceGroupQueryList, + TraceGroupQueryInfo, + TraceDisallowListQuery, + TraceCompressionInfo, + TracePeriodicCaptureStateListInfo, + TracePeriodicCaptureStateInfo, + TraceProviderBinaryTracking, + TraceMaxLoggersQuery, + MaxTraceSetInfoClass +} TRACE_QUERY_INFO_CLASS, TRACE_INFO_CLASS; + #define INVALID_PROCESSTRACE_HANDLE ((TRACEHANDLE)~(ULONG_PTR)0) ULONG WINAPI CloseTrace(TRACEHANDLE);
1
0
0
0
Nikolay Sivov : xmllite/writer: Simplify setting default output encoding.
by Alexandre Julliard
14 Sep '18
14 Sep '18
Module: wine Branch: master Commit: a469d37e435cf762dc916b1dedd3856b5180ee41 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a469d37e435cf762dc916b1d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Sep 14 13:06:49 2018 +0300 xmllite/writer: Simplify setting default output encoding. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xmllite/writer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c index a359e35..e9ad941 100644 --- a/dlls/xmllite/writer.c +++ b/dlls/xmllite/writer.c @@ -1846,7 +1846,6 @@ static HRESULT create_writer_output(IUnknown *stream, IMalloc *imalloc, xml_enco HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream, IMalloc *imalloc, const WCHAR *encoding, IXmlWriterOutput **out) { - static const WCHAR utf8W[] = {'U','T','F','-','8',0}; xmlwriteroutput *output; xml_encoding xml_enc; HRESULT hr; @@ -1858,7 +1857,7 @@ HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream, IMalloc * *out = NULL; - xml_enc = parse_encoding_name(encoding ? encoding : utf8W, -1); + xml_enc = encoding ? parse_encoding_name(encoding, -1) : XmlEncoding_UTF8; if (SUCCEEDED(hr = create_writer_output(stream, imalloc, xml_enc, encoding, &output))) *out = &output->IXmlWriterOutput_iface;
1
0
0
0
Nikolay Sivov : xmllite/writer: Use internal function to create writer output implicitly.
by Alexandre Julliard
14 Sep '18
14 Sep '18
Module: wine Branch: master Commit: 2564862b51c9737f05067e08f97bb604aaaee210 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2564862b51c9737f05067e08…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Sep 14 13:06:48 2018 +0300 xmllite/writer: Use internal function to create writer output implicitly. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xmllite/writer.c | 59 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c index f0eac77..a359e35 100644 --- a/dlls/xmllite/writer.c +++ b/dlls/xmllite/writer.c @@ -148,6 +148,9 @@ static const char *debugstr_writer_prop(XmlWriterProperty prop) return prop_names[prop]; } +static HRESULT create_writer_output(IUnknown *stream, IMalloc *imalloc, xml_encoding encoding, + const WCHAR *encoding_name, xmlwriteroutput **out); + /* writer output memory allocation functions */ static inline void *writeroutput_alloc(xmlwriteroutput *output, size_t len) { @@ -735,10 +738,10 @@ static HRESULT WINAPI xmlwriter_SetOutput(IXmlWriter *iface, IUnknown *output) } if (hr != S_OK || !writeroutput) { - /* create IXmlWriterOutput basing on supplied interface */ - hr = CreateXmlWriterOutputWithEncodingName(output, This->imalloc, NULL, &writeroutput); - if (hr != S_OK) return hr; - This->output = impl_from_IXmlWriterOutput(writeroutput); + /* Create output for given stream. */ + hr = create_writer_output(output, This->imalloc, XmlEncoding_UTF8, NULL, &This->output); + if (hr != S_OK) + return hr; } if (This->output->encoding == XmlEncoding_Unknown) @@ -1795,12 +1798,12 @@ HRESULT WINAPI CreateXmlWriter(REFIID riid, void **obj, IMalloc *imalloc) } static HRESULT create_writer_output(IUnknown *stream, IMalloc *imalloc, xml_encoding encoding, - const WCHAR *encoding_name, IXmlWriterOutput **output) + const WCHAR *encoding_name, xmlwriteroutput **out) { xmlwriteroutput *writeroutput; HRESULT hr; - *output = NULL; + *out = NULL; if (imalloc) writeroutput = IMalloc_Alloc(imalloc, sizeof(*writeroutput)); @@ -1833,40 +1836,52 @@ static HRESULT create_writer_output(IUnknown *stream, IMalloc *imalloc, xml_enco IUnknown_QueryInterface(stream, &IID_IUnknown, (void**)&writeroutput->output); - *output = &writeroutput->IXmlWriterOutput_iface; + *out = writeroutput; - TRACE("returning iface %p\n", *output); + TRACE("Created writer output %p\n", *out); return S_OK; } -HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream, - IMalloc *imalloc, - LPCWSTR encoding, - IXmlWriterOutput **output) +HRESULT WINAPI CreateXmlWriterOutputWithEncodingName(IUnknown *stream, IMalloc *imalloc, const WCHAR *encoding, + IXmlWriterOutput **out) { static const WCHAR utf8W[] = {'U','T','F','-','8',0}; + xmlwriteroutput *output; xml_encoding xml_enc; + HRESULT hr; + + TRACE("%p %p %s %p\n", stream, imalloc, debugstr_w(encoding), out); - TRACE("%p %p %s %p\n", stream, imalloc, debugstr_w(encoding), output); + if (!stream || !out) + return E_INVALIDARG; - if (!stream || !output) return E_INVALIDARG; + *out = NULL; xml_enc = parse_encoding_name(encoding ? encoding : utf8W, -1); - return create_writer_output(stream, imalloc, xml_enc, encoding, output); + if (SUCCEEDED(hr = create_writer_output(stream, imalloc, xml_enc, encoding, &output))) + *out = &output->IXmlWriterOutput_iface; + + return hr; } -HRESULT WINAPI CreateXmlWriterOutputWithEncodingCodePage(IUnknown *stream, - IMalloc *imalloc, - UINT codepage, - IXmlWriterOutput **output) +HRESULT WINAPI CreateXmlWriterOutputWithEncodingCodePage(IUnknown *stream, IMalloc *imalloc, UINT codepage, + IXmlWriterOutput **out) { + xmlwriteroutput *output; xml_encoding xml_enc; + HRESULT hr; - TRACE("%p %p %u %p\n", stream, imalloc, codepage, output); + TRACE("%p %p %u %p\n", stream, imalloc, codepage, out); - if (!stream || !output) return E_INVALIDARG; + if (!stream || !out) + return E_INVALIDARG; + + *out = NULL; xml_enc = get_encoding_from_codepage(codepage); - return create_writer_output(stream, imalloc, xml_enc, NULL, output); + if (SUCCEEDED(hr = create_writer_output(stream, imalloc, xml_enc, NULL, &output))) + *out = &output->IXmlWriterOutput_iface; + + return hr; }
1
0
0
0
Nikolay Sivov : xmllite/writer: Fix formatted output with interleaving text nodes.
by Alexandre Julliard
14 Sep '18
14 Sep '18
Module: wine Branch: master Commit: ef7b911a620d13cd5b921a35feeb86927d4933d3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ef7b911a620d13cd5b921a35…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Sep 14 13:06:47 2018 +0300 xmllite/writer: Fix formatted output with interleaving text nodes. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xmllite/tests/writer.c | 87 +++++++++++++++++++++++++++++++++++++++++++++ dlls/xmllite/writer.c | 24 ++++++++----- 2 files changed, 103 insertions(+), 8 deletions(-) diff --git a/dlls/xmllite/tests/writer.c b/dlls/xmllite/tests/writer.c index 42b534f..7f731be 100644 --- a/dlls/xmllite/tests/writer.c +++ b/dlls/xmllite/tests/writer.c @@ -1981,6 +1981,93 @@ static void test_WriteString(void) " <b>text</b>\r\n" "</a>"); + IStream_Release(stream); + + stream = writer_set_output(writer); + + hr = write_start_element(writer, NULL, "a", NULL); + ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr); + + hr = write_start_element(writer, NULL, "b", NULL); + ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr); + + hr = IXmlWriter_WriteEndElement(writer); + ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr); + + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr); + + CHECK_OUTPUT(stream, + "<a>\r\n" + " <b />"); + + hr = write_start_element(writer, NULL, "c", NULL); + ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr); + + hr = write_attribute_string(writer, NULL, "attr", NULL, "value"); + ok(hr == S_OK, "Failed to write attribute string, hr %#x.\n", hr); + + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr); + + CHECK_OUTPUT(stream, + "<a>\r\n" + " <b />\r\n" + " <c attr=\"value\""); + + hr = write_string(writer, "text"); + ok(hr == S_OK, "Failed to write a string, hr %#x.\n", hr); + + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr); + + CHECK_OUTPUT(stream, + "<a>\r\n" + " <b />\r\n" + " <c attr=\"value\">text"); + + hr = IXmlWriter_WriteEndElement(writer); + ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr); + + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr); + + CHECK_OUTPUT(stream, + "<a>\r\n" + " <b />\r\n" + " <c attr=\"value\">text</c>"); + + hr = write_start_element(writer, NULL, "d", NULL); + ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr); + + hr = write_string(writer, ""); + ok(hr == S_OK, "Failed to write a string, hr %#x.\n", hr); + + hr = IXmlWriter_WriteEndElement(writer); + ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr); + + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr); + + CHECK_OUTPUT(stream, + "<a>\r\n" + " <b />\r\n" + " <c attr=\"value\">text</c>\r\n" + " <d></d>"); + + hr = IXmlWriter_WriteEndElement(writer); + ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr); + + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr); + + CHECK_OUTPUT(stream, + "<a>\r\n" + " <b />\r\n" + " <c attr=\"value\">text</c>\r\n" + " <d></d>\r\n" + "</a>"); + IXmlWriter_Release(writer); IStream_Release(stream); } diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c index 94e1f2f..f0eac77 100644 --- a/dlls/xmllite/writer.c +++ b/dlls/xmllite/writer.c @@ -118,6 +118,7 @@ typedef struct _xmlwriter struct list elements; DWORD bomwritten : 1; DWORD starttagopen : 1; + DWORD textnode : 1; } xmlwriter; static inline xmlwriter *impl_from_IXmlWriter(IXmlWriter *iface) @@ -626,8 +627,11 @@ static void write_node_indent(xmlwriter *writer) static const WCHAR crlfW[] = {'\r','\n'}; unsigned int indent_level = writer->indent_level; - if (!writer->indent) + if (!writer->indent || writer->textnode) + { + writer->textnode = 0; return; + } /* Do state check to prevent newline inserted after BOM. It is assumed that state does not change between writing BOM and inserting indentation. */ @@ -635,6 +639,8 @@ static void write_node_indent(xmlwriter *writer) write_output_buffer(writer->output, crlfW, ARRAY_SIZE(crlfW)); while (indent_level--) write_output_buffer(writer->output, dblspaceW, ARRAY_SIZE(dblspaceW)); + + writer->textnode = 0; } static HRESULT WINAPI xmlwriter_QueryInterface(IXmlWriter *iface, REFIID riid, void **ppvObject) @@ -704,6 +710,7 @@ static HRESULT WINAPI xmlwriter_SetOutput(IXmlWriter *iface, IUnknown *output) IUnknown_Release(&This->output->IXmlWriterOutput_iface); This->output = NULL; This->bomwritten = 0; + This->textnode = 0; This->indent_level = 0; writer_free_element_stack(This); } @@ -1281,7 +1288,10 @@ static HRESULT WINAPI xmlwriter_WriteFullEndElement(IXmlWriter *iface) /* don't force full end tag to the next line */ if (This->state == XmlWriterState_ElemStarted) + { This->state = XmlWriterState_Content; + This->textnode = 0; + } else write_node_indent(This); @@ -1623,6 +1633,7 @@ static HRESULT WINAPI xmlwriter_WriteString(IXmlWriter *iface, const WCHAR *stri ; } + This->textnode = 1; write_escaped_string(This, string); return S_OK; } @@ -1761,21 +1772,18 @@ HRESULT WINAPI CreateXmlWriter(REFIID riid, void **obj, IMalloc *imalloc) writer = IMalloc_Alloc(imalloc, sizeof(*writer)); else writer = heap_alloc(sizeof(*writer)); - if(!writer) return E_OUTOFMEMORY; + if (!writer) + return E_OUTOFMEMORY; + + memset(writer, 0, sizeof(*writer)); writer->IXmlWriter_iface.lpVtbl = &xmlwriter_vtbl; writer->ref = 1; writer->imalloc = imalloc; if (imalloc) IMalloc_AddRef(imalloc); - writer->output = NULL; - writer->indent_level = 0; - writer->indent = FALSE; writer->bom = TRUE; - writer->omitxmldecl = FALSE; writer->conformance = XmlConformanceLevel_Document; writer->state = XmlWriterState_Initial; - writer->bomwritten = 0; - writer->starttagopen = 0; list_init(&writer->elements); hr = IXmlWriter_QueryInterface(&writer->IXmlWriter_iface, riid, obj);
1
0
0
0
Nikolay Sivov : xmllite/writer: Fix formatted output for closing tags.
by Alexandre Julliard
14 Sep '18
14 Sep '18
Module: wine Branch: master Commit: 9784ef163379295579e5b3b679e63996e9435c4e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9784ef163379295579e5b3b6…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Sep 14 13:06:46 2018 +0300 xmllite/writer: Fix formatted output for closing tags. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xmllite/tests/writer.c | 88 +++++++++++++++++++++++++++++++++++++-------- dlls/xmllite/writer.c | 21 ++++++----- 2 files changed, 85 insertions(+), 24 deletions(-) diff --git a/dlls/xmllite/tests/writer.c b/dlls/xmllite/tests/writer.c index 1710462..42b534f 100644 --- a/dlls/xmllite/tests/writer.c +++ b/dlls/xmllite/tests/writer.c @@ -881,6 +881,20 @@ static HRESULT write_element_string(IXmlWriter *writer, const char *prefix, cons return hr; } +static HRESULT write_string(IXmlWriter *writer, const char *str) +{ + WCHAR *strW; + HRESULT hr; + + strW = strdupAtoW(str); + + hr = IXmlWriter_WriteString(writer, strW); + + heap_free(strW); + + return hr; +} + static void test_WriteStartElement(void) { static const struct @@ -1853,10 +1867,6 @@ static void test_WriteCharEntity(void) static void test_WriteString(void) { - static const WCHAR markupW[] = {'<','&','"','>','=',0}; - static const WCHAR aW[] = {'a',0}; - static const WCHAR bW[] = {'b',0}; - static const WCHAR emptyW[] = {0}; IXmlWriter *writer; IStream *stream; HRESULT hr; @@ -1866,31 +1876,31 @@ static void test_WriteString(void) writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration); - hr = IXmlWriter_WriteString(writer, aW); + hr = write_string(writer, "a"); ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr); - hr = IXmlWriter_WriteString(writer, NULL); + hr = write_string(writer, NULL); ok(hr == S_OK, "got 0x%08x\n", hr); - hr = IXmlWriter_WriteString(writer, emptyW); + hr = write_string(writer, ""); ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr); stream = writer_set_output(writer); - hr = IXmlWriter_WriteStartElement(writer, NULL, bW, NULL); + hr = write_start_element(writer, NULL, "b", NULL); ok(hr == S_OK, "got 0x%08x\n", hr); - hr = IXmlWriter_WriteString(writer, NULL); + hr = write_string(writer, NULL); ok(hr == S_OK, "got 0x%08x\n", hr); - hr = IXmlWriter_WriteString(writer, emptyW); + hr = write_string(writer, ""); ok(hr == S_OK, "got 0x%08x\n", hr); - hr = IXmlWriter_WriteString(writer, aW); + hr = write_string(writer, "a"); ok(hr == S_OK, "got 0x%08x\n", hr); /* WriteString automatically escapes markup characters */ - hr = IXmlWriter_WriteString(writer, markupW); + hr = write_string(writer, "<&\">="); ok(hr == S_OK, "got 0x%08x\n", hr); hr = IXmlWriter_Flush(writer); @@ -1902,10 +1912,10 @@ static void test_WriteString(void) stream = writer_set_output(writer); - hr = IXmlWriter_WriteStartElement(writer, NULL, bW, NULL); + hr = write_start_element(writer, NULL, "b", NULL); ok(hr == S_OK, "got 0x%08x\n", hr); - hr = IXmlWriter_WriteString(writer, NULL); + hr = write_string(writer, NULL); ok(hr == S_OK, "got 0x%08x\n", hr); hr = IXmlWriter_Flush(writer); @@ -1914,7 +1924,7 @@ static void test_WriteString(void) CHECK_OUTPUT(stream, "<b"); - hr = IXmlWriter_WriteString(writer, emptyW); + hr = write_string(writer, ""); ok(hr == S_OK, "got 0x%08x\n", hr); hr = IXmlWriter_Flush(writer); @@ -1923,6 +1933,54 @@ static void test_WriteString(void) CHECK_OUTPUT(stream, "<b>"); + IStream_Release(stream); + IXmlWriter_Release(writer); + + /* With indentation */ + hr = CreateXmlWriter(&IID_IXmlWriter, (void **)&writer, NULL); + ok(hr == S_OK, "Failed to create a writer, hr %#x.\n", hr); + + stream = writer_set_output(writer); + + writer_set_property(writer, XmlWriterProperty_Indent); + + hr = write_start_element(writer, NULL, "a", NULL); + ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr); + + hr = write_start_element(writer, NULL, "b", NULL); + ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr); + + hr = write_string(writer, "text"); + ok(hr == S_OK, "Failed to write a string, hr %#x.\n", hr); + + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr); + + CHECK_OUTPUT(stream, + "<a>\r\n" + " <b>text"); + + hr = IXmlWriter_WriteFullEndElement(writer); + ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr); + + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr); + + CHECK_OUTPUT(stream, + "<a>\r\n" + " <b>text</b>"); + + hr = IXmlWriter_WriteFullEndElement(writer); + ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr); + + hr = IXmlWriter_Flush(writer); + ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr); + + CHECK_OUTPUT(stream, + "<a>\r\n" + " <b>text</b>\r\n" + "</a>"); + IXmlWriter_Release(writer); IStream_Release(stream); } diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c index 92217b8..94e1f2f 100644 --- a/dlls/xmllite/writer.c +++ b/dlls/xmllite/writer.c @@ -80,6 +80,7 @@ typedef struct xml_encoding encoding; WCHAR *encoding_name; /* exactly as specified on output creation */ struct output_buffer buffer; + DWORD written : 1; } xmlwriteroutput; static const struct IUnknownVtbl xmlwriteroutputvtbl; @@ -114,9 +115,9 @@ typedef struct _xmlwriter BOOL omitxmldecl; XmlConformanceLevel conformance; XmlWriterState state; - BOOL bomwritten; - BOOL starttagopen; struct list elements; + DWORD bomwritten : 1; + DWORD starttagopen : 1; } xmlwriter; static inline xmlwriter *impl_from_IXmlWriter(IXmlWriter *iface) @@ -438,6 +439,7 @@ static HRESULT write_output_buffer(xmlwriteroutput *output, const WCHAR *data, i length = WideCharToMultiByte(buffer->codepage, 0, data, len, ptr, length, NULL, NULL); buffer->written += len == -1 ? length-1 : length; } + output->written = length != 0; return S_OK; } @@ -603,7 +605,7 @@ static HRESULT writer_close_starttag(xmlwriter *writer) writer_output_ns(writer, LIST_ENTRY(list_head(&writer->elements), struct element, entry)); hr = write_output_buffer(writer->output, gtW, ARRAY_SIZE(gtW)); - writer->starttagopen = FALSE; + writer->starttagopen = 0; return hr; } @@ -629,7 +631,7 @@ static void write_node_indent(xmlwriter *writer) /* Do state check to prevent newline inserted after BOM. It is assumed that state does not change between writing BOM and inserting indentation. */ - if (writer->output->buffer.written && writer->state != XmlWriterState_Ready) + if (writer->output->written && writer->state != XmlWriterState_Ready) write_output_buffer(writer->output, crlfW, ARRAY_SIZE(crlfW)); while (indent_level--) write_output_buffer(writer->output, dblspaceW, ARRAY_SIZE(dblspaceW)); @@ -701,7 +703,7 @@ static HRESULT WINAPI xmlwriter_SetOutput(IXmlWriter *iface, IUnknown *output) writeroutput_release_stream(This->output); IUnknown_Release(&This->output->IXmlWriterOutput_iface); This->output = NULL; - This->bomwritten = FALSE; + This->bomwritten = 0; This->indent_level = 0; writer_free_element_stack(This); } @@ -1211,7 +1213,7 @@ static HRESULT WINAPI xmlwriter_WriteEndElement(IXmlWriter *iface) { writer_output_ns(This, element); write_output_buffer(This->output, closetagW, ARRAY_SIZE(closetagW)); - This->starttagopen = FALSE; + This->starttagopen = 0; } else { @@ -1551,7 +1553,7 @@ static HRESULT WINAPI xmlwriter_WriteStartElement(IXmlWriter *iface, LPCWSTR pre write_node_indent(This); This->state = XmlWriterState_ElemStarted; - This->starttagopen = TRUE; + This->starttagopen = 1; writer_push_element(This, element); @@ -1772,8 +1774,8 @@ HRESULT WINAPI CreateXmlWriter(REFIID riid, void **obj, IMalloc *imalloc) writer->omitxmldecl = FALSE; writer->conformance = XmlConformanceLevel_Document; writer->state = XmlWriterState_Initial; - writer->bomwritten = FALSE; - writer->starttagopen = FALSE; + writer->bomwritten = 0; + writer->starttagopen = 0; list_init(&writer->elements); hr = IXmlWriter_QueryInterface(&writer->IXmlWriter_iface, riid, obj); @@ -1819,6 +1821,7 @@ static HRESULT create_writer_output(IUnknown *stream, IMalloc *imalloc, xml_enco } else writeroutput->encoding_name = NULL; + writeroutput->written = 0; IUnknown_QueryInterface(stream, &IID_IUnknown, (void**)&writeroutput->output);
1
0
0
0
Nikolay Sivov : xmllite/writer: Free finished element data (Valgrind).
by Alexandre Julliard
14 Sep '18
14 Sep '18
Module: wine Branch: master Commit: 5f548d2af39a41536468f570ed0aa3ada7080a84 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5f548d2af39a41536468f570…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Sep 14 13:06:45 2018 +0300 xmllite/writer: Free finished element data (Valgrind). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xmllite/writer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c index aa6ff7f..92217b8 100644 --- a/dlls/xmllite/writer.c +++ b/dlls/xmllite/writer.c @@ -1221,6 +1221,7 @@ static HRESULT WINAPI xmlwriter_WriteEndElement(IXmlWriter *iface) write_output_buffer(This->output, element->qname, element->len); write_output_buffer(This->output, gtW, ARRAY_SIZE(gtW)); } + writer_free_element(This, element); return S_OK; } @@ -1287,6 +1288,8 @@ static HRESULT WINAPI xmlwriter_WriteFullEndElement(IXmlWriter *iface) write_output_buffer(This->output, element->qname, element->len); write_output_buffer(This->output, gtW, ARRAY_SIZE(gtW)); + writer_free_element(This, element); + return S_OK; }
1
0
0
0
Jactry Zeng : ntoskrnl: Add FsRtlIsNameInExpression stub.
by Alexandre Julliard
14 Sep '18
14 Sep '18
Module: wine Branch: master Commit: c43030b664da2345b4763ea3feb664ac722e1148 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c43030b664da2345b4763ea3…
Author: Jactry Zeng <jzeng(a)codeweavers.com> Date: Fri Sep 14 16:59:47 2018 +0800 ntoskrnl: Add FsRtlIsNameInExpression stub. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=41039
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 10 ++++++++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- include/ddk/ntifs.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 18524af..9fbf22d 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2048,6 +2048,16 @@ NTSTATUS WINAPI ExInitializeZone(PZONE_HEADER Zone, } /*********************************************************************** +* FsRtlIsNameInExpression (NTOSKRNL.EXE.@) +*/ +BOOLEAN WINAPI FsRtlIsNameInExpression(PUNICODE_STRING expression, PUNICODE_STRING name, + BOOLEAN ignore, PWCH upcase) +{ + FIXME("stub: %p %p %d %p\n", expression, name, ignore, upcase); + return FALSE; +} + +/*********************************************************************** * FsRtlRegisterUncProvider (NTOSKRNL.EXE.@) */ NTSTATUS WINAPI FsRtlRegisterUncProvider(PHANDLE MupHandle, PUNICODE_STRING RedirDevName, diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 12f9ddb..422d575 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -234,7 +234,7 @@ @ stub FsRtlIsDbcsInExpression @ stub FsRtlIsFatDbcsLegal @ stub FsRtlIsHpfsDbcsLegal -@ stub FsRtlIsNameInExpression +@ stdcall FsRtlIsNameInExpression(ptr ptr long ptr) @ stub FsRtlIsNtstatusExpected @ stub FsRtlIsPagingFile @ stub FsRtlIsTotalDeviceFailure diff --git a/include/ddk/ntifs.h b/include/ddk/ntifs.h index 50aaabe..a1ed847 100644 --- a/include/ddk/ntifs.h +++ b/include/ddk/ntifs.h @@ -129,6 +129,7 @@ typedef struct _FS_FILTER_CALLBACKS PFS_FILTER_COMPLETION_CALLBACK PostReleaseForModifiedPageWriter; } FS_FILTER_CALLBACKS, *PFS_FILTER_CALLBACKS; +BOOLEAN WINAPI FsRtlIsNameInExpression(PUNICODE_STRING, PUNICODE_STRING, BOOLEAN, PWCH); NTSTATUS WINAPI ObQueryNameString(PVOID,POBJECT_NAME_INFORMATION,ULONG,PULONG); #endif
1
0
0
0
Pierre Schweitzer : mpr: Properly handle device-less connections.
by Alexandre Julliard
14 Sep '18
14 Sep '18
Module: wine Branch: master Commit: 93fb279f4f3e150eee329b02ca5fb0251d8a239d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=93fb279f4f3e150eee329b02…
Author: Pierre Schweitzer <pierre(a)reactos.org> Date: Fri Sep 14 08:38:28 2018 +0200 mpr: Properly handle device-less connections. Signed-off-by: Pierre Schweitzer <pierre(a)reactos.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mpr/wnet.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c index 8d83bd6..4260ee1 100644 --- a/dlls/mpr/wnet.c +++ b/dlls/mpr/wnet.c @@ -2413,6 +2413,7 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel, DWORD WINAPI WNetClearConnections ( HWND owner ) { HANDLE connected; + PWSTR connection; DWORD ret, size, count; NETRESOURCEW * resources, * iter; @@ -2446,7 +2447,14 @@ DWORD WINAPI WNetClearConnections ( HWND owner ) if (ret == WN_SUCCESS || ret == WN_MORE_DATA) { for (iter = resources; count; count--, iter++) - WNetCancelConnection2W(iter->lpLocalName, 0, TRUE); + { + if (iter->lpLocalName && iter->lpLocalName[0]) + connection = iter->lpLocalName; + else + connection = iter->lpRemoteName; + + WNetCancelConnection2W(connection, 0, TRUE); + } } else break;
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
67
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
Results per page:
10
25
50
100
200