Hi all
i am not good programer & and i'm totally new to this accessing other programs memory
I am making Admin tool using VB 2008 for MW2 1.0.182 (AlterIW 1.3.37 version)
with options like
+Change Map
+Maplist
+Change Game Mode
+Restart Map & Fast restart
+Kick Players
+Ban Player
+Force host
+InGame Console Commands
+Changing Scorelimit & TimeLimt
+Profile Backup & Restore
+Sending Welcome & Warning to all Players
+Nickname Editor with coloured name
+Costume Server List
+Show FPS & Changing default 4 ping bars to 10 bar
+Custume Commands
i can send data from my app to the console & etc by Sending text commands to console window textbox
i Know we can show messages in game by editing 00A21028 of iw4mp.exe (Displays string as Chat message)
the problem i am facing is getting players list for Kick And TempBan function
1)i know Clientinfo is at 0x8EB248 (but have no idea how to get that info to my app as a string & also the client No.)
(Memory address as per This Post)
2)how to detect if the user is a host or not & if yes then he is in game or has returned to the lobby
3) Sending String to 00A21028 memory location
Plz Guys i would be greatful if any one can can give tutorial or code for it.
Thanks
Shailm_85
Ok Guys i was able to read Write integer date but wasnt able to read String
What i'm trying to is reading ClientInfo from Modern Warfare 2
As per This post it is a structure
Can Any one help ????
hire is the code i try but didn't work.
And also what the diffrence between these Addressing type 0x8EB248, iw4mp.exe+621028, 00437C4C
and how do i use this in Vb 2008
i am not good programer & and i'm totally new to this accessing other programs memory
I am making Admin tool using VB 2008 for MW2 1.0.182 (AlterIW 1.3.37 version)
with options like
+Change Map
+Maplist
+Change Game Mode
+Restart Map & Fast restart
+Kick Players
+Ban Player
+Force host
+InGame Console Commands
+Changing Scorelimit & TimeLimt
+Profile Backup & Restore
+Sending Welcome & Warning to all Players
+Nickname Editor with coloured name
+Costume Server List
+Show FPS & Changing default 4 ping bars to 10 bar
+Custume Commands
i can send data from my app to the console & etc by Sending text commands to console window textbox
i Know we can show messages in game by editing 00A21028 of iw4mp.exe (Displays string as Chat message)
the problem i am facing is getting players list for Kick And TempBan function
1)i know Clientinfo is at 0x8EB248 (but have no idea how to get that info to my app as a string & also the client No.)
(Memory address as per This Post)
2)how to detect if the user is a host or not & if yes then he is in game or has returned to the lobby
3) Sending String to 00A21028 memory location
Plz Guys i would be greatful if any one can can give tutorial or code for it.
Thanks
Shailm_85
Ok Guys i was able to read Write integer date but wasnt able to read String
What i'm trying to is reading ClientInfo from Modern Warfare 2
As per This post it is a structure
Can Any one help ????
hire is the code i try but didn't work.
Code:
Module Memory
Public GameName1 As String = "iw4mp"
Public Const PROCESS_VM_READ = &H10
Public Const PROCESS_VM_WRITE = (&H20)
Public Const PROCESS_VM_OPERATION = (&H8)
Public Const PROCESS_QUERY_INFORMATION = (&H400)
Public Const PROCESS_READ_WRITE_QUERY = PROCESS_VM_READ + PROCESS_VM_WRITE + PROCESS_VM_OPERATION + PROCESS_QUERY_INFORMATION
Public Const PROCESS_ALL_ACCESS = &H1F0FFF
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, ByVal lpdwProcessId As Long) As Long
Public Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As Long, ByRef lpBuffer As Int32, ByVal nSize As Int32, ByVal lpNumberOfBytesWritten As Int32) As Long
Public Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As Int32, ByRef lpBuffer As Byte(), ByVal nSize As Int32, ByVal lpNumberOfBytesWritten As Int32) As Long
Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As Int32, ByVal lpBuffer() As Byte, ByVal nSize As Int32, ByVal lpNumberOfBytesWritten As Int32) As Long
Public Declare Function OpenProcess Lib "kernel32.dll" (ByVal dwDesiredAccess As UInteger, ByVal bInheritHandle As Integer, ByVal dwProcessId As UInteger) As IntPtr
Public Declare Function CloseHandle Lib "kernel32.dll" (ByVal hHandle As IntPtr) As Boolean
Public Structure CClientInfo
<VBFixedString(28)> Public Unknown000 As String '//0x0
Public team As Integer '//0x1C
<VBFixedString(32)> Public Unknown001 As String '//0x20
<VBFixedString(64)> Public BodyModel As String '//0x040
<VBFixedString(64)> Public HeadModel As String '//0x080
<VBFixedString(64)> Public WeaponModel As String '//0x0C0
<VBFixedString(64)> Public WeaponModel2 As String '//0x100
<VBFixedString(1004)> Public Unknown002 As String '//0x140
End Structure
Public Function Game_Hwnd() As Int32
Dim i As Int32 : Dim foundit As Boolean = False
For Each p As Process In Process.GetProcessesByName(GameName1) ' Replace that with the games window text
i = p.Id
foundit = True : Exit For
Next
If foundit = True Then
Return i
Else
MsgBox("Couldn't find Game")
Return 0
End If
End Function
#Region "Memory reading/Writing"
'Read Memory
Public Sub ReadMemory(ByVal Address As Long, ByRef Value As Integer, ByVal Size As Integer)
Try
Dim mValue As Integer
Dim GameReadWrite As Integer
Dim PID As Integer = Game_Hwnd()
GameReadWrite = OpenProcess(PROCESS_READ_WRITE_QUERY, False, PID)
ReadProcessMemory(GameReadWrite, Address, mValue, Size, 0)
Value = mValue
CloseHandle(GameReadWrite)
Catch Ex As Exception
MsgBox(Ex.ToString)
End Try
End Sub
Public Sub ReadMemory(ByVal Address As Long, ByRef Value As String)
Try
Dim intChar As Integer
Dim Count1 As Integer
Dim strTemp As String
strTemp = String.Empty
Count1 = 10
Do
ReadMemory(Address + Count1, intChar, 1)
If intChar <> 0 Then strTemp = strTemp & Chr(intChar)
Count1 += 1
'Loop Until intChar = 0
Loop Until Count1 = 28
Value = strTemp
Catch Ex As Exception
MsgBox(Ex.ToString)
End Try
End Sub
Public Sub ReadMemory(ByVal Address As Integer, ByRef Value As String, ByVal Length As Integer)
Try
Dim intChar As Integer
Dim Count1 As Integer
Dim strTemp As String
strTemp = String.Empty
For Count1 = 0 To Length - 1
ReadMemory(Address + Count1, intChar, 1)
strTemp = strTemp & Chr(intChar)
Next
Value = strTemp
Catch Ex As Exception
MsgBox(Ex.ToString)
End Try
End Sub
#End Region
Function ReadInt(ByVal Address As Long)
Dim i As String
ReadMemory(Address, i)
Return i
End Function
Function ReadInt(ByVal Address As Int32, ByVal Size As Integer)
Dim i As Int32
ReadMemory(Address, i, Size)
Return i
End Function
End Module
Public Class Form1
Public GameName1 As String = "iw4mp"
Public Structure CClientInfo
<VBFixedString(28)> Public Unknown000 As String ' //0x0
Public team As Integer '//0x1C
<VBFixedString(32)> Public Unknown001 As String '//0x20
<VBFixedString(64)> Public BodyModel As String '//0x040
<VBFixedString(64)> Public HeadModel As String '//0x080
<VBFixedString(64)> Public WeaponModel As String '//0x0C0
<VBFixedString(64)> Public WeaponModel2 As String '//0x100
<VBFixedString(1004)> Public Unknown002 As String '//0x140
End Structure
Dim Addr As Integer = &H8EB248
Dim BaseAddress As Integer
Dim MyProcess As Process() = Process.GetProcessesByName(GameName1) ' Replace that with the games window text
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim MyProcess As Process() = Process.GetProcessesByName(GameName1) ' Replace that with the games window text
Dim mainModule As ProcessModule
mainModule = MyProcess(0).MainModule
BaseAddress = CInt(mainModule.BaseAddress)
BaseAddress = CInt(mainModule.BaseAddress)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'if your address you got from Cheat Engine or anything else has gamename+address then use this
'Label1.Text = ReadInt((BaseAddress + put address here))
'if it doesn't have the + then use this
'Dim CClientInfo1 As CClientInfo
TextBox1.Text = ReadInt(Addr)
End Sub
End Class
And also what the diffrence between these Addressing type 0x8EB248, iw4mp.exe+621028, 00437C4C
and how do i use this in Vb 2008


