pregunta convertir

Iniciado por thearing, 18 Marzo 2011, 18:07 PM

0 Miembros y 2 Visitantes están viendo este tema.

Cromatico

Listo quedo asi:
Public Declare Function ReadProcessMem Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, ByVal lpNumberOfBytesWritten As Long) As Long

Me devuelve algo raro :S

Te dejo todo por las dudas:
X=LONG
Call Read(&HF227D8, "CaptionVentana", X)

Funcion Read:
Public Function Read(address As Long, gamewindowtext As String, valbuffer As Long)
Dim hWnd As Long
Dim pid As Long
Dim phandle As Long
hWnd = FindWindow(vbNullString, gamewindowtext)
If (hWnd = 0) Then
Exit Function
End If
GetWindowThreadProcessId hWnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
Exit Function
End If
Dim bArrayTemp(10) As Byte
Call ReadProcessMem(phandle, address, VarPtr(bArrayTemp(0)), 10, 0&)
X = VarPtr(bArrayTemp(0))
End Function


Estoy poniendo cualquiera quizas pero cada ves que ejecuto me devuelve 2 valores diferentes en X.

Cromatico

Ya me funcionooooooooo, muchisimas gracias!!!!

raul338

Con ese codigo lo resolviste?