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
Nikolay Sivov : d2d1: Add ID2D1Effect stub.
by Alexandre Julliard
26 Sep '18
26 Sep '18
Module: wine Branch: master Commit: 62259297c4f368bb1e2604e455f98639c32f6d00 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=62259297c4f368bb1e2604e4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Sep 26 03:34:47 2018 +0300 d2d1: Add ID2D1Effect stub. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d2d1/Makefile.in | 1 + dlls/d2d1/d2d1_private.h | 8 ++ dlls/d2d1/device.c | 12 ++- dlls/d2d1/effect.c | 214 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 234 insertions(+), 1 deletion(-) diff --git a/dlls/d2d1/Makefile.in b/dlls/d2d1/Makefile.in index 4bfe3b5..4135713 100644 --- a/dlls/d2d1/Makefile.in +++ b/dlls/d2d1/Makefile.in @@ -9,6 +9,7 @@ C_SRCS = \ brush.c \ dc_render_target.c \ device.c \ + effect.c \ factory.c \ geometry.c \ hwnd_render_target.c \ diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index 9bfbbf2..726d143 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -503,6 +503,14 @@ struct d2d_device void d2d_device_init(struct d2d_device *device, ID2D1Factory1 *factory, IDXGIDevice *dxgi_device) DECLSPEC_HIDDEN; +struct d2d_effect +{ + ID2D1Effect ID2D1Effect_iface; + LONG refcount; +}; + +void d2d_effect_init(struct d2d_effect *effect) DECLSPEC_HIDDEN; + static inline BOOL d2d_array_reserve(void **elements, size_t *capacity, size_t count, size_t size) { size_t new_capacity, max_capacity; diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c index 5e6655f..be31eca 100644 --- a/dlls/d2d1/device.c +++ b/dlls/d2d1/device.c @@ -1858,9 +1858,19 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmapFromDxgiSurface( static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateEffect(ID2D1DeviceContext *iface, REFCLSID effect_id, ID2D1Effect **effect) { + struct d2d_effect *object; + FIXME("iface %p, effect_id %s, effect %p stub!\n", iface, debugstr_guid(effect_id), effect); - return E_NOTIMPL; + if (!(object = heap_alloc_zero(sizeof(*object)))) + return E_OUTOFMEMORY; + + d2d_effect_init(object); + + TRACE("Created effect %p.\n", object); + *effect = &object->ID2D1Effect_iface; + + return S_OK; } static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateGradientStopCollection( diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c new file mode 100644 index 0000000..f5e501f --- /dev/null +++ b/dlls/d2d1/effect.c @@ -0,0 +1,214 @@ +/* + * Copyright 2018 Nikolay Sivov for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" +#include "wine/port.h" + +#include "d2d1_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d2d); + +static inline struct d2d_effect *impl_from_ID2D1Effect(ID2D1Effect *iface) +{ + return CONTAINING_RECORD(iface, struct d2d_effect, ID2D1Effect_iface); +} + +static HRESULT STDMETHODCALLTYPE d2d_effect_QueryInterface(ID2D1Effect *iface, REFIID iid, void **out) +{ + TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); + + if (IsEqualGUID(iid, &IID_ID2D1Effect) + || IsEqualGUID(iid, &IID_ID2D1Properties) + || IsEqualGUID(iid, &IID_IUnknown)) + { + ID2D1Effect_AddRef(iface); + *out = iface; + return S_OK; + } + + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid)); + + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG STDMETHODCALLTYPE d2d_effect_AddRef(ID2D1Effect *iface) +{ + struct d2d_effect *effect = impl_from_ID2D1Effect(iface); + ULONG refcount = InterlockedIncrement(&effect->refcount); + + TRACE("%p increasing refcount to %u.\n", iface, refcount); + + return refcount; +} + +static ULONG STDMETHODCALLTYPE d2d_effect_Release(ID2D1Effect *iface) +{ + struct d2d_effect *effect = impl_from_ID2D1Effect(iface); + ULONG refcount = InterlockedDecrement(&effect->refcount); + + TRACE("%p decreasing refcount to %u.\n", iface, refcount); + + if (!refcount) + heap_free(effect); + + return refcount; +} + +static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyCount(ID2D1Effect *iface) +{ + FIXME("iface %p stub!\n", iface); + + return 0; +} + +static HRESULT STDMETHODCALLTYPE d2d_effect_GetPropertyName(ID2D1Effect *iface, UINT32 index, + WCHAR *name, UINT32 name_count) +{ + FIXME("iface %p, index %u, name %p, name_count %u stub!\n", iface, index, name, name_count); + + return E_NOTIMPL; +} + +static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyNameLength(ID2D1Effect *iface, UINT32 index) +{ + FIXME("iface %p, index %u stub!\n", iface, index); + + return 0; +} + +static D2D1_PROPERTY_TYPE STDMETHODCALLTYPE d2d_effect_GetType(ID2D1Effect *iface, UINT32 index) +{ + FIXME("iface %p, index %u stub!\n", iface, index); + + return 0; +} + +static UINT32 STDMETHODCALLTYPE d2d_effect_GetPropertyIndex(ID2D1Effect *iface, const WCHAR *name) +{ + FIXME("iface %p, name %s stub!\n", iface, debugstr_w(name)); + + return 0; +} + +static HRESULT STDMETHODCALLTYPE d2d_effect_SetValueByName(ID2D1Effect *iface, const WCHAR *name, + D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 value_size) +{ + FIXME("iface %p, name %s, type %#x, value %p, value_size %u stub!\n", iface, debugstr_w(name), + type, value, value_size); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_effect_SetValue(ID2D1Effect *iface, UINT32 index, D2D1_PROPERTY_TYPE type, + const BYTE *value, UINT32 value_size) +{ + FIXME("iface %p, index %u, type %#x, value %p, value_size %u stub!\n", iface, index, type, value, value_size); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_effect_GetValueByName(ID2D1Effect *iface, const WCHAR *name, + D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 value_size) +{ + FIXME("iface %p, name %s, type %#x, value %p, value_size %u stub!\n", iface, debugstr_w(name), type, + value, value_size); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_effect_GetValue(ID2D1Effect *iface, UINT32 index, D2D1_PROPERTY_TYPE type, + BYTE *value, UINT32 value_size) +{ + FIXME("iface %p, index %u, type %#x, value %p, value_size %u stub!\n", iface, index, type, + value, value_size); + + return E_NOTIMPL; +} + +static UINT32 STDMETHODCALLTYPE d2d_effect_GetValueSize(ID2D1Effect *iface, UINT32 index) +{ + FIXME("iface %p, index %u stub!\n", iface, index); + + return 0; +} + +static HRESULT STDMETHODCALLTYPE d2d_effect_GetSubProperties(ID2D1Effect *iface, UINT32 index, ID2D1Properties **props) +{ + FIXME("iface %p, index %u, props %p stub!\n", iface, index, props); + + return E_NOTIMPL; +} + +static void STDMETHODCALLTYPE d2d_effect_SetInput(ID2D1Effect *iface, UINT32 index, ID2D1Image *input, BOOL invalidate) +{ + FIXME("iface %p, index %u, input %p, invalidate %d stub!\n", iface, index, input, invalidate); +} + +static HRESULT STDMETHODCALLTYPE d2d_effect_SetInputCount(ID2D1Effect *iface, UINT32 count) +{ + FIXME("iface %p, count %u stub!\n", iface, count); + + return E_NOTIMPL; +} + +static void STDMETHODCALLTYPE d2d_effect_GetInput(ID2D1Effect *iface, UINT32 index, ID2D1Image **input) +{ + FIXME("iface %p, index %u, input %p stub!\n", iface, index, input); +} + +static UINT32 STDMETHODCALLTYPE d2d_effect_GetInputCount(ID2D1Effect *iface) +{ + FIXME("iface %p stub!\n", iface); + + return 0; +} + +static void STDMETHODCALLTYPE d2d_effect_GetOutput(ID2D1Effect *iface, ID2D1Image **output) +{ + FIXME("iface %p, output %p stub!\n", iface, output); +} + +static const ID2D1EffectVtbl d2d_effect_vtbl = +{ + d2d_effect_QueryInterface, + d2d_effect_AddRef, + d2d_effect_Release, + d2d_effect_GetPropertyCount, + d2d_effect_GetPropertyName, + d2d_effect_GetPropertyNameLength, + d2d_effect_GetType, + d2d_effect_GetPropertyIndex, + d2d_effect_SetValueByName, + d2d_effect_SetValue, + d2d_effect_GetValueByName, + d2d_effect_GetValue, + d2d_effect_GetValueSize, + d2d_effect_GetSubProperties, + d2d_effect_SetInput, + d2d_effect_SetInputCount, + d2d_effect_GetInput, + d2d_effect_GetInputCount, + d2d_effect_GetOutput, +}; + +void d2d_effect_init(struct d2d_effect *effect) +{ + effect->ID2D1Effect_iface.lpVtbl = &d2d_effect_vtbl; + effect->refcount = 1; +}
1
0
0
0
Austin English : iphlpapi: Add GetIpNetTable2 stub.
by Alexandre Julliard
26 Sep '18
26 Sep '18
Module: wine Branch: master Commit: 2ffe089c958dc964f8831ef9fa68364bdb4b6e1b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2ffe089c958dc964f8831ef9…
Author: Austin English <austinenglish(a)gmail.com> Date: Tue Sep 25 15:59:20 2018 -0500 iphlpapi: Add GetIpNetTable2 stub. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=45036
Signed-off-by: Austin English <austinenglish(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/iphlpapi/iphlpapi.spec | 2 +- dlls/iphlpapi/iphlpapi_main.c | 11 +++++++++++ include/netioapi.h | 32 ++++++++++++++++++++++++++++++++ include/nldef.h | 12 ++++++++++++ 4 files changed, 56 insertions(+), 1 deletion(-) diff --git a/dlls/iphlpapi/iphlpapi.spec b/dlls/iphlpapi/iphlpapi.spec index fd00cc0..30d9ed7 100644 --- a/dlls/iphlpapi/iphlpapi.spec +++ b/dlls/iphlpapi/iphlpapi.spec @@ -108,7 +108,7 @@ #@ stub GetIpInterfaceTable #@ stub GetIpNetEntry2 @ stdcall GetIpNetTable( ptr ptr long ) -#@ stub GetIpNetTable2 +@ stdcall GetIpNetTable2( long ptr ) @ stub GetIpNetTableFromStack #@ stub GetIpPathEntry #@ stub GetIpPathTable diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index c7140cd..6273949 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -3293,3 +3293,14 @@ DWORD WINAPI GetIpForwardTable2(ADDRESS_FAMILY family, PMIB_IPFORWARD_TABLE2 *ta if (!once++) FIXME("(%u %p): stub\n", family, table); return ERROR_NOT_SUPPORTED; } + +/****************************************************************** + * GetIpNetTable2 (IPHLPAPI.@) + */ +DWORD WINAPI GetIpNetTable2(ADDRESS_FAMILY family, PMIB_IPNET_TABLE2 *table) +{ + static int once; + + if (!once++) FIXME("(%u %p): stub\n", family, table); + return ERROR_NOT_SUPPORTED; +} diff --git a/include/netioapi.h b/include/netioapi.h index f15a80f..e9de7dd 100644 --- a/include/netioapi.h +++ b/include/netioapi.h @@ -193,6 +193,38 @@ typedef struct _MIB_IPFORWARD_TABLE2 MIB_IPFORWARD_ROW2 Table[ANY_SIZE]; } MIB_IPFORWARD_TABLE2, *PMIB_IPFORWARD_TABLE2; +typedef struct _MIB_IPNET_ROW2 +{ + SOCKADDR_INET Address; + NET_IFINDEX InterfaceIndex; + NET_LUID InterfaceLuid; + UCHAR PhysicalAddress[IF_MAX_PHYS_ADDRESS_LENGTH]; + ULONG PhysicalAddressLength; + NL_NEIGHBOR_STATE State; + + union + { + struct + { + BOOLEAN IsRouter : 1; + BOOLEAN IsUnreachable : 1; + } DUMMYSTRUCTNAME; + UCHAR Flags; + } DUMMYUNIONNAME; + + union + { + ULONG LastReachable; + ULONG LastUnreachable; + } ReachabilityTime; +} MIB_IPNET_ROW2, *PMIB_IPNET_ROW2; + +typedef struct _MIB_IPNET_TABLE2 +{ + ULONG NumEntries; + MIB_IPNET_ROW2 Table[ANY_SIZE]; +} MIB_IPNET_TABLE2, *PMIB_IPNET_TABLE2; + typedef VOID (WINAPI *PIPINTERFACE_CHANGE_CALLBACK)(PVOID, PMIB_IPINTERFACE_ROW, MIB_NOTIFICATION_TYPE); typedef VOID (WINAPI *PUNICAST_IPADDRESS_CHANGE_CALLBACK)(PVOID, PMIB_UNICASTIPADDRESS_ROW, diff --git a/include/nldef.h b/include/nldef.h index 983b96c..ef30f7f 100644 --- a/include/nldef.h +++ b/include/nldef.h @@ -111,4 +111,16 @@ typedef struct _NL_INTERFACE_OFFLOAD_ROD BOOLEAN TlGiantSendOffloadSupported : 1; } NL_INTERFACE_OFFLOAD_ROD, *PNL_INTERFACE_OFFLOAD_ROD; +typedef enum _NL_NEIGHBOR_STATE +{ + NlnsUnreachable, + NlnsIncomplete, + NlnsProbe, + NlnsDelay, + NlnsStale, + NlnsReachable, + NlnsPermanent, + NlnsMaximum, +} NL_NEIGHBOR_STATE, *PNL_NEIGHBOR_STATE; + #endif /* __WINE_NLDEF_H */
1
0
0
0
Nikolay Sivov : crypt32: Fix formatted output length for base64.
by Alexandre Julliard
26 Sep '18
26 Sep '18
Module: wine Branch: master Commit: 09a785cb4da13d0d2985b4d25f16865cf4d18d4b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=09a785cb4da13d0d2985b4d2…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Sep 26 13:09:54 2018 +0300 crypt32: Fix formatted output length for base64. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/crypt32/base64.c | 10 ++++++---- dlls/crypt32/tests/base64.c | 26 ++++++++++++++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/dlls/crypt32/base64.c b/dlls/crypt32/base64.c index 5caab97..ac288b7 100644 --- a/dlls/crypt32/base64.c +++ b/dlls/crypt32/base64.c @@ -104,8 +104,9 @@ static LONG encodeBase64A(const BYTE *in_buf, int in_len, LPCSTR sep, LPSTR ptr; TRACE("bytes is %d, pad bytes is %d\n", bytes, pad_bytes); - needed = bytes + pad_bytes + 1; - needed += (needed / 64 + 1) * strlen(sep); + needed = bytes + pad_bytes; + needed += (needed / 64 + (needed % 64 ? 1 : 0)) * strlen(sep); + needed++; if (needed > *out_len) { @@ -303,8 +304,9 @@ static LONG encodeBase64W(const BYTE *in_buf, int in_len, LPCWSTR sep, LPWSTR ptr; TRACE("bytes is %d, pad bytes is %d\n", bytes, pad_bytes); - needed = bytes + pad_bytes + 1; - needed += (needed / 64 + 1) * strlenW(sep); + needed = bytes + pad_bytes; + needed += (needed / 64 + (needed % 64 ? 1 : 0)) * strlenW(sep); + needed++; if (needed > *out_len) { diff --git a/dlls/crypt32/tests/base64.c b/dlls/crypt32/tests/base64.c index 2249e1b..e6adc7a 100644 --- a/dlls/crypt32/tests/base64.c +++ b/dlls/crypt32/tests/base64.c @@ -55,6 +55,8 @@ static const BYTE toEncode4[] = "abcdefghijlkmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890" "abcdefghijlkmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890" "abcdefghijlkmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890"; +static const BYTE toEncode5[] = + "abcdefghijlkmnopqrstuvwxyz01234567890ABCDEFGHI"; static const struct BinTests tests[] = { { toEncode1, sizeof(toEncode1), "AA==\r\n", }, @@ -66,6 +68,8 @@ static const struct BinTests tests[] = { "d3h5ejAxMjM0NTY3ODkwQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVowMTIzNDU2\r\n" "Nzg5MGFiY2RlZmdoaWpsa21ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OTBBQkNERUZH\r\n" "SElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0NTY3ODkwAA==\r\n" }, + { toEncode5, sizeof(toEncode5), + "YWJjZGVmZ2hpamxrbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5MEFCQ0RFRkdISQA=\r\n" }, }; static const struct BinTests testsNoCR[] = { @@ -78,6 +82,8 @@ static const struct BinTests testsNoCR[] = { "d3h5ejAxMjM0NTY3ODkwQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVowMTIzNDU2\n" "Nzg5MGFiY2RlZmdoaWpsa21ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OTBBQkNERUZH\n" "SElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0NTY3ODkwAA==\n" }, + { toEncode5, sizeof(toEncode5), + "YWJjZGVmZ2hpamxrbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5MEFCQ0RFRkdISQA=\n" }, }; static WCHAR *strdupAtoW(const char *str) @@ -96,15 +102,21 @@ static WCHAR *strdupAtoW(const char *str) static void encodeAndCompareBase64_A(const BYTE *toEncode, DWORD toEncodeLen, DWORD format, const char *expected, const char *header, const char *trailer) { - DWORD strLen, strLen2; + DWORD strLen, strLen2, required; const char *ptr; LPSTR str = NULL; BOOL ret; + required = strlen(expected) + 1; + if (header) + required += strlen(header); + if (trailer) + required += strlen(trailer); + strLen = 0; ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, NULL, &strLen); ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); - ok(strLen > 0, "Unexpected required length.\n"); + ok(strLen == required, "Unexpected required length %u, expected %u.\n", required, strLen); strLen2 = strLen; ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, NULL, &strLen2); @@ -154,16 +166,22 @@ todo_wine { static void encode_compare_base64_W(const BYTE *toEncode, DWORD toEncodeLen, DWORD format, const WCHAR *expected, const char *header, const char *trailer) { - WCHAR *headerW, *trailerW; + WCHAR *headerW, *trailerW, required; DWORD strLen, strLen2; WCHAR *strW = NULL; const WCHAR *ptr; BOOL ret; + required = lstrlenW(expected) + 1; + if (header) + required += strlen(header); + if (trailer) + required += strlen(trailer); + strLen = 0; ret = CryptBinaryToStringW(toEncode, toEncodeLen, format, NULL, &strLen); ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); - ok(strLen > 0, "Unexpected required length.\n"); + ok(strLen == required, "Unexpected required length %u, expected %u.\n", strLen, required); /* Same call with non-zero length value. */ strLen2 = strLen;
1
0
0
0
Nikolay Sivov : crypt32: Fix output buffer handling for CRYPT_STRING_BINARY case.
by Alexandre Julliard
26 Sep '18
26 Sep '18
Module: wine Branch: master Commit: 5652a19110caa451f1ba0d1c8252fc278d81f7e7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5652a19110caa451f1ba0d1c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Sep 26 13:09:53 2018 +0300 crypt32: Fix output buffer handling for CRYPT_STRING_BINARY case. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/crypt32/base64.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/dlls/crypt32/base64.c b/dlls/crypt32/base64.c index e25e4c1..5caab97 100644 --- a/dlls/crypt32/base64.c +++ b/dlls/crypt32/base64.c @@ -77,23 +77,20 @@ static BOOL EncodeBinaryToBinaryA(const BYTE *pbBinary, { BOOL ret = TRUE; - if (*pcchString < cbBinary) + if (pszString) { - if (!pszString) - *pcchString = cbBinary; - else + if (*pcchString < cbBinary) { SetLastError(ERROR_INSUFFICIENT_BUFFER); - *pcchString = cbBinary; ret = FALSE; } - } - else - { - if (cbBinary) + else if (cbBinary) memcpy(pszString, pbBinary, cbBinary); - *pcchString = cbBinary; } + else + + *pcchString = cbBinary; + return ret; }
1
0
0
0
Nikolay Sivov : crypt32: Fix NULL output buffer handling for CryptBinaryToString().
by Alexandre Julliard
26 Sep '18
26 Sep '18
Module: wine Branch: master Commit: d18d38bc98006ef7c3c34e8e4e744e3768835735 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d18d38bc98006ef7c3c34e8e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Sep 26 13:09:52 2018 +0300 crypt32: Fix NULL output buffer handling for CryptBinaryToString(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/crypt32/base64.c | 98 ++++++++++++++++++++------------------ dlls/crypt32/tests/base64.c | 111 ++++++++++++++++++++++++++++++++------------ 2 files changed, 136 insertions(+), 73 deletions(-) diff --git a/dlls/crypt32/base64.c b/dlls/crypt32/base64.c index bc30779..e25e4c1 100644 --- a/dlls/crypt32/base64.c +++ b/dlls/crypt32/base64.c @@ -215,36 +215,41 @@ static BOOL BinaryToBase64A(const BYTE *pbBinary, charsNeeded += strlen(header) + strlen(sep); if (trailer) charsNeeded += strlen(trailer) + strlen(sep); - if (charsNeeded <= *pcchString) - { - LPSTR ptr = pszString; - DWORD size = charsNeeded; - if (header) + if (pszString) + { + if (charsNeeded <= *pcchString) { - strcpy(ptr, header); - ptr += strlen(ptr); - strcpy(ptr, sep); - ptr += strlen(sep); + LPSTR ptr = pszString; + DWORD size = charsNeeded; + + if (header) + { + strcpy(ptr, header); + ptr += strlen(ptr); + strcpy(ptr, sep); + ptr += strlen(sep); + } + encodeBase64A(pbBinary, cbBinary, sep, ptr, &size); + ptr += size - 1; + if (trailer) + { + strcpy(ptr, trailer); + ptr += strlen(ptr); + strcpy(ptr, sep); + } + *pcchString = charsNeeded - 1; } - encodeBase64A(pbBinary, cbBinary, sep, ptr, &size); - ptr += size - 1; - if (trailer) + else { - strcpy(ptr, trailer); - ptr += strlen(ptr); - strcpy(ptr, sep); + *pcchString = charsNeeded; + SetLastError(ERROR_INSUFFICIENT_BUFFER); + ret = FALSE; } - *pcchString = charsNeeded - 1; - } - else if (pszString) - { - *pcchString = charsNeeded; - SetLastError(ERROR_INSUFFICIENT_BUFFER); - ret = FALSE; } else *pcchString = charsNeeded; + return ret; } @@ -409,36 +414,41 @@ static BOOL BinaryToBase64W(const BYTE *pbBinary, charsNeeded += strlenW(header) + strlenW(sep); if (trailer) charsNeeded += strlenW(trailer) + strlenW(sep); - if (charsNeeded <= *pcchString) - { - LPWSTR ptr = pszString; - DWORD size = charsNeeded; - if (header) + if (pszString) + { + if (charsNeeded <= *pcchString) { - strcpyW(ptr, header); - ptr += strlenW(ptr); - strcpyW(ptr, sep); - ptr += strlenW(sep); + LPWSTR ptr = pszString; + DWORD size = charsNeeded; + + if (header) + { + strcpyW(ptr, header); + ptr += strlenW(ptr); + strcpyW(ptr, sep); + ptr += strlenW(sep); + } + encodeBase64W(pbBinary, cbBinary, sep, ptr, &size); + ptr += size - 1; + if (trailer) + { + strcpyW(ptr, trailer); + ptr += strlenW(ptr); + strcpyW(ptr, sep); + } + *pcchString = charsNeeded - 1; } - encodeBase64W(pbBinary, cbBinary, sep, ptr, &size); - ptr += size - 1; - if (trailer) + else { - strcpyW(ptr, trailer); - ptr += strlenW(ptr); - strcpyW(ptr, sep); + *pcchString = charsNeeded; + SetLastError(ERROR_INSUFFICIENT_BUFFER); + ret = FALSE; } - *pcchString = charsNeeded - 1; - } - else if (pszString) - { - *pcchString = charsNeeded; - SetLastError(ERROR_INSUFFICIENT_BUFFER); - ret = FALSE; } else *pcchString = charsNeeded; + return ret; } diff --git a/dlls/crypt32/tests/base64.c b/dlls/crypt32/tests/base64.c index 7bc1ec7..2249e1b 100644 --- a/dlls/crypt32/tests/base64.c +++ b/dlls/crypt32/tests/base64.c @@ -96,60 +96,113 @@ static WCHAR *strdupAtoW(const char *str) static void encodeAndCompareBase64_A(const BYTE *toEncode, DWORD toEncodeLen, DWORD format, const char *expected, const char *header, const char *trailer) { - DWORD strLen = 0; + DWORD strLen, strLen2; + const char *ptr; LPSTR str = NULL; BOOL ret; + strLen = 0; ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, NULL, &strLen); ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); - str = HeapAlloc(GetProcessHeap(), 0, strLen); - if (str) - { - DWORD strLen2 = strLen; - LPCSTR ptr = str; + ok(strLen > 0, "Unexpected required length.\n"); - ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, str, - &strLen2); - ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); - ok(strLen2 == strLen - 1, "Expected length %d, got %d\n", - strLen - 1, strLen); - if (header) - { - ok(!strncmp(header, ptr, strlen(header)), - "Expected header %s, got %s\n", header, ptr); - ptr += strlen(header); - } - ok(!strncmp(expected, ptr, strlen(expected)), - "Expected %s, got %s\n", expected, ptr); - ptr += strlen(expected); - if (trailer) - ok(!strncmp(trailer, ptr, strlen(trailer)), - "Expected trailer %s, got %s\n", trailer, ptr); - HeapFree(GetProcessHeap(), 0, str); + strLen2 = strLen; + ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, NULL, &strLen2); + ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); + ok(strLen == strLen2, "Unexpected required length.\n"); + + strLen2 = strLen - 1; + ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, NULL, &strLen2); + ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); + ok(strLen == strLen2, "Unexpected required length.\n"); + + str = heap_alloc(strLen); + + /* Partially filled output buffer. */ + strLen2 = strLen - 1; + str[0] = 0x12; + ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, str, &strLen2); +todo_wine + ok((!ret && GetLastError() == ERROR_MORE_DATA) || broken(ret) /* XP */, "CryptBinaryToStringA failed %d, error %d.\n", + ret, GetLastError()); + ok(strLen2 == strLen || broken(strLen2 == strLen - 1), "Expected length %d, got %d\n", strLen - 1, strLen); +todo_wine { + if (header) + ok(str[0] == header[0], "Unexpected buffer contents %#x.\n", str[0]); + else + ok(str[0] == expected[0], "Unexpected buffer contents %#x.\n", str[0]); +} + strLen2 = strLen; + ret = CryptBinaryToStringA(toEncode, toEncodeLen, format, str, &strLen2); + ok(ret, "CryptBinaryToStringA failed: %d\n", GetLastError()); + ok(strLen2 == strLen - 1, "Expected length %d, got %d\n", strLen - 1, strLen); + + ptr = str; + if (header) + { + ok(!strncmp(header, ptr, strlen(header)), "Expected header %s, got %s\n", header, ptr); + ptr += strlen(header); } + ok(!strncmp(expected, ptr, strlen(expected)), "Expected %s, got %s\n", expected, ptr); + ptr += strlen(expected); + if (trailer) + ok(!strncmp(trailer, ptr, strlen(trailer)), "Expected trailer %s, got %s\n", trailer, ptr); + + heap_free(str); } static void encode_compare_base64_W(const BYTE *toEncode, DWORD toEncodeLen, DWORD format, const WCHAR *expected, const char *header, const char *trailer) { WCHAR *headerW, *trailerW; - DWORD strLen = 0, strLen2; + DWORD strLen, strLen2; + WCHAR *strW = NULL; const WCHAR *ptr; - WCHAR *strW; BOOL ret; + strLen = 0; ret = CryptBinaryToStringW(toEncode, toEncodeLen, format, NULL, &strLen); ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); + ok(strLen > 0, "Unexpected required length.\n"); + /* Same call with non-zero length value. */ strLen2 = strLen; - strW = heap_alloc(strLen * sizeof(WCHAR)); - ret = CryptBinaryToStringW(toEncode, toEncodeLen, format, strW, &strLen2); + ret = CryptBinaryToStringW(toEncode, toEncodeLen, format, NULL, &strLen2); ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); - ok(strLen2 == strLen - 1, "Expected length %d, got %d\n", strLen - 1, strLen); + ok(strLen == strLen2, "Unexpected required length.\n"); + + strLen2 = strLen - 1; + ret = CryptBinaryToStringW(toEncode, toEncodeLen, format, NULL, &strLen2); + ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); + ok(strLen == strLen2, "Unexpected required length.\n"); + + strLen2 = strLen - 1; + ret = CryptBinaryToStringW(toEncode, toEncodeLen, format, NULL, &strLen2); + ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); + ok(strLen == strLen2, "Unexpected required length.\n"); + + strW = heap_alloc(strLen * sizeof(WCHAR)); headerW = strdupAtoW(header); trailerW = strdupAtoW(trailer); + strLen2 = strLen - 1; + strW[0] = 0x1234; + ret = CryptBinaryToStringW(toEncode, toEncodeLen, format, strW, &strLen2); +todo_wine + ok((!ret && GetLastError() == ERROR_MORE_DATA) || broken(ret) /* XP */, "CryptBinaryToStringW failed, %d, error %d\n", + ret, GetLastError()); + if (headerW) + ok(strW[0] == 0x1234, "Unexpected buffer contents %#x.\n", strW[0]); + else + ok(strW[0] == 0x1234 || broken(strW[0] != 0x1234) /* XP */, "Unexpected buffer contents %#x.\n", strW[0]); + + strLen2 = strLen; + ret = CryptBinaryToStringW(toEncode, toEncodeLen, format, strW, &strLen2); + ok(ret, "CryptBinaryToStringW failed: %d\n", GetLastError()); + + ok(strLen2 == strLen - 1, "Expected length %d, got %d\n", strLen - 1, strLen); + ptr = strW; if (headerW) {
1
0
0
0
Austin English : winscard: Add SCardCancel stub.
by Alexandre Julliard
26 Sep '18
26 Sep '18
Module: wine Branch: master Commit: eb68dc963325607dc38d469ff637babaf58676f1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eb68dc963325607dc38d469f…
Author: Austin English <austinenglish(a)gmail.com> Date: Tue Sep 25 15:46:46 2018 -0500 winscard: Add SCardCancel stub. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=45880
Signed-off-by: Austin English <austinenglish(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winscard/winscard.c | 7 +++++++ dlls/winscard/winscard.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/winscard/winscard.c b/dlls/winscard/winscard.c index a8a1735..91fdfd3 100644 --- a/dlls/winscard/winscard.c +++ b/dlls/winscard/winscard.c @@ -141,3 +141,10 @@ LONG WINAPI SCardListReadersW(SCARDCONTEXT context, const WCHAR *groups, WCHAR * FIXME("(%lx, %s, %p, %p) stub\n", context, debugstr_w(groups), readers, buflen); return SCARD_E_NO_READERS_AVAILABLE; } + +LONG WINAPI SCardCancel(SCARDCONTEXT context) +{ + FIXME("(%lx) stub\n", context); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return SCARD_F_INTERNAL_ERROR; +} diff --git a/dlls/winscard/winscard.spec b/dlls/winscard/winscard.spec index d2ae62a..037d3be 100644 --- a/dlls/winscard/winscard.spec +++ b/dlls/winscard/winscard.spec @@ -6,7 +6,7 @@ @ stdcall SCardAddReaderToGroupA(long str str) @ stdcall SCardAddReaderToGroupW(long wstr wstr) @ stub SCardBeginTransaction -@ stub SCardCancel +@ stdcall SCardCancel(long) @ stub SCardConnectA @ stub SCardConnectW @ stub SCardControl
1
0
0
0
Hans Leidekker : msi: Allow recursive changes to the target folder path.
by Alexandre Julliard
26 Sep '18
26 Sep '18
Module: wine Branch: master Commit: 7bf2a1b2099b534fd4472962d2e945bc9ab9e2b8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7bf2a1b2099b534fd4472962…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Sep 26 15:17:19 2018 +0200 msi: Allow recursive changes to the target folder path. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/action.c | 10 +++------- dlls/msi/tests/msi.c | 24 ++++++++---------------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index af86761..0d6da3e 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -2394,15 +2394,11 @@ void msi_resolve_target_folder( MSIPACKAGE *package, const WCHAR *name, BOOL loa else path = msi_build_directory_name( 2, folder->TargetDefault, NULL ); } + normalized_path = msi_normalize_path( path ); - msi_free( path ); - if (folder->ResolvedTarget && !strcmpiW( normalized_path, folder->ResolvedTarget )) - { - TRACE("%s already resolved to %s\n", debugstr_w(name), debugstr_w(folder->ResolvedTarget)); - msi_free( normalized_path ); - return; - } msi_set_property( package->db, folder->Directory, normalized_path, -1 ); + msi_free( path ); + msi_free( folder->ResolvedTarget ); folder->ResolvedTarget = normalized_path; diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c index 842ed11..015cd65 100644 --- a/dlls/msi/tests/msi.c +++ b/dlls/msi/tests/msi.c @@ -336,16 +336,18 @@ static const char spf_custom_action_dat[] = "Action\tType\tSource\tTarget\tISComments\n" "s72\ti2\tS64\tS0\tS255\n" "CustomAction\tAction\n" - "SetFolderProp\t51\tMSITESTDIR\t[ProgramFilesFolder]\\msitest\\added\t\n"; + "SetFolderProp\t51\tMSITESTDIR\t[ProgramFilesFolder]\\msitest\\added\t\n" + "SetFolderProp2\t51\tMSITESTDIR\t[ProgramFilesFolder]\\msitest\\added\\added2\t\n"; static const char spf_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" "s72\tS255\tI2\n" "InstallExecuteSequence\tAction\n" - "CostFinalize\t\t1000\n" "CostInitialize\t\t800\n" "FileCost\t\t900\n" "SetFolderProp\t\t950\n" + "SetFolderProp2\t\t960\n" + "CostFinalize\t\t1000\n" "InstallFiles\t\t4000\n" "InstallServices\t\t5000\n" "InstallFinalize\t\t6600\n" @@ -14095,7 +14097,6 @@ static void test_setpropertyfolder(void) { UINT r; CHAR path[MAX_PATH]; - DWORD attr; if (is_process_limited()) { @@ -14120,19 +14121,10 @@ static void test_setpropertyfolder(void) goto error; } ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - attr = GetFileAttributesA(path); - if (attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_DIRECTORY)) - { - ok(delete_pf("msitest\\added\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest\\added", FALSE), "Directory not created\n"); - ok(delete_pf("msitest", FALSE), "Directory not created\n"); - } - else - { - trace("changing folder property not supported\n"); - ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); - ok(delete_pf("msitest", FALSE), "Directory not created\n"); - } + ok(delete_pf("msitest\\added\\added2\\maximus", TRUE), "File not installed\n"); + ok(delete_pf("msitest\\added\\added2", FALSE), "Directory not created\n"); + ok(delete_pf("msitest\\added", FALSE), "Directory not created\n"); + ok(delete_pf("msitest", FALSE), "Directory not created\n"); error: DeleteFileA(msifile);
1
0
0
0
Hans Leidekker : msi/tests: Drop workarounds for Windows 2000.
by Alexandre Julliard
26 Sep '18
26 Sep '18
Module: wine Branch: master Commit: 6a3e79b00225a1186a01101cd5614141748e6a53 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6a3e79b00225a1186a01101c…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Sep 26 15:17:18 2018 +0200 msi/tests: Drop workarounds for Windows 2000. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/tests/Makefile.in | 2 +- dlls/msi/tests/action.c | 14 +++---------- dlls/msi/tests/automation.c | 10 ++------- dlls/msi/tests/install.c | 6 +----- dlls/msi/tests/msi.c | 51 +++++++++++++++++++-------------------------- dlls/msi/tests/package.c | 45 +++++++++------------------------------ dlls/msi/tests/patch.c | 7 +------ dlls/msi/tests/source.c | 25 +++------------------- 8 files changed, 42 insertions(+), 118 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=6a3e79b00225a1186a01…
1
0
0
0
Zebediah Figura : quartz/filtergraph: Check for AM_FILTER_MISC_FLAGS_IS_RENDERER or IMediaSeeking to count renderers.
by Alexandre Julliard
26 Sep '18
26 Sep '18
Module: wine Branch: master Commit: 783c2d66a41021d6c01c6bdf2440ab256f073db6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=783c2d66a41021d6c01c6bdf…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Sep 25 23:30:23 2018 -0500 quartz/filtergraph: Check for AM_FILTER_MISC_FLAGS_IS_RENDERER or IMediaSeeking to count renderers. Instead of using IPin_QueryInternalConnections(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filtergraph.c | 49 +++++++++++++++++++++++++++++++++++------ dlls/quartz/tests/filtergraph.c | 5 ----- 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 4dfe5c0..c859564 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -2084,8 +2084,34 @@ static HRESULT WINAPI MediaControl_Invoke(IMediaControl *iface, DISPID dispIdMem typedef HRESULT(WINAPI *fnFoundFilter)(IBaseFilter *, DWORD_PTR data); +static BOOL has_output_pins(IBaseFilter *filter) +{ + IEnumPins *enumpins; + PIN_DIRECTION dir; + IPin *pin; + + if (FAILED(IBaseFilter_EnumPins(filter, &enumpins))) + return FALSE; + + while (IEnumPins_Next(enumpins, 1, &pin, NULL) == S_OK) + { + IPin_QueryDirection(pin, &dir); + IPin_Release(pin); + if (dir == PINDIR_OUTPUT) + { + IEnumPins_Release(enumpins); + return TRUE; + } + } + + IEnumPins_Release(enumpins); + return FALSE; +} + static HRESULT ExploreGraph(IFilterGraphImpl* pGraph, IPin* pOutputPin, fnFoundFilter FoundFilter, DWORD_PTR data) { + IAMFilterMiscFlags *flags; + IMediaSeeking *seeking; HRESULT hr; IPin* pInputPin; IPin** ppPins; @@ -2108,13 +2134,7 @@ static HRESULT ExploreGraph(IFilterGraphImpl* pGraph, IPin* pOutputPin, fnFoundF if (SUCCEEDED(hr)) { - if (nb == 0) - { - TRACE("Reached a renderer\n"); - /* Count renderers for end of stream notification */ - pGraph->nRenderers++; - } - else + if (nb) { for(i = 0; i < nb; i++) { @@ -2129,6 +2149,21 @@ static HRESULT ExploreGraph(IFilterGraphImpl* pGraph, IPin* pOutputPin, fnFoundF } TRACE("Doing stuff with filter %p\n", PinInfo.pFilter); + if (SUCCEEDED(IBaseFilter_QueryInterface(PinInfo.pFilter, + &IID_IAMFilterMiscFlags, (void **)&flags))) + { + if (IAMFilterMiscFlags_GetMiscFlags(flags) & AM_FILTER_MISC_FLAGS_IS_RENDERER) + pGraph->nRenderers++; + IAMFilterMiscFlags_Release(flags); + } + else if (SUCCEEDED(IBaseFilter_QueryInterface(PinInfo.pFilter, + &IID_IMediaSeeking, (void **)&seeking))) + { + if (!has_output_pins(PinInfo.pFilter)) + pGraph->nRenderers++; + IMediaSeeking_Release(seeking); + } + FoundFilter(PinInfo.pFilter, data); } diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 1345e41..74a3b68 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -3080,10 +3080,8 @@ static void test_ec_complete(void) ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IMediaEvent_GetEvent(eventsrc, &code, ¶m1, ¶m2, 0); -todo_wine { ok(hr == S_OK, "Got hr %#x.\n", hr); ok(code == EC_COMPLETE, "Got code %#x.\n", code); -} ok(param1 == S_OK, "Got param1 %#lx.\n", param1); ok(!param2, "Got param2 %#lx.\n", param2); hr = IMediaEvent_FreeEventParams(eventsrc, code, param1, param2); @@ -3096,7 +3094,6 @@ todo_wine { ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IMediaEvent_GetEvent(eventsrc, &code, ¶m1, ¶m2, 50); -todo_wine ok(hr == E_ABORT, "Got hr %#x.\n", hr); IMediaControl_Stop(control); @@ -3156,7 +3153,6 @@ todo_wine IFilterGraph2_ConnectDirect(graph, &source_pins[0].IPin_iface, &filter1_pin.IPin_iface, NULL); hr = check_ec_complete(graph, &filter1.IBaseFilter_iface); -todo_wine ok(hr == E_ABORT, "Got hr %#x.\n", hr); IFilterGraph2_RemoveFilter(graph, &filter1.IBaseFilter_iface); @@ -3185,7 +3181,6 @@ todo_wine IFilterGraph2_ConnectDirect(graph, &source_pins[0].IPin_iface, &filter1_pin.IPin_iface, NULL); hr = check_ec_complete(graph, &filter1.IBaseFilter_iface); -todo_wine ok(hr == E_ABORT, "Got hr %#x.\n", hr); IMediaControl_Release(control);
1
0
0
0
Zebediah Figura : quartz/tests/filtergraph: Add some tests for EC_COMPLETE.
by Alexandre Julliard
26 Sep '18
26 Sep '18
Module: wine Branch: master Commit: d65586ea95625a7d367c767c6bd088375b622021 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d65586ea95625a7d367c767c…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Sep 25 23:30:22 2018 -0500 quartz/tests/filtergraph: Add some tests for EC_COMPLETE. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/filtergraph.c | 430 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 430 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=d65586ea95625a7d367c…
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
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