shell32/tests: test whether SHGetFileInfo should clear hIcon (try 2)

Dan Kegel dank at kegel.com
Mon Aug 4 17:19:02 CDT 2008


[ This is just the test from
 http://www.winehq.org/pipermail/wine-patches/2008-July/057795.html
 without the corresponding fix.  If there's anything wrong with
 this, please let me know. ]

msdn says:
"If SHGetFileInfo returns an icon handle in the hIcon member of the
SHFILEINFO structure pointed to by psfi, you are responsible
for freeing it with DestroyIcon when you no longer need it."

While valgrinding picasa, I noticed that the caller of SHGetFileInfo
was following this advice, but SHGetFileInfo had not actually modified
hIcon, leading to garbage being compared (and possibly passed to
DestroyIcon).

So I added a number of tests to see when SHGetFileInfo[WA]
sets the fields of SHFILEINFO, and added todo_wine
around the ones that don't pass yet on Wine.

Tests pass on Windows XP.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hicon2.patch
Type: text/x-patch
Size: 5799 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080804/6b98789d/attachment.bin 


More information about the wine-patches mailing list