shell32/brsfolder.c

Michael Jung mjung at iss.tu-darmstadt.de
Tue Apr 12 12:18:12 CDT 2005


Hi Wolfgang,

@@ -400,24 +423,41 @@ static LRESULT MsgNotify(HWND hWnd,  UIN
  break;

  lptvid=(LPTV_ITEMDATA)pnmtv->itemNew.lParam;
- if (SUCCEEDED(IShellFolder_BindToObject(lptvid->lpsfParent, lptvid->lpi,0,
(REFIID)&IID_IShellFolder,(LPVOID *)&lpsf2)))
- { FillTreeView( lpsf2, lptvid->lpifq, pnmtv->itemNew.hItem,lptvid->pEnumIL);
+ if ( _ILIsDesktop( lptvid->lpi ))
+ {
+  /* Always fill Desktop node without binding to object */
+  FillTreeView( lptvid->lpsfParent, lptvid->lpifq, pnmtv->itemNew.hItem, 
lptvid->pEnumIL);
+ }
+ else if (SUCCEEDED(IShellFolder_BindToObject(
+  lptvid->lpsfParent, lptvid->lpifq,
                               ^^^^^
In TV_ITEMDATA variables, lpsfParent is the IDL of the parent, lpi is the 
relative IDL to the child and lpifq is the fully qualified IDL to the child.
So what you are doing here effectively is to concatenate the parent's IDL with 
the fully qualified IDL. Replacing this with "lptvid->lpi" fixes the problem 
in winecfg. 

There are several occurences of "_ILIsDesktop( lptvid->lpi )" in your patch, 
which semantically doesn't make much sense to me, since lpi is only the 
relative IDL.

Bye,
--
Michael Jung
mjung at iss.tu-darmstadt.de



More information about the wine-devel mailing list