简体   繁体   中英

Write Process Memory in VB.NET (Visual Studio 2010)

I am trying to edit the process memory of a game (Age Of Empires II: The Conquerers). I can edit the memory manually on TSearch and it works just fine. I want to this with VB.NET but have had no luck. Note: I am not doing this to cheat, I am just using this as a learning experience for changing process memory.

Process Memory info:

Process Name : age2_x1.Exe

Address : FB1DD90

Type :Float

Current Value : 19. <--Note that the period (.) IS included in the value.

Wanted Value : 25.

I have tried TONS of stuff on vb.net with no luck. If you can help me at all that would be awesome. StackOverflow has never let me down! Thanks guys!

Visual Basic is a rather odd choice for this sort of thing. However, you can use P/Invoke to call the Windows API functions directly.

It's fairly straightforward: OpenProcess and request PROCESS_VM_WRITE permissions, then use WriteProcessMemory to make your modifications. Obviously this is all rather dangerous and you must be absolutely sure you know what you are doing, as a tiny mistake could completely corrupt the state of the other process, causing it to crash--or much worse!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM