On 5/20/2012 18:47, Detlef Riekenberg wrote:
+HRESULT IQueryInfo_Constructor(LPCITEMIDLIST root, LPCITEMIDLIST item, void ** ppvOut) +{
- IQueryInfoImpl *qi = HeapAlloc(GetProcessHeap(), 0, sizeof(IQueryInfoImpl));
- LPITEMIDLIST pidl = ILCombine(root, item);
- if (!pidl || !qi) {
SHFree(pidl);
HeapFree(GetProcessHeap(), 0, qi);
return E_OUTOFMEMORY;
- }
- qi->IQueryInfo_iface.lpVtbl =&IQueryInfo_vtbl;
- qi->ref = 1;
- qi->pidl = ILClone(pidl);
- SHFree(pidl);
I don't see a reason to ILClone() here. You could just store ILCombine() result.