Solved

Modify Version Information

Posted on 1998-10-17
7
208 Views
Last Modified: 2011-09-20
Is there any way to modify the version information in ActiveX.DLL files without re-compiling. I need to modify the version info in the DLL that I develope from another VB 5.0 program
0
Comment
Question by:BobHiller
  • 4
  • 2
7 Comments
 
LVL 3

Expert Comment

by:HATCHET
ID: 1440345
You could use a good HEX Editor to look at the info inside the compiled file in hopes that you find the version number in Text format.  Then you could use it to edit the version number.  For example if the version number is "1.25.453" and in looking inside the compiled file you find something like :

asldkfjlk......$^@#&...."1.25.453"....678$....+_#//|.....

*NOTE : Do NOT change anything that you KNOW is just text like above as that will mess up the file.  

Hopefully that will work once you do it.  If it does not, then the version number is probibly compiled as well and the only way to change it is to recompile.  Even if you DO find the version number while checking it out with your HEX Editor, it may not be a good idea to change it this way.  Best bet, again, is to recompile.   =)

If you need to get a good HEX Editor, do a search for "HEX" at either SHAREWARE.COM or DOWNLOAD.COM.

Good luck,

0
 
LVL 3

Expert Comment

by:HATCHET
ID: 1440346
You could use a good HEX Editor to look at the info inside the compiled file in hopes that you find the version number in Text format.  Then you could use it to edit the version number.  For example if the version number is "1.25.453" and in looking inside the compiled file you find something like :

asldkfjlk......$^@#&...."1.25.453"....678$....+_#//|.....

*NOTE : Do NOT change anything that you KNOW is just text like above as that will mess up the file.  

Hopefully that will work once you do it.  If it does not, then the version number is probibly compiled as well and the only way to change it is to recompile.  Even if you DO find the version number while checking it out with your HEX Editor, it may not be a good idea to change it this way.  Best bet, again, is to recompile.   =)

If you need to get a good HEX Editor, do a search for "HEX" at either SHAREWARE.COM or DOWNLOAD.COM.

Good luck,
HATCHET
0
 
LVL 3

Expert Comment

by:HATCHET
ID: 1440347
You could use a good HEX Editor to look at the info inside the compiled file in hopes that you find the version number in Text format.  Then you could use it to edit the version number.  For example if the version number is "1.25.453" and in looking inside the compiled file you find something like :

asldkfjlk......$^@#&...."1.25.453"....678$....+_#//|.....

*NOTE : Do NOT change anything that you KNOW is just text like above as that will mess up the file.  

Hopefully that will work once you do it.  If it does not, then the version number is probibly compiled as well and the only way to change it is to recompile.  Even if you DO find the version number while checking it out with your HEX Editor, it may not be a good idea to change it this way.  Best bet, again, is to recompile.   =)

If you need to get a good HEX Editor, do a search for "HEX" at either SHAREWARE.COM or DOWNLOAD.COM.

Good luck,
HATCHET
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 3

Expert Comment

by:HATCHET
ID: 1440348
WOW !!

Didn't mean to do that....  hehehe...  Can you say "Ditto" ?  ; P
0
 
LVL 15

Accepted Solution

by:
ameba earned 200 total points
ID: 1440349
To modify resources inside exe file use resource editor. Go to resource: VERSIONINFO and modify strings. You can also modify your App icon to contain 2 images 32x32 and 16x16, etc.
I am using Borland Resource Workshop 4.5 (1994). Any C or C++ must have one resource editor.
If your question means "from VB code", you will have to use UpdateResource API function. But it is not simple.
0
 

Author Comment

by:BobHiller
ID: 1440350
Ameba's answer was excellent to the question I asked, However I failed to post my question properly. I do need to this from VB5.0. Ameba stated that to do this from VB I needed to use the "UpdateResource API function. But it is not simple.". I now need an example of using this API. Sorry for the confusion.

Bob Hiller
0
 
LVL 15

Expert Comment

by:ameba
ID: 1440351
A simple GETTING resource is also a headache - you must first "Load Library", Then FindResource, LockResource, LoadResorce. Finally FreeResource and FreeLibrary. Probably I missed some required API calls.
Therefore, for getting resources, it is recommended to use "easier" functions that exist for each type of resource: LoadString, LoadBitmap, LoadAccelerators, LoadIcon, GetFileVersionInfo...
For SETTING any resource, I suggest automating your task with your Resource editor. Use Sendkeys to send commands to it. Leave the hard job to Resource Editor's programmers.
For RW 4.5, I would:
Open it using shell.
By sending Alt-fo keys access FileOpen Dialog, then send name of exe file I want to modify, and "{Enter}" to accept it.
Then I would send "v" to position on VERSIONINFO resource, then down, and enter. This will open text of resource. I would then copy whole text to clipboard, then parse that string ...
Believe me, this is easier then the real API stuff! And OK for in-house usage.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB 6.0 printer how to align 6 62
Saving history changes to sub form 4 42
Prevent user closing word document opened with VB6 6 74
Added a column screws up code 5 57
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question