Solved

Patching VB5 Executable

Posted on 2013-11-11
5
325 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 46

Expert Comment

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

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 46

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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
simplest php form 3 81
vbModal 12 57
VB.net and sql server 4 45
Fastest way to find and count same items VB6 16 24
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…
A short article about problems I had with the new location API and permissions in Marshmallow
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

860 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