Commit 0b34924b authored by Pierre Schweitzer's avatar Pierre Schweitzer Committed by Alexandre Julliard

mpr: Implement WNetCancelConnection2W().

parent 7e50116b
......@@ -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;
}
/*****************************************************************
......
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