this, hwndOwner, pbc, lpszDisplayName, debugstr_w(lpszDisplayName),
pchEaten, ppidl, pdwAttributes);
- if (!lpszDisplayName || !ppidl)
+ if (!ppidl)
return E_INVALIDARG;
- *ppidl = 0;
+ if (!lpszDisplayName)
+ {
+ *ppidl = NULL;
+ return E_INVALIDARG;
+ }
+
+ *ppidl = NULL;
if (pchEaten)
*pchEaten = 0; /* strange but like the original */
else if( (pidlTemp = SHELL32_CreatePidlFromBindCtx(pbc, lpszDisplayName)) )
{
*ppidl = pidlTemp;
+ DbgPrint("[shell32, CDesktopFolder::ParseDisplayName] 1 *ppidl = 0x%x\n", *ppidl);
return S_OK;
}
else
}
}
- *ppidl = pidlTemp;
+ if (SUCCEEDED(hr))
+ *ppidl = pidlTemp;
+ else
+ *ppidl = NULL;
TRACE ("(%p)->(-- ret=0x%08x)\n", this, hr);
this, hwndOwner, pbc, lpszDisplayName, debugstr_w (lpszDisplayName),
pchEaten, ppidl, pdwAttributes);
- if (!lpszDisplayName || !ppidl)
+ if (!ppidl)
return E_INVALIDARG;
+ if (!lpszDisplayName)
+ {
+ *ppidl = NULL;
+ return E_INVALIDARG;
+ }
+
+ *ppidl = NULL;
+
if (pchEaten)
*pchEaten = 0; /* strange but like the original */