Solved

Modify Version Information

Posted on 1998-10-17
7
211 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

710 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