Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50054 Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com --- 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;