https://git.reactos.org/?p=reactos.git;a=commitdiff;h=91119080bc8011a204d01…
commit 91119080bc8011a204d01d061d38d11a1ccca731
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Sun Nov 11 12:29:20 2018 +0200
Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
CommitDate: Sun Nov 11 20:28:29 2018 +0200
[NETSHELL] CNetworkConnections: SetNameOf should always return a new pidl on success.
CORE-14116
---
dll/shellext/netshell/shfldr_netconnect.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dll/shellext/netshell/shfldr_netconnect.cpp
b/dll/shellext/netshell/shfldr_netconnect.cpp
index d293edb73e..cb4d167f81 100644
--- a/dll/shellext/netshell/shfldr_netconnect.cpp
+++ b/dll/shellext/netshell/shfldr_netconnect.cpp
@@ -534,6 +534,7 @@ HRESULT WINAPI CNetworkConnections::SetNameOf (
LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD * pPidlOut)
{
const VALUEStruct * val;
+ HRESULT hr;
val = _ILGetValueStruct(pidl);
if (!val)
@@ -542,7 +543,14 @@ HRESULT WINAPI CNetworkConnections::SetNameOf (
if (!val->pItem)
return E_FAIL;
- return val->pItem->Rename(lpName);
+ hr = val->pItem->Rename(lpName);
+ if (FAILED(hr))
+ return hr;
+
+ /* The pidl hasn't changed */
+ *pPidlOut = ILClone(pidl);
+
+ return S_OK;
}
HRESULT WINAPI CNetworkConnections::GetDefaultSearchGUID(GUID * pguid)