How can i use the ReadProcessMemory-API in Windows7 64bit?
Quote:
Public Class Form1
Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
Public Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
Public myProcesses As Process() = Process.GetProcessesByName("...")
Public processid As Integer = myProcesses(0).Id
Public processHandle = OpenProcess(16, True, processid)
Dim RestlicheHp As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ReadProcessMemory(processHandle, &H..., RestlicheHp, 4, 0)
MsgBox(RestlicheHp)
End Sub
End Class






