LoadPicture gets wrong icon count from dll Topic is solved

Report problems with documented functionality
User avatar
SKAN
Posts: 319
Joined: 29 Sep 2013, 16:58

Re: LoadPicture gets wrong icon count from dll

Post by SKAN » 15 Sep 2017, 13:47

Until (or if at all) the glitch is fixed, the following one-liner can be used to get icon count from PE files. (for. ico count will always be 1)

Code: Select all

IconCount := DllCall( "Shell32\ExtractIcon", "Ptr",0, "Str","broken.dll", "Int",-1 )
User avatar
BGM
Posts: 419
Joined: 20 Nov 2013, 20:56
GitHub: bgmCoder
Contact:

Re: LoadPicture gets wrong icon count from dll

Post by BGM » 16 Sep 2017, 22:06

Thanks, SKAN, that works like a charm.
Now, what do I do for .icl files?
User avatar
SKAN
Posts: 319
Joined: 29 Sep 2013, 16:58

Re: LoadPicture gets wrong icon count from dll

Post by SKAN » 16 Sep 2017, 22:29

BGM wrote:Now, what do I do for .icl files?
ICL files are NE files. They are 16-bit and last I used them was in Win'98.
If you want to support them, you have to retrieve the raw ICON Data by directly reading from it... Wouldn't be worth the trouble, I'd say.

BTW, ExtractIcon() recognizes .BMP file as an ICON. Also, LoadPicture() is able to load a BMP as HICON when VType parameter is used.
lexikos
Posts: 6175
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: LoadPicture gets wrong icon count from dll

Post by lexikos » 17 Dec 2017, 03:22

SKAN wrote:Until (or if at all) the glitch is fixed,
I may be wrong since I haven't done more than skimmed over the thread, but I think I fixed it back in July. I just haven't been interested enough to release an update. (Just a little longer.)
lexikos
Posts: 6175
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: LoadPicture gets wrong icon count from dll  Topic is solved

Post by lexikos » 27 Dec 2017, 04:47

Fixed in v1.1.27.00.
Post Reply

Return to “Bug Reports”