Solved

Modify Version Information

Posted on 1998-10-17
7
207 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need VBS version of Excel date conversion 4 65
Excel object stays open 19 71
bit defender blocks good applications 2 82
to transfer string from C lanaguage to VBA 4 57
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…
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 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…

867 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

16 Experts available now in Live!

Get 1:1 Help Now