shell32: SHELL32_GetItemAttributes()
Martin Fuchs
fuchs.martin at gmail.com
Tue Nov 1 03:31:20 CST 2005
Hello Michael,
> Those are default flags, for the case that HCR_GetFolderAttributes didn't find
> a registry entry. Are you sure those aren't necessary? Perhaps we should push
> them into HCR_GetFolderAttributes, though.
Yes, I am quite sure the change is correct. It doesn't just remove the
following code:
- if (!HCR_GetFolderAttributes (pidl, pdwAttributes)) {
- *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|
- SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK;
If you look into shlfolder.c you will see the same code is still
available in the final 'else' clause at line 459:
} else {
*pdwAttributes &=
SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK;
}
The sense of the change is to join the if clause of the
HCR_GetFolderAttributes() call:
[...]
else if (_ILGetGUIDPointer() && HCR_GetFolderAttributes())
[return new attributes]
else
[search for other return attributes using _ILGetDataPointer()]
else
[return nothing]
The old code version used the following wrong logic:
[...]
else if (_ILGetGUIDPointer()) {
if (!HCR_GetFolderAttributes())
[return nothing]
} else
[search for other return attributes using _ILGetDataPointer()]
else
[return nothing]
Regards,
Martin
More information about the wine-devel
mailing list