ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 IEMBitmap.LoadFromResource crashes with

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PeterPanino Posted - Oct 11 2024 : 10:49:12
IEMBitmap.LoadFromResource crashes when trying to load the resources from a 64-bit EXE file:



Here is the project to reproduce the error:

attach/PeterPanino/20241011104749_TIEMultiBitmapHelperLoadFromResourceTestv2.zip
86.34 KB

How can the crash be avoided?

The documentation says only: "Appends the specified types of resources from PE files like EXE, DLL, OCX, ICL, BPL, etc from a module, such as an EXE file."

It does not mention 32-bit or 64-bit.

ImageEn 13.6.0
Delphi 12.2
Windows 11
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Oct 12 2024 : 05:36:15
Thanks Peter

I'm on holiday until the end of October, but will look into it after that.

Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Oct 11 2024 : 13:02:47
I have now improved my project:

1. Loading only GroupIcon resources due to the 64-bit limitation
2. Applying an automatic Filtering system that shows only the icon resources with the largest dimensions in the EXE file

attach/PeterPanino/2024101113138_TIEMultiBitmapHelperLoadFromResourceTestv3.zip
141.03 KB
PeterPanino Posted - Oct 11 2024 : 11:22:45
I have tried to limit the resource types to Bitmap and GroupIcon:

ImageEnMView1.IEMBitmap.LoadFromResource(ThisExeFile, [ietrBitmap, ietrGroupIcon]);


In this case, the crash does not occur, but the Bitmaps are empty:



It is unclear whether the Bitmaps are shown empty only with this specific EXE file or whether this is a general limitation.