Solved

Change variable in running program.

Posted on 2004-07-30
4
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

This is an explanation of a simple data model to help parse a JSON feed
Make the most of your online learning experience.
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 …
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 …

690 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