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 


vb.net how to write multipointer??

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
reavenz
Newbie cheater
Reputation: 0

Joined: 24 Apr 2012
Posts: 11

PostPosted: Mon May 14, 2012 8:47 pm    Post subject: vb.net how to write multipointer?? Reply with quote

Code:
Private Declare Function OpenProcess Lib "kernel32" Alias "OpenProcess" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
Private Declare Function WriteProcessMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function WriteFloatMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Single, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function ReadFloat Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef buffer As Single, ByVal size As Int32, ByRef lpNumberOfBytesRead As Int32) As Boolean
Private Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function CloseHandle Lib "kernel32" Alias "CloseHandle" (ByVal hObject As Integer) As Integer
Public Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Long) As Integer

Public RBuff1 As Long
Public RBuff2 As Single
Public RBuff3 As Integer

'WriteMemory
Public Function WriteMemory(ByVal Address As Integer, ByVal Value As Long, ByVal Bytes As Integer)
Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")
If warrockLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)
WriteProcessMemory(processHandle, Address, Value, Bytes, Nothing)
CloseHandle(processHandle)
End Function

'ReadFloat
Public Function ReadFloat(ByVal Address As Single)
Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")
If warrockLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)
ReadProcessMemory(processHandle, Address, RBuff1, 4, Nothing)
CloseHandle(processHandle)
Return RBuff1
End Function

'WriteFloat
Public Function WriteFloat(ByVal Address As Integer, ByVal Value As Single)
Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")
If warrockLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)
WriteFloatMemory(processHandle, Address, Value, 4, Nothing)
CloseHandle(processHandle)
End Function

'ReadLong
Public Function ReadLong(ByVal Address As Integer)
Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")
If warrockLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)
ReadProcessMemory(processHandle, Address, RBuff1, 4, Nothing)
CloseHandle(processHandle)
Return RBuff1
End Function

'ReadFloatPointer
Public Function ReadFloatPointer(ByVal Base As Integer, ByVal Offset As Short)
Dim fullAddress As Long
Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")
If warrockLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)
ReadProcessMemory(processHandle, Base, RBuff1, 4, Nothing)
fullAddress = RBuff1 + Offset
ReadFloat(processHandle, fullAddress, RBuff2, 4, Nothing)
Return RBuff2
CloseHandle(processHandle)
End Function

'ReadLongPointer
Public Function ReadLongPointer(ByVal Base As Integer, ByVal Offset As Short, ByVal Bytes As Integer) 'ReadLongPointer
Dim fullAddress As Long
Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")
If warrockLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)
ReadProcessMemory(processHandle, Base, RBuff1, 4, Nothing)
fullAddress = RBuff1 + Offset
ReadProcessMemory(processHandle, fullAddress, RBuff3, Bytes, Nothing)
Return RBuff3
CloseHandle(processHandle)
End Function

'WriteFloatPointer
Public Function WriteFloatPointer(ByVal Base As Integer, ByVal Offset As Short, ByVal Value As Single)
Dim fullAddress As Long
Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")
If warrockLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)
ReadProcessMemory(processHandle, Base, RBuff1, 4, Nothing)
fullAddress = RBuff1 + Offset
WriteFloatMemory(processHandle, fullAddress, Value, 4, Nothing)
CloseHandle(processHandle)
End Function

'WriteLongPointer
Public Function WriteLongPointer(ByVal Base As Integer, ByVal Offset As Short, ByVal Value As Long, ByVal Bytes As Integer)
Dim fullAddress As Long
Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")
If warrockLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)
ReadProcessMemory(processHandle, Base, RBuff1, 4, Nothing)
fullAddress = RBuff1 + Offset
WriteProcessMemory(processHandle, fullAddress, Value, Bytes, Nothing)
CloseHandle(processHandle)
End Function

'NOP
Public Function NOP(ByVal Address As Integer, ByVal value As Integer)
Dim warrockLookUp As Process() = Process.GetProcessesByName("WarRock")
If warrockLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, warrockLookUp(0).Id)
WriteProcessMemory(processHandle, Address, value, 1, Nothing)
CloseHandle(processHandle)
End Function


how to use multipointer function?
pointer : 27D0B60
Offset1 = 3BCE2
Offset2 = 2DCC8
Offset3 = C4C2F
Offset4 = EE241

Thanks Very Happy
Back to top
View user's profile Send private message
NotReallySureWhatGoesHere
Expert Cheater
Reputation: -1

Joined: 20 Feb 2012
Posts: 110

PostPosted: Mon May 14, 2012 10:07 pm    Post subject: Reply with quote

We're here to provide help, not to do it for you. Show us some progress, some attempts that are by you, and post your errors. I'm not a master at VB.NET or any language for that matter, but I can interpret almost any language and have a clue. There are more advanced users here, but I'll do my best to help.
Back to top
View user's profile Send private message
reavenz
Newbie cheater
Reputation: 0

Joined: 24 Apr 2012
Posts: 11

PostPosted: Mon May 14, 2012 10:21 pm    Post subject: Reply with quote

im doubt about use vb.net / C#
bcause only in here is Great Cheat Forum..

i want to learn about C# and vb.net..
so if some people can teach me..
I am very grateful
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25838
Location: The netherlands

PostPosted: Tue May 15, 2012 8:32 am    Post subject: Reply with quote

It's not code but a methodology

read this topic: http://forum.cheatengine.org/viewtopic.php?t=422516

anyhow, what you should do:
read the 4 byte value at address 27D0B60
add 3BCE2 to the 4 byte value and store the result into X
read the 4 byte value at address X
add 2DCC8 to the 4 byte value and store the result into X
read the 4 byte value at address X
add C4C2F to the 4 byte value and store the result into X
read the 4 byte value at address X
add EE241 and store the result into ACTUALADDRESS

now you can use ACTUALADDRESS to read and change the address

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Tue May 15, 2012 9:47 am    Post subject: Reply with quote

You have already been shown this in C# now you're asking for vb too.
Learn one at a time. Plus the example you were shown in C# can easily be converted to vb or try to understand how multilevel pointers work to create your own function.

Dark Byte has just shown you how it works. Now think what you need to do to achieve this in vb.

_________________
Back to top
View user's profile Send private message
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