Author: pschweitzer
Date: Tue Aug 2 09:54:51 2016
New Revision: 72085
URL:
http://svn.reactos.org/svn/reactos?rev=72085&view=rev
Log:
[MPR]
Implement WNetCancelConnectionA(), WNetCancelConnectionW(), WNetCancelConnection2A()
Already sent upstream.
Patch 4/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:54:51 2016
@@ -1886,9 +1886,7 @@
*/
DWORD WINAPI WNetCancelConnectionA( LPCSTR lpName, BOOL fForce )
{
- FIXME( "(%s, %d), stub\n", debugstr_a(lpName), fForce );
-
- return WN_SUCCESS;
+ return WNetCancelConnection2A(lpName, 0, fForce);
}
/*********************************************************************
@@ -1896,9 +1894,7 @@
*/
DWORD WINAPI WNetCancelConnectionW( LPCWSTR lpName, BOOL fForce )
{
- FIXME( "(%s, %d), stub\n", debugstr_w(lpName), fForce );
-
- return WN_SUCCESS;
+ return WNetCancelConnection2W(lpName, 0, fForce);
}
/*********************************************************************
@@ -1906,9 +1902,15 @@
*/
DWORD WINAPI WNetCancelConnection2A( LPCSTR lpName, DWORD dwFlags, BOOL fForce )
{
- FIXME( "(%s, %08X, %d), stub\n", debugstr_a(lpName), dwFlags, fForce );
-
- return WN_SUCCESS;
+ DWORD ret;
+ WCHAR * name = strdupAtoW(lpName);
+ if (!name)
+ return ERROR_NOT_CONNECTED;
+
+ ret = WNetCancelConnection2W(name, dwFlags, fForce);
+ HeapFree(GetProcessHeap(), 0, name);
+
+ return ret;
}
/*********************************************************************