Memory Modul IntPtr Handle

01/11/2016 19:27 Waller66#1
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 :/
01/12/2016 11:32 Biesi#2
Quote:
Originally Posted by Waller66 View Post
klappt natürlich nicht ^^
Ist ja eine genaue Beschreibung deines Problems.. Was willst du mit der base address denn machen?
01/12/2016 19:45 anonymous-29742#3
In VB.NET selbst kann man keine DLL schreiben, die dann in ein anderes Programm injiziert wird, weil die VB-DLL eine Assembly mit IL-Code ist und keine native DLL.

Also.. NEIN es geht nicht in VB.
Schau mal bei C++ ^^

MFG #Lucas#
01/15/2016 01:33 Requi#4
Quote:
Originally Posted by #Lucas# View Post
In VB.NET selbst kann man keine DLL schreiben, die dann in ein anderes Programm injiziert wird, weil die VB-DLL eine Assembly mit IL-Code ist und keine native DLL.

Also.. NEIN es geht nicht in VB.
Schau mal bei C++ ^^

MFG #Lucas#
Wollen wir wetten, dass ich dir eine managed DLL über kleine Umwege auch in einen nativen Prozess bekomme?
01/16/2016 10:38 0ptimist#5
Teste mal die Funktion "[Only registered and activated users can see links. Click Here To Register...]" aus der WinAPI.
[Only registered and activated users can see links. Click Here To Register...] das Feld "lpBaseOfDll" aus der MODULEINFO enthält dann "The load address of the module.".