mpr: Implement support for deleting persistent connections.

Signed-off-by: Pierre Schweitzer <pierre@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Pierre Schweitzer 2018-12-06 08:39:37 +01:00 committed by Alexandre Julliard
parent 23a232fce8
commit 773ff2e83b
1 changed files with 17 additions and 0 deletions

View File

@ -2290,6 +2290,23 @@ DWORD WINAPI WNetCancelConnection2W( LPCWSTR lpName, DWORD dwFlags, BOOL fForce
}
}
}
if (ret == WN_SUCCESS && dwFlags & CONNECT_UPDATE_PROFILE)
{
HKEY user_profile;
/* FIXME: Only remove it if that's a drive letter */
if (isalphaW(lpName[0]) && lpName[1] == ':' &&
RegOpenCurrentUser(KEY_ALL_ACCESS, &user_profile) == ERROR_SUCCESS)
{
WCHAR subkey[10] = {'N', 'e', 't', 'w', 'o', 'r', 'k', '\\', lpName[0], 0};
RegDeleteKeyW(user_profile, subkey);
RegCloseKey(user_profile);
}
}
return ret;
}