so ich stehe vor nem kleinen problem ich weis nicht obs am logischen hapert .. bzw mir oder an dem code
also im endefekt will ich eine Value in der memory um 1 incrasen
das sieht dann so aus
das Modul!
Code:
Option Explicit<br />'Find Window<br />Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long<br />'Get Process ID<br />Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal Hwnd As Long, lpdwProcessId As Long) As Long<br />'Open Process<br />Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long<br />'Write Process Memory<br />Private Declare Function WPM Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long<br />'Close Handle<br />Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long<br />'SetProcess<br />Private FindProcess As Long<br /><br />Public Sub SetProcess(WindowCaption As String)<br />FindProcess = FindWindow(vbNullString, WindowCaption)<br />End Sub<br /><br />Public Sub WriteNOPs(Address As Long, NOPNum As Integer)<br />Dim pid&, phandle&<br />Dim C As Integer<br />Dim B As Integer<br />If FindProcess = 0 Then Exit Sub<br />GetWindowThreadProcessId FindProcess, pid<br />phandle = OpenProcess(&H1F0FFF, False, pid)<br />If phandle = 0 Then Exit Sub<br />B = 0<br />For C = 1 To NOPNum<br />Call WPM(phandle, Address + B, &H90, 1, 0&)<br />B = B + 1<br />Next C<br />CloseHandle phandle<br />End Sub<br /><br />Public Sub WriteXBytes(Address As Long, Value As String)<br />Dim pid&, phandle&<br />Dim Temp As String<br />Dim C As Integer<br />Dim B As Integer<br />Dim D As Integer<br />Dim V As Byte<br />If FindProcess = 0 Then Exit Sub<br />GetWindowThreadProcessId FindProcess, pid<br />phandle = OpenProcess(&H1F0FFF, False, pid)<br />If phandle = 0 Then Exit Sub<br />B = 0<br />D = 1<br />For C = 1 To Round((Len(Value) / 2))<br />V = Val("&H" & Mid$(Value, D, 2))<br />Call WPM(phandle, Address + B, V, 1, 0&)<br />B = B + 1<br />D = D + 2<br />Next C<br />CloseHandle phandle<br />End Sub
dann die funktion!
Code:
Private Declare Function FindWindow _<br /> Lib "user32" _<br /> Alias "FindWindowA" _<br /> (ByVal lpClassName As String, _<br /> ByVal lpWindowName As String) As Long<br /> <br />Private Declare Function ShowWindow _<br /> Lib "user32" _<br /> (ByVal Hwnd As Long, _<br /> ByVal nCmdShow As Long) As Long<br /> <br />Private Const SW_SHOWNORMAL = 1<br />Private Const SW_SHOWMINIMIZED = 2<br />Private Const SW_SHOWMAXIMIZED = 3
und zu guter letzt der aufruf
Code:
Private Sub cmd_test_Click()<br />'code :005fa3f6 - ff 01 - inc [ecx]<br />Call SetProcess("Hellgate:London(x86 DX10)")<br />Call WriteXBytes(&H5FA3F6, "ff 01")<br />end sub
ich hoffe mal mir kann einer weiterhelfen thx im vorraus schonmal
mfg
edit ... naja ich habe gemerkt .. das hellgate london sich da iwie in der memory nich rumfuchsen lässt .. -.- _________________