Gijs Vermeulen : netprofm: Create a connection point object for INetworkEvents.
Alexandre Julliard
julliard at winehq.org
Tue Nov 3 15:55:55 CST 2020
Module: wine
Branch: master
Commit: 08d815346c9bdd29df0930b4976fd7d9885a77a1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=08d815346c9bdd29df0930b4976fd7d9885a77a1
Author: Gijs Vermeulen <gijsvrm at gmail.com>
Date: Tue Nov 3 18:32:34 2020 +0100
netprofm: Create a connection point object for INetworkEvents.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50054
Signed-off-by: Gijs Vermeulen <gijsvrm at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/netprofm/list.c | 6 ++++++
dlls/netprofm/tests/list.c | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/dlls/netprofm/list.c b/dlls/netprofm/list.c
index def2aa6cf67..f9b9e2ea312 100644
--- a/dlls/netprofm/list.c
+++ b/dlls/netprofm/list.c
@@ -84,6 +84,7 @@ struct list_manager
struct connection_point list_mgr_cp;
struct connection_point cost_mgr_cp;
struct connection_point conn_mgr_cp;
+ struct connection_point events_cp;
};
struct sink_entry
@@ -1110,6 +1111,7 @@ static ULONG WINAPI list_manager_Release(
TRACE( "destroying %p\n", mgr );
+ connection_point_release( &mgr->events_cp );
connection_point_release( &mgr->conn_mgr_cp );
connection_point_release( &mgr->cost_mgr_cp );
connection_point_release( &mgr->list_mgr_cp );
@@ -1394,6 +1396,8 @@ static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPo
ret = &This->cost_mgr_cp;
else if (IsEqualGUID( riid, &IID_INetworkConnectionEvents ))
ret = &This->conn_mgr_cp;
+ else if (IsEqualGUID( riid, &IID_INetworkEvents))
+ ret = &This->events_cp;
else
{
FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
@@ -1784,6 +1788,8 @@ HRESULT list_manager_create( void **obj )
&mgr->IConnectionPointContainer_iface);
connection_point_init( &mgr->conn_mgr_cp, &IID_INetworkConnectionEvents,
&mgr->IConnectionPointContainer_iface );
+ connection_point_init( &mgr->events_cp, &IID_INetworkEvents,
+ &mgr->IConnectionPointContainer_iface );
*obj = &mgr->INetworkListManager_iface;
TRACE( "returning iface %p\n", *obj );
diff --git a/dlls/netprofm/tests/list.c b/dlls/netprofm/tests/list.c
index 0a1f854c00b..ff7755162cc 100644
--- a/dlls/netprofm/tests/list.c
+++ b/dlls/netprofm/tests/list.c
@@ -331,6 +331,10 @@ static void test_INetworkListManager( void )
hr = IConnectionPointContainer_FindConnectionPoint( cpc, &IID_INetworkConnectionEvents, &pt );
ok( hr == S_OK || hr == CO_E_FAILEDTOIMPERSONATE, "got %08x\n", hr );
if (hr == S_OK) IConnectionPoint_Release( pt );
+
+ hr = IConnectionPointContainer_FindConnectionPoint( cpc, &IID_INetworkEvents, &pt );
+ ok( hr == S_OK, "got %08x\n", hr );
+ IConnectionPoint_Release( pt );
IConnectionPointContainer_Release( cpc );
network_iter = NULL;
More information about the wine-cvs
mailing list