Author: pschweitzer
Date: Tue Aug 2 09:53:54 2016
New Revision: 72084
URL:
http://svn.reactos.org/svn/reactos?rev=72084&view=rev
Log:
[MPR]
Implement WNetCancelConnection2W()
Already sent upstream.
Patch 3/6
CORE-11757
ROSAPPS-303
Modified:
trunk/reactos/dll/win32/mpr/wnet.c
Modified: trunk/reactos/dll/win32/mpr/wnet.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/wnet.c?rev=7…
==============================================================================
--- trunk/reactos/dll/win32/mpr/wnet.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mpr/wnet.c [iso-8859-1] Tue Aug 2 09:53:54 2016
@@ -48,6 +48,7 @@
PF_NPGetResourceInformation getResourceInformation;
PF_NPAddConnection addConnection;
PF_NPAddConnection3 addConnection3;
+ PF_NPCancelConnection cancelConnection;
#ifdef __REACTOS__
PF_NPGetConnection getConnection;
#endif
@@ -199,11 +200,13 @@
}
provider->addConnection = MPR_GETPROC(NPAddConnection);
provider->addConnection3 = MPR_GETPROC(NPAddConnection3);
+ provider->cancelConnection = MPR_GETPROC(NPCancelConnection);
#ifdef __REACTOS__
provider->getConnection = MPR_GETPROC(NPGetConnection);
#endif
TRACE("NPAddConnection %p\n",
provider->addConnection);
TRACE("NPAddConnection3 %p\n",
provider->addConnection3);
+ TRACE("NPCancelConnection %p\n",
provider->cancelConnection);
providerTable->numProviders++;
}
else
@@ -1913,9 +1916,26 @@
*/
DWORD WINAPI WNetCancelConnection2W( LPCWSTR lpName, DWORD dwFlags, BOOL fForce )
{
- FIXME( "(%s, %08X, %d), stub\n", debugstr_w(lpName), dwFlags, fForce );
-
- return WN_SUCCESS;
+ DWORD ret = WN_NO_NETWORK;
+ DWORD index;
+
+ if (providerTable != NULL)
+ {
+ for (index = 0; index < providerTable->numProviders; index++)
+ {
+ if(providerTable->table[index].getCaps(WNNC_CONNECTION) &
+ WNNC_CON_GETCONNECTIONS)
+ {
+ 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;
}
/*****************************************************************