Announcement

Collapse
No announcement yet.

Add Version Info to DLL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Add Version Info to DLL

    I need to add version information to a DLL. I've tried the example under FAQ but keep getting errors (error line 0) and Line too long. Is there an example for adding version info?

  • #2
    a) Create a "Mydll.rc" file. Filename of your choice, but should end with ".rc". Something like this:

    Code:
    #include "D:\\PBWin80\\WinAPI\\Resource.h"
    VS_VERSION_INFO VERSIONINFO
    FILEVERSION 1, 0, 1, 0
    PRODUCTVERSION 1, 0, 1, 0
    FILEOS VOS_WINDOWS32
    BEGIN
      BLOCK "StringFileInfo"
      BEGIN
        BLOCK "040904E4"
        BEGIN
          VALUE "CompanyName", "YourCompany"
          VALUE "FileDescription", "My great dll"
          VALUE "FileVersion", "1.01"
          VALUE "Build", "01-Jan-2008"
          VALUE "OriginalFilename", "MyGreat.dll"
          VALUE "LegalCopyright", "Copyright ©2008 YourCompany"
          VALUE "ProductName", "MyProggie"
        END
      END
    END
    Of course, the path to resource.h should be that of YOUR setup ..

    b) Compile this resource file in your (PB) IDE

    c) Add this line to your dll source code:
    Code:
    #RESOURCE "Mydll.pbr"
    d) Compile your dll source code.
    Check in Windows Explorer for your dll version info.

    Kind regards
    Last edited by Eddy Van Esch; 14 Feb 2008, 07:44 AM.
    Eddy

    Comment


    • #3
      Code:
      ...
       FILEOS VOS_WINDOWS32
      [COLOR="Red"] FILETYPE VFT_DLL
       FILESUBTYPE VFT2_UNKNOWN
      [/COLOR]BEGIN
      ...
      Yours sincerely

      Comment


      • #4
        I still must be doing something wrong

        I get the following error:

        Error 418 in VERSIONINFO.PBR(1:001): Statement expected
        Line 1:

        Followed by Line 0 too long.

        Any further help would be greatly appreciated!

        Comment


        • #5
          You must us #RESOURCE, not #INCLUDE with the PBR file. The 418 error means that the compiler is treating the PBR file is a source file, when it isn't.
          kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

          Comment


          • #6
            Thanks!

            That did it. Thanks!

            Comment

            Working...
            X