Solved

Modify Version Information

Posted on 1998-10-17
7
209 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…

840 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