Results 1 to 5 of 5
  1. #1
    Pepsi-'s Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    76

    Thumbs up Can't fix the problem...

    Well im working on my first little trainer (im not done yet) but every time i want to test it, this happens:



    can somebody maybe tell me the problem or help me please?

    (I know im a noobie and this might seem lame to you guys but it's my first one)

    Here are the codes:

    NUMBER 1

    Code:
    Imports System.Runtime.InteropServices
    
    Public Class Mw3_Trainer
        <Flags()> _
        Public Enum ProcessAccessType
            PROCESS_TERMINATE = (&H1)
            PROCESS_CREATE_THREAD = (&H2)
            PROCESS_SET_SESSIONID = (&H4)
            PROCESS_VM_OPERATION = (&H8)
            PROCESS_VM_READ = (&H10)
            PROCESS_VM_WRITE = (&H20)
            PROCESS_DUP_HANDLE = (&H40)
            PROCESS_CREATE_PROCESS = (&H80)
            PROCESS_SET_QUOTA = (&H100)
            PROCESS_SET_INFORMATION = (&H200)
            PROCESS_QUERY_INFORMATION = (&H400)
        End Enum
        <DllImport("kernel32.dll")> _
        Public Shared Function OpenProcess(ByVal dwDesiredAccess As UInt32, ByVal bInheritHandle As Int32, ByVal dwProcessId As UInt32) As IntPtr
        End Function
        <DllImport("kernel32.dll")> _
        Public Shared Function CloseHandle(ByVal hObject As IntPtr) As Int32
        End Function
        <DllImport("kernel32.dll")> _
        Public Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesRead As IntPtr) As Int32
        End Function
        <DllImport("kernel32.dll")> _
        Public Shared Function WriteProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
        End Function
    
    
        Public Function Hack(ByVal Application As String) As Boolean
            Dim pArray As Process() = Process.GetProcessesByName(Application)
            If pArray.Length = 0 Then
                Return True
            End If
            ReadProcess = pArray(0)
            Open()
            Return False
        End Function
        Public Sub SetInt(ByVal Address As Integer, ByVal Value As Integer)
            Dim byteswritten As Integer
            Write(Address, BitConverter.GetBytes(Value), byteswritten)
        End Sub
    
    
        Public Sub SetByte(ByVal Address As Integer, ByVal Value As Byte())
            Dim byteswritten As Integer
            Write(Address, Value, byteswritten)
        End Sub
    
    
        Private Property ReadProcess() As Process
            Get
                Return m_ReadProcess
            End Get
            Set(ByVal value As Process)
                m_ReadProcess = value
            End Set
        End Property
        Private m_ReadProcess As Process = Nothing
        Private m_hProcess As IntPtr = IntPtr.Zero
        Private Sub Open()
            Dim access As ProcessAccessType
            access = ProcessAccessType.PROCESS_VM_READ Or ProcessAccessType.PROCESS_VM_WRITE Or ProcessAccessType.PROCESS_VM_OPERATION
            m_hProcess = OpenProcess(CUInt(access), 1, CUInt(m_ReadProcess.Id))
        End Sub
        Private Sub CloseHandle()
            Dim iRetValue As Integer
            iRetValue = CloseHandle(m_hProcess)
            If iRetValue = 0 Then
                Throw New Exception("CloseHandle failed")
            End If
        End Sub
        Private Sub Write(ByVal MemoryAddress As IntPtr, ByVal bytesToWrite As Byte(), ByRef bytesWritten As Integer)
            Dim ptrBytesWritten As IntPtr
            WriteProcessMemory(m_hProcess, MemoryAddress, bytesToWrite, CUInt(bytesToWrite.Length), ptrBytesWritten)
            bytesWritten = ptrBytesWritten.ToInt32()
        End Sub
    
        Sub SetInt(p1 As Integer, mylist As Integer)
            Throw New NotImplementedException
        End Sub
    
    End Class
    Number 2

    Code:
    Public Class Form1
    
        Dim MW3 As New Mw3_Trainer
    
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            MW3.Hack("iw5mp")
            MW3.SetInt(&H1DC04C8, MaskedTextBox1.Text)
        End Sub
    
    
        Private MyList As Integer() = {0, 300, 1200, 2700, 4800}
        Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
            MW3.Hack("iw5mp")
            MW3.SetInt(&H1DC02B8, MyList(ComboBox1.SelectedIndex))
        End Sub
    End Class
    Last edited by Jorndel; 03-27-2013 at 02:37 AM.

  2. #2
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,681
    Reputation
    905
    Thanks
    18,676
    My Mood
    Angelic
    /Fixed Image

    It's mostly like because the input is wrong.
    Ensure you use numbers only.

    (I'll check the code)


    Remove this part: (Memory Class, you added it by mistake)
    Code:
    Sub SetInt(p1 As Integer, mylist As Integer)
            Throw New NotImplementedException
        End Sub
    Ensure you put the address. (&H123) to the correct value
    Last edited by Jorndel; 03-27-2013 at 02:44 AM.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  3. #3
    Pepsi-'s Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    76
    Ok! Thank you for checking it over!

  4. #4
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,681
    Reputation
    905
    Thanks
    18,676
    My Mood
    Angelic
    Quote Originally Posted by Pepsi- View Post
    Ok! Thank you for checking it over!
    Let me know if it's solved or if you need any further help

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  5. #5
    Pepsi-'s Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    76
    Ok, it's working now Thanks for the help once again

Similar Threads

  1. How can I fix the wheel?
    By ortax in forum Combat Arms Help
    Replies: 7
    Last Post: 10-24-2011, 10:23 PM
  2. I can't find the problem?
    By dem106 in forum WarRock Help
    Replies: 4
    Last Post: 04-17-2010, 11:59 AM
  3. THis may fix the problem with FZHook that u guys have been having
    By falzarex in forum Alliance of Valiant Arms (AVA) Hacks & Cheats
    Replies: 20
    Last Post: 01-04-2010, 11:40 PM
  4. I Fixed the new bypass problem
    By GeoForReal in forum Combat Arms Hacks & Cheats
    Replies: 6
    Last Post: 09-01-2008, 11:53 AM
  5. [Pls dave, Fix it!!] U can't use the trainers made in CE? read this!!
    By juanitobalde in forum WarRock - International Hacks
    Replies: 4
    Last Post: 04-24-2007, 02:27 PM