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 


Memory Editing
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
hacksign23
Master Cheater
Reputation: 0

Joined: 26 Nov 2006
Posts: 404

PostPosted: Wed Aug 13, 2008 4:47 pm    Post subject: Memory Editing Reply with quote

I need some help with
WriteProcessMemory.
I would like to know like a little description of what the syntax is like
Code:

BOOL WINAPI WriteProcessMemory(
  __in   HANDLE hProcess,
  __in   LPVOID lpBaseAddress,
  __in   LPCVOID lpBuffer,
  __in   SIZE_T nSize,
  __out  SIZE_T *lpNumberOfBytesWritten
);

like the handle, lpvoid, size_t, etc. Also, what should I use to Open the process/edit it?

An example is nice so then i know what I'm doing.

also, how would I nop something like two times or something? (I'm doing VB.NET) thanks.

_________________
Back to top
View user's profile Send private message AIM Address
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Wed Aug 13, 2008 4:51 pm    Post subject: Re: Memory Editing Reply with quote

hacksign23 wrote:
I need some help with
WriteProcessMemory.
I would like to know like a little description of what the syntax is like
Code:

BOOL WINAPI WriteProcessMemory(
  __in   HANDLE hProcess,
  __in   LPVOID lpBaseAddress,
  __in   LPCVOID lpBuffer,
  __in   SIZE_T nSize,
  __out  SIZE_T *lpNumberOfBytesWritten
);

like the handle, lpvoid, size_t, etc. Also, what should I use to Open the process/edit it?

An example is nice so then i know what I'm doing.

also, how would I nop something like two times or something? (I'm doing VB.NET) thanks.


hProcess - The process handle returned by OpenProcess()
lpBaseAddress - The address the writing is going to start on.
lpBuffer - what your writing. It can be anything. (Bytes, String, DWORD, PByteArray, etc)
nSize - The size of the buffer. You can use size() I think to determine it.
lpNumberOfBytesWritten - is just a out variable. You put in a null variable and it will be ok.
Back to top
View user's profile Send private message
hacksign23
Master Cheater
Reputation: 0

Joined: 26 Nov 2006
Posts: 404

PostPosted: Wed Aug 13, 2008 6:56 pm    Post subject: :D Reply with quote

Thanks! It's very short yet descriptive.



+ rep Surprised!

_________________
Back to top
View user's profile Send private message AIM Address
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Wed Aug 13, 2008 7:24 pm    Post subject: Reply with quote

If you can take that off MSDN, why didn't you just read it's descriptions of everything?
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Thu Aug 14, 2008 9:34 am    Post subject: Reply with quote

Maybe he didn't understand. I I just did a nooby descreption of it.
Back to top
View user's profile Send private message
Spawnfestis
GO Moderator
Reputation: 0

Joined: 02 Nov 2007
Posts: 1746
Location: Pakistan

PostPosted: Thu Aug 14, 2008 12:20 pm    Post subject: Reply with quote

slovach wrote:
If you can take that off MSDN, why didn't you just read it's descriptions of everything?


You may not know this, but not everyone are born in a country where they natively speak English.
Hard words can be confusing, and if its tied to programming it gets double-confusing due to the fact that someone that has just begun programming is generally confused, so yes, that's probably why.

_________________

CLICK TO HAX MAPLESTORAY ^ !!!!
Back to top
View user's profile Send private message Send e-mail MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Thu Aug 14, 2008 12:45 pm    Post subject: Reply with quote

Spawnfestis wrote:
slovach wrote:
If you can take that off MSDN, why didn't you just read it's descriptions of everything?


You may not know this, but not everyone are born in a country where they natively speak English.
Hard words can be confusing, and if its tied to programming it gets double-confusing due to the fact that someone that has just begun programming is generally confused, so yes, that's probably why.


If he could craft such a post, English is not the problem here.
Back to top
View user's profile Send private message
hacksign23
Master Cheater
Reputation: 0

Joined: 26 Nov 2006
Posts: 404

PostPosted: Thu Aug 14, 2008 12:47 pm    Post subject: Reply with quote

1. I'm new at programming.
2. I'm stupid.

_________________
Back to top
View user's profile Send private message AIM Address
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Thu Aug 14, 2008 1:19 pm    Post subject: Reply with quote

hacksign23 wrote:
1. I'm new at programming.
2. I'm stupid.


No.

No one is stupid. Unless if you have down syndrom.
Back to top
View user's profile Send private message
hacksign23
Master Cheater
Reputation: 0

Joined: 26 Nov 2006
Posts: 404

PostPosted: Thu Aug 14, 2008 1:29 pm    Post subject: Reply with quote

lol thanks. Using WriteProcessMemory, how would i nop something like twice or something? thanks.
_________________
Back to top
View user's profile Send private message AIM Address
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Thu Aug 14, 2008 1:32 pm    Post subject: Reply with quote

Delphi 7:

Code:
var
 bytes:pbytearray;
 out:cardinal;

begin
bytes[0]:=$90;
bytes[1]:=$90;
writeprocessmemory(hProcess,$401000,bytes,$2,out);


Havent tested.
Back to top
View user's profile Send private message
hacksign23
Master Cheater
Reputation: 0

Joined: 26 Nov 2006
Posts: 404

PostPosted: Thu Aug 14, 2008 1:43 pm    Post subject: Reply with quote

I'M NOT USING DELPHI 7, SILLY! Very Happy
_________________
Back to top
View user's profile Send private message AIM Address
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Thu Aug 14, 2008 1:44 pm    Post subject: Reply with quote

Code:
BYTE bNops[2] = { 0x90, 0x90 };
DWORD dwWritten = 0;

if ( WriteProcessMemory( hProcess, (LPVOID)0x400000, (LPCVOID)bNops, 2, &dwWritten ) && dwWritten > 0 )
     MessageBox( hWnd, _T("Successfully NOP'd the addresses."), _T("Success"), MB_OK );

_________________
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Thu Aug 14, 2008 2:06 pm    Post subject: Reply with quote

He just said he wasn't using delphi. So I bet hes not using C++ too. It says he is using vb.net.

Here:

Code:
Dim writebytes(0 to 1) as byte
writebytes(0)=&H90
writebytes(1)=&H90
writeprocessmemory(hProcess,&H401000,writebytes,2,&H0)


This code is supose to work but it crashes vb cause vb is stupid so u use:


Code:
Dim writebyte as byte
writebyte=&H90
writeprocessmemory(hProcess,&H401000,writebyte,1,&H0)
writebyte=&H90
writeprocessmemory(hProcess,&H401001,writebyte,1,&H0)
Back to top
View user's profile Send private message
hacksign23
Master Cheater
Reputation: 0

Joined: 26 Nov 2006
Posts: 404

PostPosted: Thu Aug 14, 2008 2:07 pm    Post subject: Reply with quote

Oh thanks dsin0! That worked. I implanted a loop so it's all good. Thank you!
_________________


Last edited by hacksign23 on Thu Aug 14, 2008 2:18 pm; edited 1 time in total
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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