Mikołaj Zalewski wrote:
+/************************************************************************* + * _ILMakePidlNotNull + * + * A null pidl is a valid pidl that represents the Desktop. However if we don't + * want a NULL pidl (e.g. because NULL indicates an error) this function will + * make an explicit empty pidl if the parameter is NULL. + */ +HRESULT _ILMakePidlNotNull(LPITEMIDLIST *pidl) +{ + if (*pidl == NULL) + *pidl = _ILCreateDesktop(); + if (*pidl == NULL) + return E_OUTOFMEMORY; + return S_OK; +}
This function is a bit ugly. It seems this policy should be made in the BrsFolder_OnCommand function, rather than in pidl.c as a file.
-- Rob Shearman