Le 06/11/2013 16:31, Sven Barth a écrit :
If you look at my other mail you'll see the solution. The reader unit for Windows PE files is WinPEImageReader.
You're rigth and I used your comment to buil the test and it runs nice.  8-)
Next step is to build some general procedure to retrieve the version of any pogram on any platform as far as far as the source file is accessible and has the platform executable signature.
I think I have all the peices right now. Leave some days (I have other things to do for which I'm paid and a boss looking over my shoulder >:o   , he is very comprehensive though).

Anyway, thank you to you two.
I'ill come back here when I have something clean and working.

Antonio.
And you can avoid ifdefs by additionally to unit "resources" using the units "elfreader", "winpeimagereader" and "versionresource". Then you can do "Rs.LoadFromFile(sProgram);"
Does make sense. In fact that's exactly what I've done just before your post.
(the explicit reader isn't needed as the extension will be used) and either loop through all resources like you currently do or use "Rs.Find(RT_VERSION, 1)" which should(!) return you the correct version resource.
Which avoids the ridiculous loop
Regards,
Sven


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
Sita
                Software
Antonio Fortuny
Senior Software engineer

220, avenue de la Liberté
L-4602 Niederkorn
Tel.: +352 58 00 93 - 93
www.sitasoftware.lu
Your IT Partner

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to