From d2e68234b2d2097c2306b642329ae541f6e76d93 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Tue, 2 Aug 2016 13:22:07 +0200 Subject: [PATCH] mpr: Implement WNetCancelConnectionA(), WNetCancelConnectionW(), WNetCancelConnection2A(). Signed-off-by: Pierre Schweitzer Signed-off-by: Alexandre Julliard --- dlls/mpr/wnet.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c index 6e865f01e28..5a67e5f131f 100644 --- a/dlls/mpr/wnet.c +++ b/dlls/mpr/wnet.c @@ -1838,9 +1838,7 @@ DWORD WINAPI WNetUseConnectionA( HWND hwndOwner, NETRESOURCEA *resource, */ DWORD WINAPI WNetCancelConnectionA( LPCSTR lpName, BOOL fForce ) { - FIXME( "(%s, %d), stub\n", debugstr_a(lpName), fForce ); - - return WN_SUCCESS; + return WNetCancelConnection2A(lpName, 0, fForce); } /********************************************************************* @@ -1848,9 +1846,7 @@ DWORD WINAPI WNetCancelConnectionA( LPCSTR lpName, BOOL fForce ) */ DWORD WINAPI WNetCancelConnectionW( LPCWSTR lpName, BOOL fForce ) { - FIXME( "(%s, %d), stub\n", debugstr_w(lpName), fForce ); - - return WN_SUCCESS; + return WNetCancelConnection2W(lpName, 0, fForce); } /********************************************************************* @@ -1858,9 +1854,15 @@ DWORD WINAPI WNetCancelConnectionW( LPCWSTR lpName, BOOL fForce ) */ DWORD WINAPI WNetCancelConnection2A( LPCSTR lpName, DWORD dwFlags, BOOL fForce ) { - FIXME( "(%s, %08X, %d), stub\n", debugstr_a(lpName), dwFlags, fForce ); + DWORD ret; + WCHAR * name = strdupAtoW(lpName); + if (!name) + return ERROR_NOT_CONNECTED; - return WN_SUCCESS; + ret = WNetCancelConnection2W(name, dwFlags, fForce); + HeapFree(GetProcessHeap(), 0, name); + + return ret; } /********************************************************************* -- 2.11.4.GIT