Solved

Patching VB5 Executable

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

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

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.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

911 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

19 Experts available now in Live!

Get 1:1 Help Now