acabo de ver este post y al parecer veo la solucion a mi problema jeje..
pero en el codigo hay un problema creo yo.. esque tambien soy novato
aver si no me enrredo mucho...
Todo el codigo va en el codigo del la aplicacion?
O algo de el codigo va en un modulo de clase o modulo normal?
Código
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long 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 Function WriteMemory(ByVal Offset As Long, ByVal ProcessID As Long, ByVal Value As Long, ByVal NumBytes As Long) As Boolean Const PROCESS_VM_OPERATION As Long = &H8 Const PROCESS_VM_WRITE As Long = &H20 Dim ProcessHandle As Long ProcessHandle = OpenProcess(PROCESS_VM_WRITE Or PROCESS_VM_OPERATION, False, ProcessID) If ProcessHandle = 0 Then MsgBox "No se encuentra el proceso", vbCritical, "Error de Lectura" Exit Function End If Dim exito As Boolean exito = WriteProcessMemory(ProcessHandle, Offset, Value, NumBytes, 0) CloseHandle (ProcessHandle) WriteMemory = exito End Function Private Sub Form_Load() Dim MiArray(4) As Byte MiArray(0) = &H11 MiArray(1) = &H22 MiArray(2) = &H33 MiArray(3) = &H44 MiArray(4) = &H55 Dim exito As Boolean exito = WriteMemory(&H400000, GetCurrentProcessId(), VarPtr(MiArray(0)), 5) End Sub
lo puse todo en el code del programa pero no se donde poner el nombre del proceso a editar la memoria.. me podrian decir donde va?
porfavor y gracias.. ojala me sirva... si tengo otra duda se las escribo bai..