mpr: Implement WNetCancelConnection2W().

Signed-off-by: Pierre Schweitzer <pierre@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Pierre Schweitzer 2016-08-02 13:21:22 +02:00 committed by Alexandre Julliard
parent 7e50116b52
commit 0b34924bd8
1 changed files with 22 additions and 2 deletions

View File

@ -58,6 +58,7 @@ typedef struct _WNetProvider
PF_NPGetResourceInformation getResourceInformation;
PF_NPAddConnection addConnection;
PF_NPAddConnection3 addConnection3;
PF_NPCancelConnection cancelConnection;
} WNetProvider, *PWNetProvider;
typedef struct _WNetProviderTable
@ -206,8 +207,10 @@ static void _tryLoadProvider(PCWSTR provider)
}
provider->addConnection = MPR_GETPROC(NPAddConnection);
provider->addConnection3 = MPR_GETPROC(NPAddConnection3);
provider->cancelConnection = MPR_GETPROC(NPCancelConnection);
TRACE("NPAddConnection %p\n", provider->addConnection);
TRACE("NPAddConnection3 %p\n", provider->addConnection3);
TRACE("NPCancelConnection %p\n", provider->cancelConnection);
providerTable->numProviders++;
}
else
@ -1865,9 +1868,26 @@ DWORD WINAPI WNetCancelConnection2A( LPCSTR lpName, DWORD dwFlags, BOOL fForce )
*/
DWORD WINAPI WNetCancelConnection2W( LPCWSTR lpName, DWORD dwFlags, BOOL fForce )
{
FIXME( "(%s, %08X, %d), stub\n", debugstr_w(lpName), dwFlags, fForce );
DWORD ret = WN_NO_NETWORK;
DWORD index;
return WN_SUCCESS;
if (providerTable != NULL)
{
for (index = 0; index < providerTable->numProviders; index++)
{
if(providerTable->table[index].getCaps(WNNC_CONNECTION) &
WNNC_CON_CANCELCONNECTION)
{
if (providerTable->table[index].cancelConnection)
ret = providerTable->table[index].cancelConnection((LPWSTR)lpName, fForce);
else
ret = WN_NO_NETWORK;
if (ret == WN_SUCCESS || ret == WN_OPEN_FILES)
break;
}
}
}
return ret;
}
/*****************************************************************