开发者

Need to know if a exe file contains at least an icon

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.

It's not working for 64 bit exe files.

I need this to work with any exe file in any Windows >= XP (x86 and x64).

I'm using Delphi 2009.


  1. Call LoadLibraryEx passing LOAD_LIBRARY_AS_DATAFILE or LOAD_LIBRARY_AS_IMAGE_RESOURCE.
  2. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜