views:

65

answers:

2

hello im making a application and i need to know how to change the values of address's for example : Memory Address : 0xB7CE50 Value : 100000 Is there a wiki page or a function for this? if so what is it?

+1  A: 

You typically just use the debugger, and place the variable you're looking to change in the Watch window, then just type in the new value.


It appears that you want a way for a .NET program to modify a particular memory address of another program.

There is no way to do this with .NET as far as I know, and there's only barely a way to do this outside of .NET. As I suggested, you could do this with a debugger. In order to do it from a program, your program will have to be a debugger!

The good news is that this is possible. See Visual Studio Debugger Extensibility. Do not be put off by the fact that it seems to require Visual Studio. What you may not know is that it's possible to create a program, based on Visual Studio, that looks and behaves entirely like a stand-alone executable.

I believe there are also ways to "be a debugger" by using APIs described in the Windows SDK, but I don't know where the documentation for them is.

John Saunders
I do not think this answer directly applies to the original question's intended meaning.
Nathan Taylor
i am just looking for something like a function do i have to use C# for this?
Cody Beer
@Nathan: I'm not sure I know what the intended meaning is, in that case.
John Saunders
@Cody: what are you attempting to accomplish? What is that address? Is the address always the same address?
John Saunders
im trying to increase a value which will increase my IN-Game money the address is 0xB7CE50 and yes it is always the same address and the value 100000
Cody Beer
@Cody: what kind of program is this? C++? Why is that address always the same?
John Saunders
well its like on a singleplayer game when you put in a cheat for example cars fly it sets a address's value as 1 instead of 0 (basicly) and this is C#
Cody Beer
@John I don't know if you've ever heard of a program called ArtMoney, but it has a similar intent. Cody is trying to access raw system memory addresses so that he can change a value (like player gold) on command.
Nathan Taylor
@Nathan: I'm not getting how he arranges for the same data to be at the same address. This isn't a real-mode DOS program, is it?
John Saunders
@John I'm not terribly familiar with the underpinnings of how it works, but I guess the memory addresses used by the target application (game) are constant; so long as you know the physical address and it isn't going to change it is technically possible to alter the value at that address externally.
Nathan Taylor
@Nathan: @Cody: I think some context is needed here. Normal .NET programs don't work this way. Is this some XBox game or something?
John Saunders
@John I apologize if that wasn't clear, but he's not targeting the .NET program's memory addresses, rather he wants to create a program in .NET to directly modify memory addresses set by another application (most likely a game).
Nathan Taylor
@Cody: if this is true, then please update your question to say so. There is no way I could guess this! @Nathan: thanks for the "requirements gathering" exercise.
John Saunders
@John My pleasure! it only took about 13 comments :p
Nathan Taylor
+2  A: 

I believe Cody Beer is running a game and looking for a program such as HxD or something similar which will allow him to edit the main memory so he can change the amount of money he has in-game to the maximum amount. VS is the wrong tool for this.

Jim Sigler
I agree. He needs something to act as a debugger and to permit him to inspect and modify the address space of another program. He should either get a program someone else has written, or should improve his skill with the game so he doesn't have to cheat.
John Saunders