I need to know if a exe file contains at least one icon开发者_StackOverflow. A fast way, if that's possible.
I tried with PrivateExtractIcons
and it works, but only for 32 bit exe files.
I'm using Delphi 2009.
- Call
LoadLibraryEx
passingLOAD_LIBRARY_AS_DATAFILE or LOAD_LIBRARY_AS_IMAGE_RESOURCE
. - Call
EnumResourceTypes
to check if the module has any icon resources.
Note that this is not exhaustive since some applications (e.g. modern Office) store their image assets in custom form and not icon resources.
精彩评论