Author: pschweitzer Date: Sat Feb 27 20:58:32 2016 New Revision: 70793
URL: http://svn.reactos.org/svn/reactos?rev=70793&view=rev Log: [MPR] Fix enumeration of network places root directory when starting the enumeration from network providers enumeration
CORE-10878 #resolve #comment Fixed with r70793
Modified: trunk/reactos/dll/win32/mpr/mpr_ros.diff trunk/reactos/dll/win32/mpr/wnet.c
Modified: trunk/reactos/dll/win32/mpr/mpr_ros.diff URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/mpr_ros.diff?... ============================================================================== --- trunk/reactos/dll/win32/mpr/mpr_ros.diff [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mpr/mpr_ros.diff [iso-8859-1] Sat Feb 27 20:58:32 2016 @@ -49,6 +49,28 @@ =================================================================== --- wnet.c (révision 70645) +++ wnet.c (copie de travail) +@@ -750,7 +750,12 @@ + providerTable->table[index].dwEnumScopes & WNNC_ENUM_GLOBAL) + { + HANDLE handle; ++ PVOID RemoteName = lpNet->lpRemoteName; + ++ if ((lpNet->dwUsage & RESOURCEUSAGE_CONTAINER) && ++ RemoteName && !strcmpW(RemoteName, lpNet->lpProvider)) ++ lpNet->lpRemoteName = NULL; ++ + ret = providerTable->table[index].openEnum( + dwScope, dwType, dwUsage, lpNet, &handle); + if (ret == WN_SUCCESS) +@@ -760,6 +765,8 @@ + ret = *lphEnum ? WN_SUCCESS : + WN_OUT_OF_MEMORY; + } ++ ++ lpNet->lpRemoteName = RemoteName; + } + else + ret = WN_NOT_SUPPORTED; @@ -1553,6 +1553,33 @@ dwFlags, NULL, 0, NULL); }
Modified: trunk/reactos/dll/win32/mpr/wnet.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/wnet.c?rev=70... ============================================================================== --- trunk/reactos/dll/win32/mpr/wnet.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mpr/wnet.c [iso-8859-1] Sat Feb 27 20:58:32 2016 @@ -750,6 +750,11 @@ providerTable->table[index].dwEnumScopes & WNNC_ENUM_GLOBAL) { HANDLE handle; + PVOID RemoteName = lpNet->lpRemoteName; + + if ((lpNet->dwUsage & RESOURCEUSAGE_CONTAINER) && + RemoteName && !strcmpW(RemoteName, lpNet->lpProvider)) + lpNet->lpRemoteName = NULL;
ret = providerTable->table[index].openEnum( dwScope, dwType, dwUsage, lpNet, &handle); @@ -760,6 +765,8 @@ ret = *lphEnum ? WN_SUCCESS : WN_OUT_OF_MEMORY; } + + lpNet->lpRemoteName = RemoteName; } else ret = WN_NOT_SUPPORTED;