Hallo ich suche nach einer Methode womit ich später auf die Adresse aus einem Dll Modul eines Prozesses zugreifen kann.
Wie bezieht man das auf eine dll datei ?
Dim p As New Process ' erstellt zuvor den prozess meiner wahl
Dim pID As IntPtr = p.Handle
Dim underhandle As IntPtr = p.Modules("modul.DLL").BaseAddress ' würde das klappen ???
Dim base As IntPtr = p.MainModule.BaseAddress ' also das klappt aber bringt mir nichts :D
klappt natürlich nicht ^^
ich bedanke mich schonmal im vorraus für eure hilfe
will halt nen pointer mit offsets eines moduls auslesen können :)
Public Function RetBase(ByVal ProcName As String, ByVal ModuleName As String) As Integer
Dim P As Process() = Process.GetProcessesByName(ProcName)
If (P.Length <> 0) Then
Dim pMod As ProcessModuleCollection = P(0).Modules
For i As Integer = pMod.Count - 1 To 0 Step -1
If pMod.Item(i).FileName.EndsWith(ModuleName) Then
Return pMod.Item(i).BaseAddress.ToInt32
End If
Next i
End If
Return 0
End Function
Private Sub readoutpointer()
' I'm assuming p is a Process object that represents the game process.
Dim p = Process.GetProcessesByName("processname")(0)
MsgBox(p.Modules.ToString)
Dim pID As IntPtr = p.Handle
Dim underhandle As IntPtr = RetBase("processname", "test.dll")
Dim base As IntPtr = p.MainModule.BaseAddress
'MsgBox(base.ToString)
' And our offsets...
Dim offsets() As IntPtr = {&H8C, &H0, &HBC, &H1C, &H20}
Dim addr As IntPtr = FindAddress(pID, base, underhandle, offsets)
' MsgBox(addr.ToString)
End Sub
klappt leider nicht :/
Wie bezieht man das auf eine dll datei ?
Dim p As New Process ' erstellt zuvor den prozess meiner wahl
Dim pID As IntPtr = p.Handle
Dim underhandle As IntPtr = p.Modules("modul.DLL").BaseAddress ' würde das klappen ???
Dim base As IntPtr = p.MainModule.BaseAddress ' also das klappt aber bringt mir nichts :D
klappt natürlich nicht ^^
ich bedanke mich schonmal im vorraus für eure hilfe
will halt nen pointer mit offsets eines moduls auslesen können :)
Public Function RetBase(ByVal ProcName As String, ByVal ModuleName As String) As Integer
Dim P As Process() = Process.GetProcessesByName(ProcName)
If (P.Length <> 0) Then
Dim pMod As ProcessModuleCollection = P(0).Modules
For i As Integer = pMod.Count - 1 To 0 Step -1
If pMod.Item(i).FileName.EndsWith(ModuleName) Then
Return pMod.Item(i).BaseAddress.ToInt32
End If
Next i
End If
Return 0
End Function
Private Sub readoutpointer()
' I'm assuming p is a Process object that represents the game process.
Dim p = Process.GetProcessesByName("processname")(0)
MsgBox(p.Modules.ToString)
Dim pID As IntPtr = p.Handle
Dim underhandle As IntPtr = RetBase("processname", "test.dll")
Dim base As IntPtr = p.MainModule.BaseAddress
'MsgBox(base.ToString)
' And our offsets...
Dim offsets() As IntPtr = {&H8C, &H0, &HBC, &H1C, &H20}
Dim addr As IntPtr = FindAddress(pID, base, underhandle, offsets)
' MsgBox(addr.ToString)
End Sub
klappt leider nicht :/