PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Douglas McDonald on July 12, 2010, 01:59:33 PM

Title: Reading Resource file info
Post by: Douglas McDonald on July 12, 2010, 01:59:33 PM
I did a search but didn't see anything. How do I read the resource file. I want to get the info thats in the projects properties.


Begin
  BLOCK "StringFileInfo"
  Begin
    BLOCK "040904E4"
    Begin
      VALUE "CompanyName",  "ECD\0"
     
      VALUE "FileVersion",       "1.0.0.0\0"
      VALUE "ProductVersion",    "1.0.0.0\0"
      VALUE "ProductName",  "program\0"
      VALUE "InternalName",  "program\0"
      VALUE "OriginalFilename",  "program.exe\0"
      VALUE "LegalCopyright",  "my name 2010\0"
     
      VALUE "Comments",  "program\0"
    End


I didn't see anything in the help file ether but this must be very simple.

Thank you
Doug
Title: Re: Reading Resource file info
Post by: Robert Eaton on July 12, 2010, 02:04:56 PM
Look up the APP function. (Similar to VB.)
Title: Re: Reading Resource file info
Post by: Rolf Brandt on July 12, 2010, 02:45:25 PM
You could use somehing like this:

   Local aName As Asciiz * %MAX_PATH   
   Local aVerInfo As Asciiz *20
   Local aInfo As Asciiz * %MAX_PATH
   Local aDescr As Asciiz * %MAX_PATH
   
   aName=app.productname     
   aVerInfo= "v. " & Format$(app.ProductMajor) & "." & Format$(app.ProductMinor) & _
          "." & Format$(app.ProductRevision) & " Rev. " & Format$(app.FileBuild) 
   aInfo=app.LegalCopyright 
   aDescr = app.FileDescription   

Title: Re: Reading Resource file info
Post by: Paul Squires on July 12, 2010, 03:05:07 PM
Info on the App variable is located in the Help file under "Special Functions".
Title: Re: Reading Resource file info
Post by: Douglas McDonald on July 12, 2010, 03:52:25 PM
Ok thanks. I thought I saw it once someplace but doing a search revealed nothing. I'll take a look there.

Thanks