https://git.reactos.org/?p=reactos.git;a=commitdiff;h=62f79fae93a5d7ad43069…
commit 62f79fae93a5d7ad4306982f0a07c7cd8ef7a953
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Fri Sep 14 08:06:13 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Fri Sep 14 08:08:57 2018 +0200
[MPR] Import Wine commit: 0799550075654094a3bed080aac722b9bea01307
Implement WNetClearConnections().
CORE-15012
---
dll/win32/mpr/wnet.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/dll/win32/mpr/wnet.c b/dll/win32/mpr/wnet.c
index 75d6aef987..80375b837e 100644
--- a/dll/win32/mpr/wnet.c
+++ b/dll/win32/mpr/wnet.c
@@ -2646,11 +2646,10 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD
dwInfoLevel,
return err;
}
-#ifdef __REACTOS__
/*****************************************************************
* WNetClearConnections [MPR.@]
*/
-DWORD WINAPI WNetClearConnections ( DWORD unknown )
+DWORD WINAPI WNetClearConnections ( HWND owner )
{
HANDLE connected;
DWORD ret, size, count;
@@ -2676,7 +2675,7 @@ DWORD WINAPI WNetClearConnections ( DWORD unknown )
return WN_OUT_OF_MEMORY;
}
- do
+ for (;;)
{
size = 0x1000;
count = -1;
@@ -2685,25 +2684,18 @@ DWORD WINAPI WNetClearConnections ( DWORD unknown )
ret = WNetEnumResourceW(connected, &count, resources, &size);
if (ret == WN_SUCCESS || ret == WN_MORE_DATA)
{
- iter = resources;
- for (; count; count--)
- {
+ for (iter = resources; count; count--, iter++)
WNetCancelConnection2W(iter->lpLocalName, 0, TRUE);
-
- iter++;
- }
}
else
break;
- } while (ret != WN_NO_MORE_ENTRIES);
+ }
HeapFree(GetProcessHeap(), 0, resources);
WNetCloseEnum(connected);
return ret;
}
-#endif
-
/*