<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <div class="moz-cite-prefix">Le 06/11/2013 16:31, Sven Barth a
      écrit :<br>
    </div>
    <blockquote cite="mid:527A60CC.3070708@googlemail.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      If you look at my other mail you'll see the solution. The reader
      unit for Windows PE files is WinPEImageReader. </blockquote>
    You're rigth and I used your comment to buil the test and it runs
    nice.  <span class="moz-smiley-s11"><span> 8-) </span></span><br>
    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.<br>
    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 <span class="moz-smiley-s10"><span> >:o   </span></span>,
    he is very comprehensive though).<br>
    <br>
    Anyway, thank you to you two.<br>
    I'ill come back here when I have something clean and working.<br>
    <br>
    Antonio.<br>
    <blockquote cite="mid:527A60CC.3070708@googlemail.com" type="cite">And
      you can avoid ifdefs by additionally to unit "resources" using the
      units "elfreader", "winpeimagereader" and "versionresource". Then
      you can do "Rs.LoadFromFile(sProgram);" </blockquote>
    Does make sense. In fact that's exactly what I've done just before
    your post.<br>
    <blockquote cite="mid:527A60CC.3070708@googlemail.com" type="cite">
    </blockquote>
    <blockquote cite="mid:527A60CC.3070708@googlemail.com" type="cite">(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.<br>
    </blockquote>
    Which avoids the ridiculous loop<br>
    <blockquote cite="mid:527A60CC.3070708@googlemail.com" type="cite">
      Regards,<br>
      Sven<br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">--
_______________________________________________
Lazarus mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a>
</pre>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      <table
style="font-family:'Calibri','sans-serif';font-size:8.0pt;color:#002f87;border:0;width:auto;">
        <tbody>
          <tr>
            <td style="vertical-align:bottom;padding:40px 20px
              25px;border-top:1pt solid #BFBFBF;"> <img alt="Sita
                Software"
                src="cid:part1.00090600.06010600@sitasoftware.lu"> </td>
          </tr>
          <tr>
            <td style="vertical-align: top; padding: 5px 20px 0;"> <b>Antonio
                Fortuny</b><br>
              Senior Software engineer<br>
              <br>
              220, avenue de la Liberté<br>
              L-4602 Niederkorn<br>
              Tel.: +352 58 00 93 - 93<br>
              <a style="color:#002f87;cursor:pointer;text-decoration:
                none;" href="http://www.sitasoftware.lu">www.sitasoftware.lu</a><br>
            </td>
          </tr>
          <tr>
            <td style="padding:20px 20px 30px;border-bottom: 1pt solid
              #BFBFBF;" align="right"> <img alt="Your IT Partner"
                src="cid:part3.09060203.05040108@sitasoftware.lu"> </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>