[Help]function problem
k, what im using is:
at the top of my module:
function:
what i was trying to get it to do, is pull the xp amount and save the address and value to a setting.
then at a button click on my form, this:
can anybody explain why this is not working?
at the top of my module:
Code:
Private Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Code:
public Function checkMemory(ByVal Address As Integer, ByVal Value As Long, ByVal Bytes As Integer)
Dim iw4mpLookUp As Process() = Process.GetProcessesByName("iw4mp")
If iw4mpLookUp.Length = 0 Then
End
End If
Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, iw4mpLookUp(0).Id)
ReadProcessMemory(processHandle, Address, Value, Bytes, Nothing)
My.Settings.address = Value
My.Settings.check = address
CloseHandle(processHandle)
Return Nothing
End Function
then at a button click on my form, this:
Code:
For Each exp As String In My.Settings.xp
Dim address As String
address = My.Settings.check
checkMemory()
If My.Settings.check = exp And address = &H1B2C89C Then
Select Case txtequip1.Text
Case "Frag Grenade - 4"
If value <= 3600 Then
memoryh4x(&H1B2C89C, 3600, 4)
End If
End select
End If
end sub
