Commit 08d81534 authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard

netprofm: Create a connection point object for INetworkEvents.

parent feb4236e
......@@ -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 );
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment