Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I access to an address in memory with c#?

Tags:

c#

How can read a value of a variable in memeory, as binary, which I have its pointer address for in C#?

like image 501
Marslan Avatar asked Dec 30 '25 08:12

Marslan


1 Answers

This article shows how to use the Win32 ReadProcessMemory function to do it. Note that using the unsafe keyword is not sufficient, as it does not give you the ability to specify an explicit memory location.

How to write a Memory Scanner using C#
http://www.codeproject.com/KB/cs/sojaner_memory_scanner.aspx

To view the relevant code, you will need to download the project source, and examine the MemoryScanner.cs class.

like image 124
Robert Harvey Avatar answered Jan 01 '26 22:01

Robert Harvey