Results 1 to 5 of 5
  1. #1
    excode88's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    My Mood
    Yeehaw

    VB 2010 Questions

    Hey i was wondering if there was a way to convert a Trainer Making Module from VB6 to VB 2010, works perfectly in VB 6 but gets tons of errors in 2010 im very new to programming and would like to get back into it. Thanks for your time.
    Code:
    Option Explicit
    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
    Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As Long, lpdwProcessId As Long) As Long
    Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
    Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
    Private Declare Function ReadProcessMem Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
    Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
    Public FindGame As Long
    Public Sub WriteAByte(Address As Long, Value As Byte)
    Dim pId&, pHandle&
    If FindGame = 0 Then Exit Sub
    GetWindowThreadProcessId FindGame, pId
    pHandle = OpenProcess(&H1F0FFF, False, pId)
    If pHandle = 0 Then Exit Sub
    WriteProcessMemory pHandle, Address, Value, 1, 0&
    CloseHandle pHandle
    End Sub
    Public Function ReadAscii(StartAddress As Long, EndAddress As Long) As String
    Dim Address As Long, data As Integer
      For Address = StartAddress To EndAddress
      data = ReadAByte(Address, 1)
          If data <= 0 Then Exit For
              ReadAscii = ReadAscii & Chr(data)
    Next Address
    End Function
    Public Sub WriteAscii(StartAddress As Long, WhatToWrite As String)
      Dim Go As Long
      For Go& = 0 To (Len(WhatToWrite) - 1)
      Call WriteAByte((StartAddress + Go), Asc(Mid$(WhatToWrite, Go + 1)))
      Next Go&
      Call WriteAByte(StartAddress + Len(WhatToWrite), 0)
    End Sub
    Public Sub SetGame(WindowCaption As String)
      FindGame = FindWindow(vbNullString, WindowCaption)
    End Sub
    Public Sub RawReadWrite(ReadAddress As Long, WriteAddress As Long)
    Dim pId&, pHandle&, data&
    Dim E As Integer
    If FindGame = 0 Then Exit Sub
    GetWindowThreadProcessId FindGame, pId
    pHandle = OpenProcess(&H1F0FFF, False, pId)
    If pHandle = 0 Then Exit Sub
    For E = 1 To 4
    ReadProcessMem pHandle, ReadAddress, data, 4, 0&
    WriteProcessMemory pHandle, WriteAddress, data, 4, 0&
    ReadAddress = ReadAddress + 4
    WriteAddress = WriteAddress + 4
    Next E
    End Sub
    Public Sub ReadWrite(ReadAddress As Long, WriteAddress As Long, Bytes As Integer)
    SetGame ("Minesweeper")
    Dim E As Integer
    Dim P As Long
    Dim XP As Long
    Dim PX As Long
    XP = WriteAddress
    PX = ReadAddress
    For E = 1 To (Bytes / 4)
    P = ReadALong(PX, 0)
    Call WriteALong(XP, P)
    XP = XP + 4
    PX = PX + 4
    Next E
    End Sub
    Public Function WriteALong(Address As Long, Value As Long)
    Dim pId&, pHandle&
    If FindGame = 0 Then Exit Function
    GetWindowThreadProcessId FindGame, pId
    pHandle = OpenProcess(&H1F0FFF, False, pId)
    If pHandle = 0 Then Exit Function
    WriteProcessMemory pHandle, Address, Value, 4, 0&
    CloseHandle pHandle
    End Function
    Public Function ReadALong(Address As Long, ByteBuffer As Long)
    Dim pId&, pHandle&
    If FindGame = 0 Then Exit Function
    GetWindowThreadProcessId FindGame, pId
    pHandle = OpenProcess(&H1F0FFF, False, pId)
    If pHandle = 0 Then Exit Function
    ReadProcessMem pHandle, Address, ByteBuffer, 4, 0&
    ReadALong = ByteBuffer
    CloseHandle pHandle
    End Function
    Public Function ReadAByte(Address As Long, ByteBuffer As Byte)
    Dim pId&, pHandle&
    If FindGame = 0 Then Exit Function
    GetWindowThreadProcessId FindGame, pId
    pHandle = OpenProcess(&H1F0FFF, False, pId)
    If pHandle = 0 Then Exit Function
    ReadProcessMem pHandle, Address, ByteBuffer, 1, 0&
    ReadAByte = ByteBuffer
    CloseHandle pHandle
    End Function
    Public Function WriteAInt(Address As Long, Value As Integer)
    Dim pId&, pHandle&
    If FindGame = 0 Then Exit Function
    GetWindowThreadProcessId FindGame, pId
    pHandle = OpenProcess(&H1F0FFF, False, pId)
    If pHandle = 0 Then Exit Function
    WriteProcessMemory pHandle, Address, Value, 1, 0&
    CloseHandle pHandle
    End Function
    Public Function ReadAInt(Address As Long, ByteBuffer As Integer)
    Dim pId&, pHandle&
    If FindGame = 0 Then Exit Function
    GetWindowThreadProcessId FindGame, pId
    pHandle = OpenProcess(&H1F0FFF, False, pId)
    If pHandle = 0 Then Exit Function
    ReadProcessMem pHandle, Address, ByteBuffer, 2, 0&
    ReadAInt = ByteBuffer
    CloseHandle pHandle
    End Function

  2. #2
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    Use Phenix module maker. It's for vb 2008/2010



  3. The Following 2 Users Say Thank You to Blubb1337 For This Useful Post:

    excode88 (05-26-2010),Obama (05-26-2010)

  4. #3
    excode88's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    My Mood
    Yeehaw
    Thanks, just tested it out and it works perfectly.

  5. #4
    Obama's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    The Black house
    Posts
    22,195
    Reputation
    870
    Thanks
    6,076
    My Mood
    Cool
    Anymore questions or can I close?

  6. #5
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    I think so.



Similar Threads

  1. WPE Pro Question...
    By OutZida in forum General Game Hacking
    Replies: 4
    Last Post: 08-08-2011, 01:02 AM
  2. [Request] question on vb 2010 (account phishers)
    By need_for_help in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 8
    Last Post: 08-05-2011, 01:18 PM
  3. Hacking world of warcraft? & a noob question
    By arsholio in forum General Game Hacking
    Replies: 9
    Last Post: 04-08-2006, 01:55 PM
  4. Photoshop Question
    By arunforce in forum Art & Graphic Design
    Replies: 6
    Last Post: 01-15-2006, 11:38 AM
  5. question
    By wardo1926 in forum WarRock - International Hacks
    Replies: 0
    Last Post: 12-30-2005, 07:36 PM