Solved

Patching VB5 Executable

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupNoAdj 7 95
silent install of security banner via msiexec command 4 87
Not needed 13 112
How to measure sizes and angles in scanned images ? 3 63
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.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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 …

770 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