Solved

Change variable in running program.

Posted on 2004-07-30
4
217 Views
Last Modified: 2010-04-17
I've made a program wich has a error in it and now it is running but it won't continue unless some variable
wil change from true to false.

When i stop de program all de data is lost.
Is there a program wich can change values in the memory of a running program.

Urgent.
0
Comment
Question by:dgb
  • 2
4 Comments
 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 250 total points
Comment Utility
In principle, what you are asking can be done, but in practice it is VERY difficult, and very 'dangerous'.  To do so requires a MEMORY MAP of the program (which identifies where, in memory, every variable is stored), and a HEX editor, which will allow you to edit the value stored in any memory location.  I say 'dangerous' because if you are not ABSOLUTELY sure of exactly what value you are changin and the EXCAT location of that value in memory, you can VERY EASILY introduce sometimes fatal errors and more commonly totally spurious data into your program, without realizing that you have done so.

Such changes typically require a great deal of experience and extreme caustion, and are not to be undertaken by a casual or inexperienced user.

AW
0
 
LVL 14

Assisted Solution

by:wayside
wayside earned 250 total points
Comment Utility
You don't specify a platform, but if it is windows you can attach a debugger, break into the program, and modify memory as much as you want.

If your exe is a debug exe you win big, because then it will be pretty easy to find the variable you need to change. If it's not debug you will have to do some poking around, and it may not be easy to find; the variable could be stored on the stack, in the heap, or in a register.
0
 

Author Comment

by:dgb
Comment Utility
The program gets a weight of a cowkarkas and stores them in a fifo collection and
then writes them to a database.
Since the weights come automaticly there is no room for waiting for the data to be saved or not.
So All values are put in a collection and then are stored in the database.

There are about 100 weights in the program wich wont be save unless i reset that boolean value.

Extra info
OS: win98
exe:vb6 active exe

If i decide to "poke around" what program can i use
0
 

Author Comment

by:dgb
Comment Utility
I've talked to the customer and he will "guess" the wright weights.

Thanks for the trouble.

Dirk
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
A short article about problems I had with the new location API and permissions in Marshmallow
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

744 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

10 Experts available now in Live!

Get 1:1 Help Now