Click here to Skip to main content
15,912,205 members

Comments by ant1488 (Top 1 by date)

ant1488 3-Oct-13 8:56am View    
I could not change this code because it is part of MFC.
Also if somebody look at call stack he will see that OnGetItemIcon() function called from GetRootItems() function. Here it's part:


LPITEMIDLIST pidl;
if (FAILED(SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl)))
{
return FALSE;
}
pItem->pidlFQ = afxShellManager->CopyItem(pidl);
tvItem.iImage = OnGetItemIcon(pItem, FALSE); // error occurs inside


So pItem->pidlFQ is the pointer to structure describing full path to Desktop(root item in treeview ctrl).
In memory it looks like valid(not empty or garbage). I have compared it with memory on other PC and it is identical.
I have no idea why it could be not valid.
My suggestion is: error happen when MFC trying to get access to some COM interface and it is not reachable because some facilities are disabled on client PC (COMSysApp service e.g). But I am not skilled in COM technologies. How can I check it?