Get ModulBase Address
Hello,
i've a problem by getting an certain baseaddress from hl2.exe.
I'm searching for the BaseAddress in "client.dll" an tried following code:
But this returns simply "nothing" to me.
Is the problem my x64 OS or how can i fix this?
Thanks!
i've a problem by getting an certain baseaddress from hl2.exe.
I'm searching for the BaseAddress in "client.dll" an tried following code:
Code:
Imports System.Runtime.InteropServices
Public Class Form1
Public SpielName As String = "hl2" 'GAME NAME
Public ModuleName As String = "client.dll"
Public Prozess As Process
Public ModuleBase As Integer
Sub ProzessName(ByRef Prozess As Process, ByRef ModuleBase As String)
Dim BaseAdresse As String
Dim BaseAdresseHex As Integer
Try
Dim p As Process = Process.GetProcessesByName(SpielName)(0)
For Each Module1 As System.Diagnostics.ProcessModule In p.Modules
If Module1.FileName.IndexOf(ModuleName) <> -1 Then
BaseAdresse = Module1.BaseAddress.ToString
Prozess = p
End If
Next
Label1.Text = "Module: OK"
Catch ex As Exception
Label1.Text = "Module: ERROR"
End Try
BaseAdresseHex = BaseAdresse
ModuleBase = Convert.ToString(BaseAdresseHex, 16)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ProzessName(Prozess, ModuleName)
End Sub
End Class
Is the problem my x64 OS or how can i fix this?
Thanks!
