[PATCH 1/3] shlwapi: Be less strict on which type of IShellFolder can be enumerated

Andrew Eikum aeikum at codeweavers.com
Fri Jun 4 13:13:33 CDT 2010

On 06/03/2010 03:47 PM, Andrew Eikum wrote:
> On 06/03/2010 03:12 PM, Nikolay Sivov wrote:
>> No, this is not what I meant actually. The possible reason it was named
>> as IUnknown_EnumObjects is the same as for the rest of similar calls.
>> IUknown is a valid input for all of them and another _QueryInterface is
>> performed for IID_IShellFolder is case of this function. That makes no
>> sense to have such export as your patch makes it, but it's possible of
>> course. I expect that is does check that IShellFolder is supported.
> Okay, I see what you're saying now. I hadn't thought of that. After some
> quick tests, I think you're on the right path. I'll work on fixing it.
> Thanks!

So, with this in mind, here are some much more extensive tests.  As is 
explained in the comment, Windows _does_ get the ClassID of the object 
in this call.  But, Windows crashes when a non-IShellFolder object is 
given to this function.  Presumably it's trying to call 
IShellFolder_EnumObjects on it.  So it must not be using the CLSID for 
this kind of type-checking.

Trouble is, I have no idea what it is used for.  I tried testing most of 
the CLSIDs in shlguid.h with different combinations of flags, none of 
which had any effect.  It must just be looking out for a small number of 
specific CLSIDs.  One possible guess is that it tweaks the flags 
parameter when certain CLSIDs are detected, but none of my tests turned 
up anything interesting.

Any thoughts?  Should I just send as-is?

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-shlwapi-Be-less-strict-on-which-type-of-IShellFolder.patch
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20100604/75429e04/attachment.txt>

More information about the wine-devel mailing list