Archive

Posts Tagged ‘JEDI’

PngImageList Fix for DEP and Update for D2009

October 26th, 2008

Hi,

probably you already encountered the problem that your Delphi IDE crashes instantly when using the TPngImageList Thany made available years ago. This happens if you use the TPngImageList Designtime Package under systems with activated Data Execution Prevention (DEP).

Despite the fact that this problem existed for some years now Christian of the JEDI Windows API Team was the first to write about it in his blog recently.

Mitja P. added a comment which provides the source and a solution for the bug:

There is a function PatchPtr used in PngComponents unit PngImageList that needs a change of VirtualProtect to PAGE_EXECUTE_READWRITE instead of only PAGE_READWRITE if I remember correctly. I am also not sure if I reported this to the author at the time I was playing around with this components or not.

I’ve verified that this fix solves the issue for Delphi 2006 up to Delphi 2009. Thank you Mitja!

Additionally there is an updated version of the TPngImageList (created by Uwe Raabe) available at the CodeGear Repository:

PngComponents for Delphi 2009

As Delphi 2009 only integrates the PNG support into native ImageLists this updated component allows for using your already existing PngImageLists from projects prior to Delphi 2009 without any change to the images!

Please be aware that this version needs the mentioned fix as well, so update the source before installing the package.

Arvid Delphi , , ,