So ich habe es mir mal erlaubt das Tut von Kaali in Vb.Net umzusetzen
Die "as Any" hab ich einfach mal durch Integer ersetzt, vll nicht die eleganteste Lösung aber mit Pinball hats schonmal funtkioniert. Wer nen besseren Vorschlag hat bitte posten. Könnte mir gut vorstellen dass die aktuelle Variante etwas buggy ist :s
Vondaher müssen die Deklarationen so aussehen:
Code:
Public Declare Function ReadProcessMem 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<br /><br />Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer<br /><br />Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer<br /><br />Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Integer, ByRef lpdwProcessId As Integer) As Integer<br /><br />Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer<br /><br />Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer<br /><br />Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Short<br /><br />Declare Function Hotkey Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Integer) As Short<br /><br />Public Function WPM(ByRef gamewindowtext As String, ByRef Address As Integer, ByRef Value As Integer, ByRef bytes As Byte) As Object<br /> Dim handle As Integer<br /> Dim processID As Integer<br /> Dim ProcessHandle As Integer<br /> handle = FindWindow(vbNullString, gamewindowtext)<br /> GetWindowThreadProcessId(handle, processID)<br /> ProcessHandle = OpenProcess(&H1F0FFF, True, processID)<br /> WriteProcessMemory(ProcessHandle, Address, Value, bytes, 0)<br /> CloseHandle(ProcessHandle)<br />End Function<br /><br />Public Function WPMbuf(ByRef gamewindowtext As String, ByRef Address As Integer, ByRef Value As Byte, ByRef bytes As Byte) As Object<br /> Dim handle As Integer<br /> Dim processID As Integer<br /> Dim ProcessHandle As Integer<br /> handle = FindWindow(vbNullString, gamewindowtext)<br /> GetWindowThreadProcessId(handle, processID)<br /> ProcessHandle = OpenProcess(&H1F0FFF, True, processID)<br /> WriteProcessMemory(ProcessHandle, Address, Value, bytes, 0)<br /> CloseHandle(ProcessHandle)<br />End Function<br /><br /><br />Public Function RPM(ByRef gamewindowtext As String, ByRef Address As Integer, ByRef Value As Integer, ByRef bytes As Integer) As Object<br /> Dim handle As Integer<br /> Dim processID As Integer<br /> Dim ProcessHandle As Integer<br /> handle = FindWindow(vbNullString, gamewindowtext)<br /> GetWindowThreadProcessId(handle, processID)<br /> ProcessHandle = OpenProcess(&H1F0FFF, True, processID)<br /> ReadProcessMem(ProcessHandle, Address, Value, bytes, 0)<br /> CloseHandle(ProcessHandle)<br />End Function
Dieses Tutorial wurde von Bahamut geschrieben! _________________