Solved

Change variable in running program.

Posted on 2004-07-30
4
218 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
ID: 11676242
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
ID: 11676294
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
ID: 11676458
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
ID: 11676530
I've talked to the customer and he will "guess" the wright weights.

Thanks for the trouble.

Dirk
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

Suggested Solutions

Title # Comments Views Activity
groupSum6 challenge 6 77
groovy example issue 10 90
Image decoding from Camera 3 73
Meaning of "exceptions()" in "ist.exceptions( ist.exceptions() | ios_base:: badbit);" 3 56
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.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
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 …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 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

26 Experts available now in Live!

Get 1:1 Help Now