Solved

Patching VB5 Executable

Posted on 2013-11-11
5
318 Views
Last Modified: 2013-11-12
Hello,

I have a VB5 executable in which I need to change some ASCII text strings.  The program executes correctly, but I need to change some text strings on the "About" menu choice.  I cannot rebuild the project (even though I still have the VB5 IDE), because some of the 3rd party controls I used are no longer available / supported, and I cannot get VB5 to compile the project correctly.

Within the program on the "About" page, I have an address that I would like to change:

e.g.:
       111 Fourth Street

to    222 Ninth Street

Is it possible to do this?  I realize that the length of the strings must be exactly the same, so I may need to pad the new string with spaces, if it ends up being too short.  If it ends up being longer, I may have a bigger problem.

Any help / suggestions would be appreciated.

Thanks..Tom
0
Comment
Question by:tpigielski
  • 3
5 Comments
 
LVL 45

Expert Comment

by:Martin Liss
ID: 39640621
Have you opened the VBP file in the VB5 IDE?
0
 
LVL 45

Expert Comment

by:Martin Liss
ID: 39640626
I ask because I recompile VB6 projects all the time with controls like some if the Sheridan controls that are no longer available.
0
 
LVL 45

Expert Comment

by:Martin Liss
ID: 39640627
of not if
0
 
LVL 45

Expert Comment

by:aikimark
ID: 39640928
All the string literals will be stored in Unicode format.  You will not find a "111 Fourth Street", but will likely find "1 1 1   F o u r t h   S t r e e t ".

I do not think you will be able to change the lengths of these strings.
0
 
LVL 16

Accepted Solution

by:
HooKooDooKu earned 500 total points
ID: 39642686
You will simply need to get a hex editor and carefully modify the text (an ASCII lookup table will come in handy too.

One that I like to use is Hex Workshop: http://download.cnet.com/Hex-Workshop/3000-2352_4-10004918.html  It comes with a month free trial... I found it useful enough that I got my employer to purchase a copy.

If you have a copy of visual studio, you can also open your exe with that in binary form.

While your string MIGHT be in unicode (in which case, I believe you will likely find your text with each letter padded with a null character) you might also find it as a normal string.

I was able to create a sample EXE in VB6 that simply displays "111 Fourth Street" in a label.  When I edited the EXE with Hex Workshop, I found the text in plain ASCII (rather than Unicode... don't know why though).  Using an ASCII table, I was able to update the text to "222 Ninth Street " and the program executed fine.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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 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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

746 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

12 Experts available now in Live!

Get 1:1 Help Now