Write problem with MS Office 2003

Michael Jung mjung at iss.tu-darmstadt.de
Wed May 25 10:02:30 CDT 2005

Hi Stefan,

On Wednesday 25 May 2005 18:13, Stefan Dösinger wrote:
> Any suggestions to the following patch? 

+ SHELL32_GetItemAttributes (_IShellFolder_ (This),  This->pidlRoot, 

This->pidlRoot is the ITEMIDLIST of all SHITEMIDs starting from the root of 
the shell namespace up to the current folder. If you take a look into 
SHELL32_GetItemAttributes, it calls _ILIsDrive, _ILGetGUIDPointer and the 
like on the pidl. Those function inspect the first SHITEMID in the ITEMIDLIST 
only (see pidl.c). This means they will inspect the SHITEMID which represents 
the drive, which the ITEMIDLIST ist based on. 

What you really need to do is to call SHBindToParent. This will give you a 
pointer to the current folders parent folder as well as the last SHITEMID of 
the ITEMIDLIST. Call SHELL32_GetItemAttributes with the parent folder and 
this last SHITEMID.

As to the caching of the file attributes: Those are already cached in the 
SHITEMID (see _ILGetFileAttributes in pidl.c). So you are adding a redundant 
level of caching and thus unnecessary complexity. IMHO it would be better to 
remove the IGenericFSImpl's dwAttributes member and just call 

Michael Jung
mjung at iss.tu-darmstadt.de

More information about the wine-devel mailing list