 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
yoyonerd Grandmaster Cheater
Reputation: 0
Joined: 26 Apr 2008 Posts: 699 Location: -->formerly yoyonerd<--
|
Posted: Wed Feb 11, 2009 1:37 am Post subject: [C#] WriteProcessMemory |
|
|
Simple enough, I am 95% sure I've done all the other arguments right, but the first one, with open process stumps me, i'll put my code here, if some1 could please tell me what went wrong
| Code: | System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("MapleStory");
IntPtr hProcess = OpenProcess(0x1F0FFF, 0, (UInt32)proc[0].Id);
byte[] Kill_Ad = { 0x90, 0x90, 0x90, 0x90, 0x90 };
//Kill Ad
WriteProcessMemory(hProcess, (IntPtr)0x007C66E3, Kill_Ad, (UIntPtr)Kill_Ad.Length, out bytesout); |
this is for a maplestory v62 private server, if anybody can help, my AIM and msn are below in the button links
thanks, any type of comment is appreciated
_________________
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Wed Feb 11, 2009 4:37 am Post subject: |
|
|
| Did you try to call GetLastError(), and see what it returns?
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Wed Feb 11, 2009 8:56 am Post subject: Re: [C#] WriteProcessMemory |
|
|
| yoyonerd wrote: | Simple enough, I am 95% sure I've done all the other arguments right, but the first one, with open process stumps me, i'll put my code here, if some1 could please tell me what went wrong
| Code: | System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("MapleStory");
IntPtr hProcess = OpenProcess(0x1F0FFF, 0, (UInt32)proc[0].Id);
byte[] Kill_Ad = { 0x90, 0x90, 0x90, 0x90, 0x90 };
//Kill Ad
WriteProcessMemory(hProcess, (IntPtr)0x007C66E3, Kill_Ad, (UIntPtr)Kill_Ad.Length, out bytesout); |
this is for a maplestory v62 private server, if anybody can help, my AIM and msn are below in the button links
thanks, any type of comment is appreciated |
see if proc[0].Id actucally returned anything.
then see if hProcess Returned anything then see if wpm returned true. I dont have .NET so Can't help you.
|
|
| Back to top |
|
 |
Zerith Master Cheater
Reputation: 1
Joined: 07 Oct 2007 Posts: 468
|
Posted: Wed Feb 11, 2009 9:04 am Post subject: Re: [C#] WriteProcessMemory |
|
|
| dnsi0 wrote: | | yoyonerd wrote: | Simple enough, I am 95% sure I've done all the other arguments right, but the first one, with open process stumps me, i'll put my code here, if some1 could please tell me what went wrong
| Code: | System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("MapleStory");
IntPtr hProcess = OpenProcess(0x1F0FFF, 0, (UInt32)proc[0].Id);
byte[] Kill_Ad = { 0x90, 0x90, 0x90, 0x90, 0x90 };
//Kill Ad
WriteProcessMemory(hProcess, (IntPtr)0x007C66E3, Kill_Ad, (UIntPtr)Kill_Ad.Length, out bytesout); |
this is for a maplestory v62 private server, if anybody can help, my AIM and msn are below in the button links
thanks, any type of comment is appreciated |
see if proc[0].Id actucally returned anything.
then see if hProcess Returned anything then see if wpm returned true. I dont have .NET so Can't help you. |
If any process was found then it's inserted into the Process array, or else it doesn't, so if proc[0] exist then proc[0].Id is a valid ID aswell.
Are you using PROCESS_ALL_ACCESS? just use PROCESS_VM_WRITE and PROCESS_VM_READ if needed, you don't need anything else.
Or you could get debug priviliges, which seems like a waste to me.
|
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Wed Feb 11, 2009 12:02 pm Post subject: |
|
|
Offtopic but why not just import the System.Diagnostics namespace?
_________________
Intel over amd yes. |
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Wed Feb 11, 2009 5:06 pm Post subject: Re: [C#] WriteProcessMemory |
|
|
| Code: | System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("MapleStory");
MessageBox.Show(Marshal.GetLastWin32Error().ToString()); //Or you can use Console.WriteLine(), or whatever you want
IntPtr hProcess = OpenProcess(0x1F0FFF, 0, (UInt32)proc[0].Id);
byte[] Kill_Ad = { 0x90, 0x90, 0x90, 0x90, 0x90 };
//Kill Ad
WriteProcessMemory(hProcess, (IntPtr)0x007C66E3, Kill_Ad, (UIntPtr)Kill_Ad.Length, out bytesout);
Messagebox.Show(Marshal.GetLastWin32Error.ToString()); |
_________________
|
|
| Back to top |
|
 |
|
|
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
|
|