De Visual Basic 6.0 A Visual Basic 2008

Iniciado por Dari0s, 23 Enero 2009, 20:12 PM

0 Miembros y 1 Visitante están viendo este tema.

Dari0s

Hola.!

alguien sabe puede y tiene el tiempo necesario (no creo que se lleve mucho) para pasar este codigo a Visual Basic 2008? (esta hecho en visual basic 6.0)

ojala alguien pueda aqui os dejo el code:

Private Declare Function VirtualProtectEx Lib "kernel32" (ByVal hProcess As Long, lpAddress As Any, ByVal dwSize As Long, ByVal flNewProtect As Long, lpflOldProtect As Long) 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 Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As Long, lpdwProcessId As Long) As Long
Private Const PAGE_WRITECOPY = &H8&
Private Const PROCESS_ALL_ACCESS = &H1F0FFF

Private Sub Form_Load()
    Dim hWnd As Long, lngPID As Long, hProcess As Long
    Dim lngOldProt As Long
    Dim lngData As Long, lngWritten As Long
    hWnd = FindWindow(vbNullString, "Cheat Engine 5.2")
    If hWnd > 0 Then
        Call GetWindowThreadProcessId(hWnd, lngPID)
        hProcess = OpenProcess(PROCESS_ALL_ACCESS, False, lngPID)
        If hProcess <> 0 Then
            lngData = 1092616192
            If VirtualProtectEx(hProcess, ByVal &H400000, LenB(lngData), PAGE_WRITECOPY, lngOldProt) <> 0 Then
                If WriteProcessMemory(hProcess, ByVal &H400000, lngData, LenB(lngData), lngWritten) <> 0 Then
                    Call MsgBox("Success!" & vbCrLf & lngWritten & " bytes written.")
                End If
            End If
            Call CloseHandle(hProcess)
        End If
    End If
End Sub


ese es .. ojala laguien pueda  :xD

seba123neo

es lo mismo, cambia los long por integer...
La característica extraordinaria de las leyes de la física es que se aplican en todos lados, sea que tú elijas o no creer en ellas. Lo bueno de las ciencias es que siempre tienen la verdad, quieras creerla o no.

Neil deGrasse Tyson