Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How do you change the process during runtime?
- I've added a function called "SetProcessName" which allows you to do that.
- Example:
- Code:
- SetProcessName("iw6sp64_ship")
- How do you know what the current process is set to?
- Use the "GetCurrentProcessName" function.
- How do I know if the process/game is open?
- There's a function called "UpdateProcessHandle" which returns a boolean saying if the game is active or not.
- Example (in a timer):
- Code:
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- If UpdateProcessHandle() Then ' Check if the game is running
- ' Do stuff here, like writing/reading memory or telling a user in a Label the game is open.
- End If
- End Sub
- How do I read or write memory?
- Version 1 of the memory module made things a little complicated for writing memory but this version tries to fix that. To read or write memory, you use the "ReadMemory" or "WriteMemory" functions.
- ' Reads the value from 0x12345678 as an Integer
- Dim myIntValue As Integer = ReadMemory(Of Integer)(&H12345678)
- ' Reads the value from 0x12345678 as a Single (remember that Single is the same as Float)
- Dim myFloatValue As Single = ReadMemory(Of Single)(&H12345678)
- ' Reads 10 characters at 0x12345678 as an ASCII String
- Dim myASCIIStringValue As String = ReadMemory(Of String)(&H12345678, 10, False)
- ' Reads 10 characters at 0x12345678 as a Unicode String
- Dim myUnicodeStringValue As String = ReadMemory(Of String)(&H12345678, 10, True)
- ' Reads 12 bytes from 0x12345678
- Dim myByteData() As Byte = ReadMemory(&H12345678, 12)
- ' Writes 10 as an Integer to 0x12345678
- WriteMemory(Of Integer)(&H12345678, 10)
- ' Writes 0.5 as a Single/Float to 0x12345678
- WriteMemory(Of Single)(&H12345678, 0.5)
- ' Writes Hello World as an ASCII string to 0x12345678 (the + vbNullChar erases the rest of the old string)
- WriteMemory(Of String)(&H12345678, "Hello World" + vbNullChar, False)
- ' Writes Hello World as a Unicode string to 0x12345678 (the + vbNullChar erases the rest of the old string)
- WriteMemory(Of String)(&H12345678, "Hello World" + vbNullChar, True)
- ' Writes '0x90, 0x90, 0x90, 0x90' as a byte array to 0x12345678
- WriteMemory(&H12345678, New Byte() { &H90, &H90, &H90, &H90 })
- How do I read or write a number into memory if I'm going to get it from a textbox or a string?
- Since VB.NET (by default) doesn't care much about types (they are converted automatically), you should be able to get away with this:
- ' Reads the integer from the address inside TextBox1 (warning: the string must start with &H if its an address/hex value)
- Dim myIntValue As Integer = ReadMemory(Of Integer)("&H" + TextBox1.Text)
- ' Writes the value from TextBox1 into 0x12345678 as an integer
- WriteMemory(Of Integer)(&H12345678, TextBox1.Text)
- ' Writes the value from TextBox1 into 0x12345678 as a single/float
- WriteMemory(Of Single)(&H12345678, TextBox1.Text)
- ' Writes 10 into the address inside TextBox1 as an integer (warning: the string must start with &H if its an address/hex value)
- WriteMemory(Of Integer)("&H" + TextBox1.Text, 10)
- What's the difference between a ASCII and Unicode string?
- Unicode strings use 2 bytes for every letter it uses and ASCII only uses 1 byte for every letter. If you find a string in memory with Cheat Engine with the Unicode box unticked then it's a ASCII string. If the Unicode box is ticked then it's a Unicode string.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement