Solved

Change variable in running program.

Posted on 2004-07-30
4
219 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This article will show, step by step, how to integrate R code into a R Sweave document
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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 …

773 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