1
0
mirror of https://github.com/wine-mirror/wine synced 2024-06-29 06:14:34 +00:00

netprofm: Use the correct symbols for error codes.

This commit is contained in:
Alexandre Julliard 2024-03-19 09:56:48 +01:00
parent 9e639ff1f6
commit 5cf558935d
2 changed files with 7 additions and 6 deletions

View File

@ -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(

View File

@ -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 );