From 5cf558935d38aaffc1773201d804189a81163e3a Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 19 Mar 2024 09:56:48 +0100 Subject: [PATCH] netprofm: Use the correct symbols for error codes. --- dlls/netprofm/list.c | 4 ++-- dlls/netprofm/tests/list.c | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/netprofm/list.c b/dlls/netprofm/list.c index 31534c7f4b9..af40dc0ac91 100644 --- a/dlls/netprofm/list.c +++ b/dlls/netprofm/list.c @@ -194,7 +194,7 @@ static HRESULT WINAPI connection_point_Advise( if (FAILED(hr)) { WARN( "iface %s not implemented by sink\n", debugstr_guid(&cp->iid) ); - return CO_E_FAILEDTOOPENTHREADTOKEN; + return CONNECT_E_CANNOTCONNECT; } sink_entry = malloc( sizeof(*sink_entry) ); @@ -234,7 +234,7 @@ static HRESULT WINAPI connection_point_Unadvise( } WARN( "invalid cookie\n" ); - return OLE_E_NOCONNECTION; + return CONNECT_E_NOCONNECTION; } static HRESULT WINAPI connection_point_EnumConnections( diff --git a/dlls/netprofm/tests/list.c b/dlls/netprofm/tests/list.c index 4c0c87cab8b..12a54477f66 100644 --- a/dlls/netprofm/tests/list.c +++ b/dlls/netprofm/tests/list.c @@ -22,6 +22,7 @@ #include "initguid.h" #include "objbase.h" #include "ocidl.h" +#include "olectl.h" #include "netlistmgr.h" #include "wine/test.h" @@ -348,13 +349,13 @@ static void test_INetworkListManager( void ) "Expected iid to be IID_INetworkListManagerEvents\n" ); hr = IConnectionPoint_Advise( pt, (IUnknown*)&mgr_sink_unk, &cookie); - ok( hr == CO_E_FAILEDTOOPENTHREADTOKEN, "Advise failed: %08lx\n", hr ); + ok( hr == CONNECT_E_CANNOTCONNECT, "Advise failed: %08lx\n", hr ); hr = IConnectionPoint_Advise( pt, (IUnknown*)&mgr_sink, &cookie); ok( hr == S_OK, "Advise failed: %08lx\n", hr ); hr = IConnectionPoint_Unadvise( pt, 0xdeadbeef ); - ok( hr == OLE_E_NOCONNECTION || hr == CO_E_FAILEDTOIMPERSONATE, "Unadvise failed: %08lx\n", hr ); + ok( hr == OLE_E_NOCONNECTION || hr == CONNECT_E_NOCONNECTION, "Unadvise failed: %08lx\n", hr ); hr = IConnectionPoint_Unadvise( pt, cookie ); ok( hr == S_OK, "Unadvise failed: %08lx\n", hr ); @@ -365,11 +366,11 @@ static void test_INetworkListManager( void ) IConnectionPoint_Release( pt2 ); hr = IConnectionPointContainer_FindConnectionPoint( cpc, &IID_INetworkCostManagerEvents, &pt ); - ok( hr == S_OK || hr == CO_E_FAILEDTOIMPERSONATE, "got %08lx\n", hr ); + ok( hr == S_OK || hr == CONNECT_E_NOCONNECTION, "got %08lx\n", hr ); if (hr == S_OK) IConnectionPoint_Release( pt ); hr = IConnectionPointContainer_FindConnectionPoint( cpc, &IID_INetworkConnectionEvents, &pt ); - ok( hr == S_OK || hr == CO_E_FAILEDTOIMPERSONATE, "got %08lx\n", hr ); + ok( hr == S_OK || hr == CONNECT_E_NOCONNECTION, "got %08lx\n", hr ); if (hr == S_OK) IConnectionPoint_Release( pt ); hr = IConnectionPointContainer_FindConnectionPoint( cpc, &IID_INetworkEvents, &pt );