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 Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

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

hacksign23 wrote:
Thanks, but I believe that's C++. I'm trying to do VB.NET thanks.


No the code I gave is vb6.0. Im sure you can convert it to vb.net with no probs. Wink
Back to top
View user's profile Send private message
GMZorita
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Mar 2007
Posts: 1361

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

Just use
Code:
sizeof(VarName);

Instead of setting the amount of bytes... make it way easy every time you are going to edit.

_________________
Gone
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:13 pm    Post subject: Reply with quote

GMZorita wrote:
Just use [code]sizeof(VarName);


Yea thats the function I was thinking about. I knew it was size.. something but didn't get it lol.
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:34 pm    Post subject: Reply with quote

sizeof is for C++. I'm doing vb.net

Code:

 Dim Address As Integer
        Dim Bytes As Byte = &H90
        Dim Size As Byte() = {&H90, &H90, &H90, &H90, &H90, &H90}
        Dim Output As Integer
        Dim Loopz As Integer
        Address = &H1003830
        For Loopz = 0 To 5
            WriteProcessMemory(processHandle, Address, Bytes, Size.Length, Output)
            Address += &H1
        Next Loopz
        Loopz = 0
        Address = &H1002FF5
        For Loopz = 0 To 5
            WriteProcessMemory(processHandle, Address, Bytes, Size.Length, Output)
            Address += &H1
        Next Loopz
        Loopz = 0
        Address = &H1003849
        For Loopz = 0 To 5
            WriteProcessMemory(processHandle, Address, Bytes, Size.Length, Output)
            Address += &H1
        Next Loopz
        CloseHandle(processHandle)


This is what I have. I get an error because like after clicking my button, it edits stuff AFTER the 6 nops. It nops the six, and edits some after like 00 00 3E or something. Any ideas?

_________________
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 2:38 pm    Post subject: Reply with quote

hacksign23 wrote:
sizeof is for C++. I'm doing vb.net

Code:

 Dim Address As Integer
        Dim Bytes As Byte = &H90
        Dim Size As Byte() = {&H90, &H90, &H90, &H90, &H90, &H90}
        Dim Output As Integer
        Dim Loopz As Integer
        Address = &H1003830
        For Loopz = 0 To 5
            WriteProcessMemory(processHandle, Address, Bytes, Size.Length, Output)
            Address += &H1
        Next Loopz
        Loopz = 0
        Address = &H1002FF5
        For Loopz = 0 To 5
            WriteProcessMemory(processHandle, Address, Bytes, Size.Length, Output)
            Address += &H1
        Next Loopz
        Loopz = 0
        Address = &H1003849
        For Loopz = 0 To 5
            WriteProcessMemory(processHandle, Address, Bytes, Size.Length, Output)
            Address += &H1
        Next Loopz
        CloseHandle(processHandle)


This is what I have. I get an error because like after clicking my button, it edits stuff AFTER the 6 nops. It nops the six, and edits some after like 00 00 3E or something. Any ideas?


No. Your putting in 1 byte and your using size at 6????? thats no no.

Change size to 1.
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 5:18 pm    Post subject: Reply with quote

OH YEA SILLY ME. THANKS!
_________________
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 Previous  1, 2
Page 2 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