I want to use IShellItemImageFactory to retrieve file thumbnails. According to MSDN docs, if I pass the SIZE structure 256x256, it should populate the HBITMAP parameter with a 256x256 bitmap, and if I use the SIIGBF_RESIZETOFIT flag, it should resize the thumbnails to 256x256. This is not true. Instead, the result is a 256x256 bitmap with a small icon drawn in the middle.
Well, maybe this is just not what SIIGBF_RESIZETOFIT should do. But then, as I understand it, I have to use SIIGBF_BIGGERSIZEOK and specify a tiny size (say 1x1), and instead it should return the actual size of the sketch. This is not true. I always get any size I pass.
Am I using this API incorrectly or is it just broken? There seem to be very few examples on the Internet. Several discussion posts have suggested that the API be violated. If it is really broken, how can I determine if a given shell element has a sketch? That way, I can use this method to get thumbnails and extract the icon otherwise.
source share