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 


[VB6] how to write to a certain memorry address?
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Pseudo Xero
I post too much
Reputation: 0

Joined: 16 Feb 2007
Posts: 2607

PostPosted: Tue Mar 11, 2008 3:49 pm    Post subject: Reply with quote

haxory' wrote:
yes thats the case with me too

but ima make a trainer for a bad protected game

edit: it is full of errors

45 errors in total

Wiccaan has a trainer kit in VB6 I believe.

_________________
haxory' wrote:
can't VB do anything??
windows is programmed using VB right? correct me if im wrong.

so all things in windows you have like the start menu is a windows form too.
Back to top
View user's profile Send private message
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Wed Mar 12, 2008 12:16 am    Post subject: Reply with quote

costum or "using wiccaan's trainer maker"?
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel
Back to top
View user's profile Send private message
Estx
Expert Cheater
Reputation: 0

Joined: 04 Mar 2008
Posts: 172

PostPosted: Wed Mar 12, 2008 8:26 am    Post subject: Reply with quote

The large code supplied before is for VB.Net not VB6.

Code:
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long

'2035711 = All Access // &H1F0FFF

Private Sub Form_Load()
    Dim tProc As Long
    Dim test As String
    Dim PID As Long
    PID = 1234 ' Find out your process code, use other api's etc to get it.
    test = String(64, " ")

    tProc = OpenProcess(&H1F0FFF, True, PID)
   
    'Read address 100579c, and place it in the test string
    'Call ReadProcessMemory(tProc, &H100579C, test, 4, 0&)
   
    test = "blah"
    Call WriteProcessMemory(tProc, &H100579C, test, 4, 4&)

    Call CloseHandle(tProc)
End Sub


You'll need to edit the buffer accordingly (test as string, to array or bytes or w/e you need)
Back to top
View user's profile Send private message
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Wed Mar 12, 2008 10:47 am    Post subject: Reply with quote

thx for clearing that up
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel
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: Wed Mar 12, 2008 2:33 pm    Post subject: Reply with quote

Take a look at my trainer toolkit:
http://www.extalia.com/forums/viewtopic.php?f=22&t=2585

It comes with an example for hacking Minesweeper.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
madmunky
Newbie cheater
Reputation: 0

Joined: 08 Mar 2008
Posts: 21

PostPosted: Thu Mar 13, 2008 3:20 am    Post subject: Reply with quote

Wiccaan: Any chance in updating it for VB2008 will be handy when I get to my next stage to use as reference Smile
Back to top
View user's profile Send private message
Estx
Expert Cheater
Reputation: 0

Joined: 04 Mar 2008
Posts: 172

PostPosted: Thu Mar 13, 2008 5:34 am    Post subject: Reply with quote

I'll make a DLL in .Net for it that will export the functions you need.

i.e. Read/Write, GetProc, find byte array etcetera.

May not finish it tonight, heading off to bed in a lil while.
Back to top
View user's profile Send private message
madmunky
Newbie cheater
Reputation: 0

Joined: 08 Mar 2008
Posts: 21

PostPosted: Thu Mar 13, 2008 5:44 am    Post subject: Reply with quote

Bit cheeky but any chance in the source when you have done it even if its in a PM would like to know how DLL's work Smile
Back to top
View user's profile Send private message
Estx
Expert Cheater
Reputation: 0

Joined: 04 Mar 2008
Posts: 172

PostPosted: Thu Mar 13, 2008 7:18 am    Post subject: Reply with quote

http://forum.cheatengine.org/viewtopic.php?t=213449

Enjoy Wink
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: Thu Mar 13, 2008 4:16 pm    Post subject: Reply with quote

madmunky wrote:
Wiccaan: Any chance in updating it for VB2008 will be handy when I get to my next stage to use as reference Smile


I don't touch .NET, sorry.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Fri Mar 14, 2008 7:43 am    Post subject: Reply with quote

can you convert it to VB6???
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel
Back to top
View user's profile Send private message
Estx
Expert Cheater
Reputation: 0

Joined: 04 Mar 2008
Posts: 172

PostPosted: Fri Mar 14, 2008 8:26 am    Post subject: Reply with quote

His Tool Kit already is in VB6 lol.
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 Mar 14, 2008 2:23 pm    Post subject: Reply with quote

haxory' wrote:
can you convert it to VB6???


The toolkit I posted is done in VB6, if you couldn't understand it then you need to go back and learn the basics of the language before using it lol.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Fri Mar 14, 2008 2:29 pm    Post subject: Reply with quote

Estx wrote:
The large code supplied before is for VB.Net not VB6.

Code:
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long

'2035711 = All Access // &H1F0FFF

Private Sub Form_Load()
    Dim tProc As Long
    Dim test As String
    Dim PID As Long
    PID = 1234 ' Find out your process code, use other api's etc to get it.
    test = String(64, " ")

    tProc = OpenProcess(&H1F0FFF, True, PID)
   
    'Read address 100579c, and place it in the test string
    'Call ReadProcessMemory(tProc, &H100579C, test, 4, 0&)
   
    test = "blah"
    Call WriteProcessMemory(tProc, &H100579C, test, 4, 4&)

    Call CloseHandle(tProc)
End Sub


You'll need to edit the buffer accordingly (test as string, to array or bytes or w/e you need)


so i replied:
can you convert it

_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel
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 Mar 14, 2008 2:38 pm    Post subject: Reply with quote

What he posted was VB6 also..
_________________
- 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
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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