LoadPicture gets wrong icon count from dll Topic is solved

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

Re: LoadPicture gets wrong icon count from dll

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 )
My Scripts and Functions: V1  V2
User avatar
BGM
Posts: 507
Joined: 20 Nov 2013, 20:56
Contact:

Re: LoadPicture gets wrong icon count from dll

16 Sep 2017, 22:06

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

Re: LoadPicture gets wrong icon count from dll

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.
My Scripts and Functions: V1  V2
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: LoadPicture gets wrong icon count from dll

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.)

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 38 guests