mpr: Don't send lpRemoteName when requesting network place.

Signed-off-by: Pierre Schweitzer <pierre@reactos.org>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Pierre Schweitzer 2016-03-16 21:32:35 +01:00 committed by Alexandre Julliard
parent 0c164207fc
commit e8c8ddcbfc
1 changed files with 7 additions and 0 deletions

View File

@ -760,6 +760,11 @@ DWORD WINAPI WNetOpenEnumW( DWORD dwScope, DWORD dwType, DWORD dwUsage,
providerTable->table[index].dwEnumScopes & WNNC_ENUM_GLOBAL)
{
HANDLE handle;
PWSTR 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);
@ -770,6 +775,8 @@ DWORD WINAPI WNetOpenEnumW( DWORD dwScope, DWORD dwType, DWORD dwUsage,
ret = *lphEnum ? WN_SUCCESS :
WN_OUT_OF_MEMORY;
}
lpNet->lpRemoteName = RemoteName;
}
else
ret = WN_NOT_SUPPORTED;