[Request]How to read memory address in c#?

03/29/2010 21:14 shimo diaz#1
I just started learning C# i want to know how to read memory address of a certain application if anyone would be able to give this as an example i would be really thankful!
i want to read HP memory address then i want it to appear in label in my program!

note: Please no answers like ur lazy, google is ur friend or search for ""
Thanks for those who wants to help :handsdown:
03/29/2010 21:19 SaM.ThE.MaN#2
how to find addresses use cheat engine and find it.
Example your char hp is 1000
go to cheat engine and choose exact value then new search and type 1000 and click search
Then decrease your hp to 800 (go get some damage) then type 800 and click next
There should be only 1 value available,if there is more than one increase your hp back to 1000
and type 1000 and click next and there should be 1 address
that is how you find addresses,how to apply it to C# sorry i cant help you with that since that is not the language i use or used!!
03/29/2010 22:03 shimo diaz#3
Quote:
Originally Posted by SaM.ThE.MaN View Post
how to find addresses use cheat engine and find it.
Example your char hp is 1000
go to cheat engine and choose exact value then new search and type 1000 and click search
Then decrease your hp to 800 (go get some damage) then type 800 and click next
There should be only 1 value available,if there is more than one increase your hp back to 1000
and type 1000 and click next and there should be 1 address
that is how you find addresses,how to apply it to C# sorry i cant help you with that since that is not the language i use or used!!
Thanks but i already know that :p yet thanks for your concern
03/29/2010 22:58 _tao4229_#4
[Only registered and activated users can see links. Click Here To Register...]
03/29/2010 23:19 Trigorio#5
Quote:
Originally Posted by shimo diaz View Post
I just started learning C# i want to know how to read memory address of a certain application if anyone would be able to give this as an example i would be really thankful!
i want to read HP memory address then i want it to appear in label in my program!

note: Please no answers like ur lazy, google is ur friend or search for ""
Thanks for those who wants to help :handsdown:
Code:
[DllImport("user32.dll", EntryPoint="GetWindowThreadProcessId")]
			public static extern int GetWindowThreadProcessId(IntPtr hWnd, out int lpdwProcessId);

[DllImport("kernel32.dll", EntryPoint = "ReadProcessMemory")]
			public static extern Int32 ReadProcessMemory(IntPtr hProcess, int lpBaseAddress, out string buffer, int size, out int lpNumberOfBytesRead);
Use those functions.
03/30/2010 04:48 Nullable#6
In addition to what both of the posters above me marked, note that you need to call [Only registered and activated users can see links. Click Here To Register...] before reading memory.
03/30/2010 14:35 shimo diaz#7
Thanks for all of you :)