Solved

Modify Version Information

Posted on 1998-10-17
7
206 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now