From db326ba2426b572b1a5af3af50e42b669d9934d0 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 25 Mar 2015 17:19:51 +0100 Subject: [PATCH] Removed patch for IConnectionPoint/INetworkListManagerEvents stub interface (accepted upstream). --- README.md | 2 +- debian/changelog | 1 + ...d-stubbed-IConnectionPoint-interface.patch | 249 ------------------ ...dd-tests-for-ConnectionPointContaine.patch | 66 ----- patches/netprofm-IConnectionPoint/definition | 1 - patches/patchinstall.sh | 21 -- 6 files changed, 2 insertions(+), 338 deletions(-) delete mode 100644 patches/netprofm-IConnectionPoint/0001-netprofm-Add-stubbed-IConnectionPoint-interface.patch delete mode 100644 patches/netprofm-IConnectionPoint/0002-netprofm-tests-Add-tests-for-ConnectionPointContaine.patch delete mode 100644 patches/netprofm-IConnectionPoint/definition diff --git a/README.md b/README.md index 26015d92..dd18852a 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ Included bug fixes and improvements * Basic support for CUDA * Black & White needs DXTn software decoding support ([Wine Bug #14939](https://bugs.winehq.org/show_bug.cgi?id=14939)) * CPU-Z fails to start because GetLogicalProcessorInformationEx returns FALSE -* Child of Light expects FindConnectionPoint to succeed and increase the refcount ([Wine Bug #36408](https://bugs.winehq.org/show_bug.cgi?id=36408)) +* ~~Child of Light expects FindConnectionPoint to succeed and increase the refcount~~ ([Wine Bug #36408](https://bugs.winehq.org/show_bug.cgi?id=36408)) * CreateProcess does not prioritize the working directory over the system search path ([Wine Bug #23934](https://bugs.winehq.org/show_bug.cgi?id=23934)) * D3DCompileShader should filter specific warning messages ([Wine Bug #33770](https://bugs.winehq.org/show_bug.cgi?id=33770)) * Do not append duplicate NULL characters when importing keys with regedit ([Wine Bug #37575](https://bugs.winehq.org/show_bug.cgi?id=37575)) diff --git a/debian/changelog b/debian/changelog index bc4c4bbe..000edaa4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ wine-staging (1.7.40) UNRELEASED; urgency=low * Update dsound fast mixer patchset to use integer math. * Removed patch to fix regression causing black screen on startup (accepted upstream). * Removed patch to fix edge cases in TOOLTIPS_GetTipText (fixed upstream). + * Removed patch for IConnectionPoint/INetworkListManagerEvents stub interface (accepted upstream). -- Sebastian Lackner Mon, 23 Mar 2015 16:12:20 +0100 wine-staging (1.7.39) unstable; urgency=low diff --git a/patches/netprofm-IConnectionPoint/0001-netprofm-Add-stubbed-IConnectionPoint-interface.patch b/patches/netprofm-IConnectionPoint/0001-netprofm-Add-stubbed-IConnectionPoint-interface.patch deleted file mode 100644 index d1e7ad4e..00000000 --- a/patches/netprofm-IConnectionPoint/0001-netprofm-Add-stubbed-IConnectionPoint-interface.patch +++ /dev/null @@ -1,249 +0,0 @@ -From efe0158f2a25a1e709a62fb1ce5eff95389ca642 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Wed, 25 Mar 2015 11:55:13 +0100 -Subject: netprofm: Add stubbed IConnectionPoint interface. - ---- - dlls/netprofm/list.c | 170 ++++++++++++++++++++++++++++++++++++++++++++++++- - include/netlistmgr.idl | 13 ++++ - 2 files changed, 181 insertions(+), 2 deletions(-) - -diff --git a/dlls/netprofm/list.c b/dlls/netprofm/list.c -index b9ab1cc..783b9cd 100644 ---- a/dlls/netprofm/list.c -+++ b/dlls/netprofm/list.c -@@ -1,5 +1,6 @@ - /* - * Copyright 2014 Hans Leidekker for CodeWeavers -+ * Copyright 2015 Michael Müller - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -26,6 +27,7 @@ - #include "objbase.h" - #include "ocidl.h" - #include "netlistmgr.h" -+#include "olectl.h" - - #include "wine/debug.h" - #include "netprofm_private.h" -@@ -40,6 +42,14 @@ struct list_manager - LONG refs; - }; - -+struct connection_point -+{ -+ IConnectionPoint IConnectionPoint_iface; -+ IConnectionPointContainer *container; -+ LONG refs; -+ IID iid; -+}; -+ - static inline struct list_manager *impl_from_IConnectionPointContainer(IConnectionPointContainer *iface) - { - return CONTAINING_RECORD(iface, struct list_manager, IConnectionPointContainer_iface); -@@ -51,6 +61,151 @@ static inline struct list_manager *impl_from_INetworkCostManager( - return CONTAINING_RECORD( iface, struct list_manager, INetworkCostManager_iface ); - } - -+static inline struct connection_point *impl_from_IConnectionPoint( -+ IConnectionPoint *iface ) -+{ -+ return CONTAINING_RECORD( iface, struct connection_point, IConnectionPoint_iface ); -+} -+ -+static HRESULT WINAPI connection_point_QueryInterface( -+ IConnectionPoint *iface, -+ REFIID riid, -+ void **obj ) -+{ -+ struct connection_point *cp = impl_from_IConnectionPoint( iface ); -+ TRACE( "%p, %s, %p\n", cp, debugstr_guid(riid), obj ); -+ -+ if (IsEqualGUID( riid, &IID_IConnectionPoint ) || -+ IsEqualGUID( riid, &IID_IUnknown )) -+ { -+ *obj = iface; -+ } -+ else -+ { -+ FIXME( "interface %s not implemented\n", debugstr_guid(riid) ); -+ return E_NOINTERFACE; -+ } -+ IConnectionPoint_AddRef( iface ); -+ return S_OK; -+} -+ -+static ULONG WINAPI connection_point_AddRef( -+ IConnectionPoint *iface ) -+{ -+ struct connection_point *cp = impl_from_IConnectionPoint( iface ); -+ return InterlockedIncrement( &cp->refs ); -+} -+ -+static ULONG WINAPI connection_point_Release( -+ IConnectionPoint *iface ) -+{ -+ struct connection_point *cp = impl_from_IConnectionPoint( iface ); -+ LONG refs = InterlockedDecrement( &cp->refs ); -+ if (!refs) -+ { -+ TRACE( "destroying %p\n", cp ); -+ IConnectionPointContainer_Release( cp->container ); -+ HeapFree( GetProcessHeap(), 0, cp ); -+ } -+ return refs; -+} -+ -+static HRESULT WINAPI connection_point_GetConnectionInterface( -+ IConnectionPoint *iface, -+ IID *iid ) -+{ -+ struct connection_point *cp = impl_from_IConnectionPoint( iface ); -+ TRACE( "%p, %p\n", cp, iid ); -+ -+ if (!iid) -+ return E_POINTER; -+ -+ memcpy( iid, &cp->iid, sizeof(*iid) ); -+ return S_OK; -+} -+ -+static HRESULT WINAPI connection_point_GetConnectionPointContainer( -+ IConnectionPoint *iface, -+ IConnectionPointContainer **container ) -+{ -+ struct connection_point *cp = impl_from_IConnectionPoint( iface ); -+ TRACE( "%p, %p\n", cp, container ); -+ -+ if (!container) -+ return E_POINTER; -+ -+ IConnectionPointContainer_AddRef( cp->container ); -+ *container = cp->container; -+ return S_OK; -+} -+ -+static HRESULT WINAPI connection_point_Advise( -+ IConnectionPoint *iface, -+ IUnknown *sink, -+ DWORD *cookie ) -+{ -+ struct connection_point *cp = impl_from_IConnectionPoint( iface ); -+ FIXME( "%p, %p, %p - stub\n", cp, sink, cookie ); -+ -+ if (!sink || !cookie) -+ return E_POINTER; -+ -+ return CONNECT_E_CANNOTCONNECT; -+} -+ -+static HRESULT WINAPI connection_point_Unadvise( -+ IConnectionPoint *iface, -+ DWORD cookie ) -+{ -+ struct connection_point *cp = impl_from_IConnectionPoint( iface ); -+ FIXME( "%p, %d - stub\n", cp, cookie ); -+ -+ return E_POINTER; -+} -+ -+static HRESULT WINAPI connection_point_EnumConnections( -+ IConnectionPoint *iface, -+ IEnumConnections **connections ) -+{ -+ struct connection_point *cp = impl_from_IConnectionPoint( iface ); -+ FIXME( "%p, %p - stub\n", cp, connections ); -+ -+ return E_NOTIMPL; -+} -+ -+static const IConnectionPointVtbl connection_point_vtbl = -+{ -+ connection_point_QueryInterface, -+ connection_point_AddRef, -+ connection_point_Release, -+ connection_point_GetConnectionInterface, -+ connection_point_GetConnectionPointContainer, -+ connection_point_Advise, -+ connection_point_Unadvise, -+ connection_point_EnumConnections -+}; -+ -+static HRESULT connection_point_create( -+ IConnectionPoint **obj, -+ REFIID riid, -+ IConnectionPointContainer *container ) -+{ -+ struct connection_point *cp; -+ TRACE( "%p, %s, %p\n", obj, debugstr_guid(riid), container ); -+ -+ if (!(cp = HeapAlloc( GetProcessHeap(), 0, sizeof(*cp) ))) return E_OUTOFMEMORY; -+ cp->IConnectionPoint_iface.lpVtbl = &connection_point_vtbl; -+ cp->container = container; -+ cp->refs = 1; -+ -+ memcpy( &cp->iid, riid, sizeof(*riid) ); -+ IConnectionPointContainer_AddRef( container ); -+ -+ *obj = &cp->IConnectionPoint_iface; -+ TRACE( "returning iface %p\n", *obj ); -+ return S_OK; -+} -+ - static HRESULT WINAPI cost_manager_QueryInterface( - INetworkCostManager *iface, - REFIID riid, -@@ -328,8 +483,19 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo - REFIID riid, IConnectionPoint **cp) - { - struct list_manager *This = impl_from_IConnectionPointContainer( iface ); -- FIXME("(%p)->(%s %p): stub\n", This, debugstr_guid(riid), cp); -- return E_NOTIMPL; -+ -+ TRACE( "%p, %s, %p\n", This, debugstr_guid(riid), cp ); -+ -+ if (!riid || !cp) -+ return E_POINTER; -+ -+ if (IsEqualGUID( riid, &IID_INetworkListManagerEvents )) -+ return connection_point_create( cp, riid, iface ); -+ -+ FIXME( "interface %s not implemented\n", debugstr_guid(riid) ); -+ -+ *cp = NULL; -+ return E_NOINTERFACE; - } - - static const struct IConnectionPointContainerVtbl cpc_vtbl = -diff --git a/include/netlistmgr.idl b/include/netlistmgr.idl -index 5be6e28..5d2c811 100644 ---- a/include/netlistmgr.idl -+++ b/include/netlistmgr.idl -@@ -29,6 +29,7 @@ interface INetwork; - interface INetworkConnection; - interface INetworkCostManager; - interface INetworkListManager; -+interface INetworkListManagerEvents; - - typedef [v1_enum] enum NLM_CONNECTIVITY - { -@@ -145,3 +146,15 @@ interface INetworkListManager : IDispatch - uuid(dcb00c01-570f-4a9b-8d69-199fdba5723b) - ] - coclass NetworkListManager { interface INetworkListManager; } -+ -+[ -+ object, -+ oleautomation, -+ pointer_default(unique), -+ uuid(DCB00001-570F-4A9B-8D69-199FDBA5723B) -+] -+interface INetworkListManagerEvents : IUnknown -+{ -+ HRESULT ConnectivityChanged( -+ [in] NLM_CONNECTIVITY newConnectivity); -+} --- -2.3.3 - diff --git a/patches/netprofm-IConnectionPoint/0002-netprofm-tests-Add-tests-for-ConnectionPointContaine.patch b/patches/netprofm-IConnectionPoint/0002-netprofm-tests-Add-tests-for-ConnectionPointContaine.patch deleted file mode 100644 index 7e6c6ef8..00000000 --- a/patches/netprofm-IConnectionPoint/0002-netprofm-tests-Add-tests-for-ConnectionPointContaine.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 5014cecbd562cc9b857da70b3170519c40c77463 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Wed, 25 Mar 2015 12:03:48 +0100 -Subject: netprofm/tests: Add tests for - ConnectionPointContainer::FindConnectionPoint. - ---- - dlls/netprofm/tests/list.c | 28 +++++++++++++++++++++++++++- - 1 file changed, 27 insertions(+), 1 deletion(-) - -diff --git a/dlls/netprofm/tests/list.c b/dlls/netprofm/tests/list.c -index ce4891a..06a8086 100644 ---- a/dlls/netprofm/tests/list.c -+++ b/dlls/netprofm/tests/list.c -@@ -27,12 +27,15 @@ - - static void test_INetworkListManager( void ) - { -- IConnectionPointContainer *cpc; -+ IConnectionPointContainer *cpc, *cpc2; - INetworkListManager *mgr; - INetworkCostManager *cost_mgr; - NLM_CONNECTIVITY connectivity; - VARIANT_BOOL connected; -+ IConnectionPoint *pt; - HRESULT hr; -+ ULONG ref1, ref2; -+ IID iid; - - hr = CoCreateInstance( &CLSID_NetworkListManager, NULL, CLSCTX_INPROC_SERVER, - &IID_INetworkListManager, (void **)&mgr ); -@@ -78,8 +81,31 @@ static void test_INetworkListManager( void ) - - hr = INetworkListManager_QueryInterface( mgr, &IID_IConnectionPointContainer, (void**)&cpc ); - ok( hr == S_OK, "got %08x\n", hr ); -+ -+ ref1 = IConnectionPointContainer_AddRef( cpc ); -+ -+ hr = IConnectionPointContainer_FindConnectionPoint( cpc, &IID_INetworkListManagerEvents, &pt ); -+ ok( hr == S_OK, "got %08x\n", hr ); -+ -+ ref2 = IConnectionPointContainer_AddRef( cpc ); -+ ok( ref2 == ref1 + 2, "Expected refcount %d, got %d\n", ref1 + 2, ref2 ); -+ -+ IConnectionPointContainer_Release( cpc ); - IConnectionPointContainer_Release( cpc ); - -+ hr = IConnectionPoint_GetConnectionPointContainer( pt, &cpc2 ); -+ ok( hr == S_OK, "got %08x\n", hr ); -+ ok( cpc2 == cpc, "Expected cpc2 == %p, but got %p\n", cpc, cpc2 ); -+ IConnectionPointContainer_Release( cpc2 ); -+ -+ memset( &iid, 0, sizeof(iid) ); -+ hr = IConnectionPoint_GetConnectionInterface( pt, &iid ); -+ ok( hr == S_OK, "got %08x\n", hr ); -+ ok( !memcmp( &iid, &IID_INetworkListManagerEvents, sizeof(iid) ), -+ "Expected iid to be IID_INetworkListManagerEvents\n" ); -+ -+ IConnectionPoint_Release( pt ); -+ IConnectionPointContainer_Release( cpc ); - INetworkListManager_Release( mgr ); - } - --- -2.3.3 - diff --git a/patches/netprofm-IConnectionPoint/definition b/patches/netprofm-IConnectionPoint/definition deleted file mode 100644 index 57223bd9..00000000 --- a/patches/netprofm-IConnectionPoint/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [36408] Child of Light expects FindConnectionPoint to succeed and increase the refcount diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index b6eca5aa..d9df9445 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -126,7 +126,6 @@ patch_enable_all () enable_msvcp90_basic_string_wchar_dtor="$1" enable_msvcrt_atof_strtod="$1" enable_msvfw32_Image_Size="$1" - enable_netprofm_IConnectionPoint="$1" enable_ntdll_APC_Performance="$1" enable_ntdll_APC_Start_Process="$1" enable_ntdll_Activation_Context="$1" @@ -435,9 +434,6 @@ patch_enable () msvfw32-Image_Size) enable_msvfw32_Image_Size="$2" ;; - netprofm-IConnectionPoint) - enable_netprofm_IConnectionPoint="$2" - ;; ntdll-APC_Performance) enable_ntdll_APC_Performance="$2" ;; @@ -2841,23 +2837,6 @@ if test "$enable_msvfw32_Image_Size" -eq 1; then ) >> "$patchlist" fi -# Patchset netprofm-IConnectionPoint -# | -# | This patchset fixes the following Wine bugs: -# | * [#36408] Child of Light expects FindConnectionPoint to succeed and increase the refcount -# | -# | Modified files: -# | * dlls/netprofm/list.c, dlls/netprofm/tests/list.c, include/netlistmgr.idl -# | -if test "$enable_netprofm_IConnectionPoint" -eq 1; then - patch_apply netprofm-IConnectionPoint/0001-netprofm-Add-stubbed-IConnectionPoint-interface.patch - patch_apply netprofm-IConnectionPoint/0002-netprofm-tests-Add-tests-for-ConnectionPointContaine.patch - ( - echo '+ { "Michael Müller", "netprofm: Add stubbed IConnectionPoint interface.", 1 },'; - echo '+ { "Michael Müller", "netprofm/tests: Add tests for ConnectionPointContainer::FindConnectionPoint.", 1 },'; - ) >> "$patchlist" -fi - # Patchset ntdll-APC_Performance # | # | Modified files: