Results 1 to 4 of 4
  1. #1
    vnexustr26's Avatar
    Join Date
    Jun 2019
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    1

    Question Visual Basic Coding / Not Working Multi-Pointer & Offset

    Edit New: I solved the problem myself. You can close the topic. <3







    Hi, I'm having a little trouble.

    I could share a picture and source code. Can you correct my mistake?



    Code:
    Module Module1
    
        Private Declare Function ReadMemory2Byte Lib "kernel32" Alias "ReadProcessMemory" (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Integer, Optional ByVal Size As Integer = 2, Optional ByRef Bytes As Integer = 0) As Integer
    
        Private Declare Function WriteMemory2Byte Lib "kernel32" Alias "WriteProcessMemory" (ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Integer, Optional ByVal Size As Integer = 2, Optional ByRef Bytes As Integer = 0) As Integer
    
        Public Function Read2Byte(ByVal EXENAME As String, ByVal Address As Integer) As Integer
            Dim Value As Integer
            If Process.GetProcessesByName(EXENAME).Length <> 0 Then
                Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
                If Handle <> 0 Then
                    ReadMemory2Byte(Handle, Address, Value)
                End If
            End If
            Return Value
        End Function
    
        Public Function ReadPointer2Byte(ByVal EXENAME As String, ByVal Pointer As Integer, ByVal ParamArray Offset As Integer()) As Integer
            Dim Value As Integer
            If Process.GetProcessesByName(EXENAME).Length <> 0 Then
                Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
                If Handle <> 0 Then
                    For Each I As Integer In Offset
                        ReadMemory2Byte(Handle, Pointer, Pointer)
                        Pointer += I
                    Next
                    ReadMemory2Byte(Handle, Pointer, Value)
                End If
            End If
            Return Value
        End Function
    
        Public Sub Write2Byte(ByVal EXENAME As String, ByVal Address As Integer, ByVal Value As Integer)
            If Process.GetProcessesByName(EXENAME).Length <> 0 Then
                Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
                If Handle <> 0 Then
                    WriteMemory2Byte(Handle, Address, Value)
                End If
            End If
        End Sub
    
        Public Sub WritePointer2Byte(ByVal EXENAME As String, ByVal Pointer As Integer, ByVal Value As Integer, ByVal ParamArray Offset As Integer())
            If Process.GetProcessesByName(EXENAME).Length <> 0 Then
                Dim Handle As Integer = Process.GetProcessesByName(EXENAME)(0).Handle
                If Handle <> 0 Then
                    For Each I As Integer In Offset
                        WriteMemory2Byte(Handle, Pointer, Pointer)
                        Pointer += I
                    Next
                    WriteMemory2Byte(Handle, Pointer, Value)
                End If
            End If
        End Sub
            
        End Module
    Last edited by vnexustr26; 06-09-2019 at 08:32 AM. Reason: I added a description

  2. The Following User Says Thank You to vnexustr26 For This Useful Post:

    Arthur4 (05-09-2023)

  3. #2
    vnexustr26's Avatar
    Join Date
    Jun 2019
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    1
    I solved the problem myself. You can close the topic. <3

  4. #3
    Ticherhaz's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Location
    Malaysia
    Posts
    6,564
    Reputation
    1376
    Thanks
    1,297
    My Mood
    Inspired
    Quote Originally Posted by vnexustr26 View Post
    I solved the problem myself. You can close the topic. <3
    How did you solve it?
    Anything can PM me. I'm from Malaysia.

  5. #4
    vnexustr26's Avatar
    Join Date
    Jun 2019
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    1
    NewReadMemory: Label4.Text = ReadPointer4Byte("start", MyAddress + &H1D4FDE4, &HC, &H1B82).ToString

    Step 1: I found pID address and pulled adress = MyAddress

    Step 2: I got the value of 4Byte, not 2Byte. (The 4Byte value changes randomly.)

    Step 3: I looped through the timer with commands like If-Else. (I added a value to a randomly changing 4Byte value.)

    Example: 56464665 [Random 4Byte Value for default Attack Speed (2Byte=16290)] -> 56464925 [Random 4Byte Value for +260 Attack Speed (2Byte=16550)]

    It was easy

    Edit: Thank you to everyone who is stingy and does not help. ^^
    --->>> If you ask why you said that. -> It was those who wanted money for a little help. ^^
    Last edited by vnexustr26; 06-09-2019 at 08:46 AM.

Similar Threads

  1. [Visual Basic]Code SDK
    By NextGen1 in forum Open Source Releases
    Replies: 66
    Last Post: 04-13-2013, 04:58 PM
  2. Visual Basic Coding Team
    By Bombsaway707 in forum Combat Arms Discussions
    Replies: 3
    Last Post: 07-10-2010, 07:09 AM
  3. [TUTORIAL'S]Visual Basic Coding
    By Zoom in forum Combat Arms EU Hack Coding/Source Code
    Replies: 4
    Last Post: 04-13-2010, 02:32 PM
  4. visual basic coding
    By frendlyfire in forum General
    Replies: 5
    Last Post: 12-28-2009, 01:32 PM
  5. [ Help ] VB6 Coding not working
    By ilovepie21 in forum Visual Basic Programming
    Replies: 17
    Last Post: 03-28-2008, 10:22 PM