Inserting Pointers into Visual Basic 2010
hi guys
I have looked around and couldn't find anything on this so i wanted to ask how would i insert the address of a pointer - "server.dll"+0072C39C offset hex 30 into visual basic oh and the address aswell. like this is what i tried to do but no luck :P
Code:
If CheckBox1.CheckState = CheckState.Checked Then
Call writealong("Left 4 Dead 2", "server.dll+72C410",1901c410, 1)
End If
[highlight=vb.net]Private Function GetModuleAddress(ByVal processName As String, ByVal moduleName As String) As IntPtr
If Process.GetProcessesByName(processName).Length > 0 Then
For Each m As ProcessModule In Process.GetProcessesByName(processName)(0).Modules
If m.ModuleName = moduleName Then Return m.BaseAddress
Next
End If
Return IntPtr.Zero
End Function[/highlight]
Usage:
[highlight=vb.net]Dim processName As String = "Left 4 Dead 2"
WriteALong(processName, GetModuleAddress(processName, "server.dll").ToInt32 + &H72C410, someValue)[/highlight]