Visual Basic Forum

Visual Basic Forum
für VB6 und VB.NET Programmierer
 
RegistrierenRegistrieren  LoginLogin

Neues Thema eröffnen   Neue Antwort erstellen    Visual Basic Forum Foren-Übersicht -> [VB6] Fragen - Antworten
Autor
Nachricht
Darkraiser
Newbie
Newbie

Anmeldedatum: 02.05.2008
Beiträge: 3

Memory Value Inc
Verfasst am: 03.07.2009, 13:25

so ich stehe vor nem kleinen problem ich weis nicht obs am logischen hapert .. bzw mir Very Happy 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 Very Happy thx im vorraus schonmal

mfg

edit ... naja ich habe gemerkt .. das hellgate london sich da iwie in der memory nich rumfuchsen lässt .. -.-
_________________
 
Neues Thema eröffnen   Neue Antwort erstellen    Visual Basic Forum Foren-Übersicht -> [VB6] Fragen - Antworten

Tags: write process, process memory, value

 
 Verwandte Themen   Aufrufe   Letzter Beitrag 
Keine neuen Beiträge Problem mit always on top funktion 659 30.10.2009, 12:26
Keine neuen Beiträge IntStr()funktion 549 11.10.2007, 09:49
Keine neuen Beiträge TopMost Funktion unter DirectX 463 27.07.2007, 11:48
Keine neuen Beiträge Wie Funktion nutzen ? 574 29.06.2007, 21:59
Keine neuen Beiträge update funktion einbauen 776 29.01.2007, 00:11
 



[ Time: 0.3114s ][ Queries: 81 (0.1018s) ][ GZIP on - Debug on ]