Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


c# hooking other apps

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Thu Aug 26, 2010 5:50 am    Post subject: c# hooking other apps Reply with quote

Hello.

Let's say there is another program that I wan't to hook.

How would I do it?

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
navarone
Advanced Cheater
Reputation: 2

Joined: 29 May 2010
Posts: 72

PostPosted: Thu Aug 26, 2010 6:38 am    Post subject: Reply with quote

System.Hooks.HookThisProcessPls("Process Name");
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Thu Aug 26, 2010 8:05 am    Post subject: Reply with quote

I just want to read stuff in memory stored by other programs.

Is it hard?

What would be the minimum code to do it?

Code:
              System.Diagnostics.Process[] p = System.Diagnostics.Process.GetProcessesByName("notepad");
            if (p.Length > 0)
            {
                IntPtr MyHandler = p[0].Handle; // This will get the first instance of the test app and make a pointer out of it or sumthin.
                int bytesRead = 0; //this is some kind of varible that 'ReadProcessMemory' will output stuff to.
                string ValueOrSomething; //This is the variable where 'ReadProcessMemory' will output the buffer.
                int address = 0; //address to pointer or something??
                ReadProcessMemory(MyHandler, address, out ValueOrSomething, 0, out bytesRead);
            }

_________________
Intel over amd yes.


Last edited by NINTENDO on Thu Aug 26, 2010 8:22 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
AhMunRa
Grandmaster Cheater Supreme
Reputation: 27

Joined: 06 Aug 2010
Posts: 1117

PostPosted: Thu Aug 26, 2010 8:14 am    Post subject: Reply with quote

This is just as an example.

http://www.codeproject.com/KB/cs/sojaner_memory_scanner.aspx

_________________
<Wiccaan> Bah that was supposed to say 'not saying its dead' lol. Fixing >.>
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Aug 27, 2010 5:14 pm    Post subject: Reply with quote

Check out EasyHook if you need C# hooking abilities:
http://easyhook.codeplex.com/

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites