Go Back   Gaming Gutter > Non-Gaming > Programming > Source Code


Source Code - Have a source code/project files you want to post? Do so here.

» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» GG Stuff

Follow us on Twitter!

Get the GG toolbar today (for firefox only)
» Recent Threads
Go to first new post Board CGing?
Today 12:41 PM
by Clip
Last post by Disney
Today 02:30 PM
3 Replies, 28 Views
Go to first new post The "I've been Iced!"...
05-06-2009 08:58 PM
Last post by dantheman733
Today 02:30 PM
366 Replies, 15,660 Views
Go to first new post Giving out free ILLEGIT...
04-04-2010 07:16 PM
Last post by dantheman733
Today 02:28 PM
26 Replies, 1,036 Views
Go to first new post Shortest GG Member
Today 11:11 AM
by Purple
Last post by Damien
Today 02:18 PM
11 Replies, 59 Views
Go to first new post Let's all bond, guise.
Yesterday 10:40 PM
Last post by Hale'iwa
Today 02:00 PM
16 Replies, 154 Views
Reply
 
LinkBack (1) Thread Tools Display Modes

 [vb6] Pointer Trainer
Old 09-18-2006, 06:38 PM   1 links from elsewhere to this Post. Click to view. #1 (permalink)
Full Member

Male Thy Gamer is offline
 
Thy Gamer's Avatar
 
Join Date: Sep 2006
Location: [.:::.]
Age: 20
Posts: 277
GPoints: 347
iTrader: 0 / 0%
Thy Gamer Is a New Face in Town
Rep Power: 13
[vb6] Pointer Trainer

How to Write to a pointer
Code:
Private Const PROCESS_ALL_ACCESS As Long = &H1F0FFF

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 ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long


Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long


Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) 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


Public Function WriteLongPointer(Address As Long, Offset As Long, Value As Long, WindowName As String) As Long

    Dim hwnd As Long
    Dim ProcessID As Long
    Dim ProcessHandle As Long
    Dim Valueofpointer As Long
    Dim valueX As String
    Dim Addy
    hwnd = FindWindow(vbNullString, WindowName)


    If hwnd = 0 Then
        MsgBox "Could Not find process window!", vbCritical, "Read error"
        Exit Function
    End If

    GetWindowThreadProcessId hwnd, ProcessID
    ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, ProcessID)


    If ProcessHandle = 0 Then
        MsgBox "Could Not Get a process handle!", vbCritical, "Read error"
        Exit Function
    End If

    ReadProcessMem ProcessHandle, Address, Valueofpointer, 4, 0& 'Change the Four To two If you want For two bytes
    ' WriteLongPointer = Value
    valueX = Val(Valueofpointer) + Val(Offset)
    Decnum = valueX
    HexNum = ""


    While Decnum <> 0
    NextHexDigit = Decnum - (Int(Decnum / 16) * 16)


    If NextHexDigit < 10 Then
        HexNum = Chr(Asc(NextHexDigit)) & HexNum
    Else
        HexNum = Chr(Asc("A") + NextHexDigit - 10) & HexNum
    End If

    Decnum = Int(Decnum / 16)
Wend

If HexNum = "" Then HexNum = "0"
valueX = HexNum
Addy = "&H" + valueX
Exit Function
WriteProcessMemory ProcessHandle, Addy, Value, 4, 0& 'Change the Four To two If you want For two bytes
CloseHandle ProcessHandle
End Function
Call WriteLongPointer(AddressOfpointerHere, OffsetHere, ValueYouWAnt, WindowNameHere)
Ps. Make sure your offset is Not In hex but in Decimal number only!

__________________________________________________ _______________________
How to Read a pointer!
Code:
Private Const PROCESS_ALL_ACCESS As Long = &H1F0FFF

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 ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long


Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long


Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) 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


Public Function ReadLongPointer(Address As Long, Offset As Long, WindowName As String) As Long

    Dim hwnd As Long
    Dim ProcessID As Long
    Dim ProcessHandle As Long
    Dim Valueofpointer As Long
    Dim valueX As String
    Dim Addy as string
    hwnd = FindWindow(vbNullString, WindowName)


    If hwnd = 0 Then
        MsgBox "Could Not find process window!", vbCritical, "Read error"
        Exit Function
    End If

    GetWindowThreadProcessId hwnd, ProcessID
    ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, ProcessID)


    If ProcessHandle = 0 Then
        MsgBox "Could Not Get a process handle!", vbCritical, "Read error"
        Exit Function
    End If

    ReadProcessMem ProcessHandle, Address, Valueofpointer, 4, 0& 'Change the Four To two If you want For two bytes
    ' WriteLongPointer = Value
    valueX = Val(Valueofpointer) + Val(Offset)
    Decnum = valueX
    HexNum = ""


    While Decnum <> 0
    NextHexDigit = Decnum - (Int(Decnum / 16) * 16)


    If NextHexDigit < 10 Then
        HexNum = Chr(Asc(NextHexDigit)) & HexNum
    Else
        HexNum = Chr(Asc("A") + NextHexDigit - 10) & HexNum
    End If

    Decnum = Int(Decnum / 16)
Wend

If HexNum = "" Then HexNum = "0"
valueX = HexNum
Addy = "&H" + valueX
Exit Function
ReadProcessMemory ProcessHandle, Addy, Value, 4, 0& 'Change the Four To two If you want For two bytes
ReadLongPointer = Value
CloseHandle ProcessHandle
End Function
Dim Temp as Integer
Temp = ReadLongPointer(AddressOfpointerHere, OffsetHere, WindowNameHere)
Ps. Make sure your offset is Not In hex but in Decimal number only!
  Reply With Quote

 
Old 09-19-2006, 03:30 AM   #2 (permalink)
imported_Smitteh
Guest

 
Posts: n/a
GPoints: 0 [Check]
iTrader: / %
Rep Power:
lol nice, i made one of these for warrock, like 2 weeks ago, lol
  Reply With Quote

 
Old 09-19-2006, 06:22 PM   #3 (permalink)
Full Member

Male Thy Gamer is offline
 
Thy Gamer's Avatar
 
Join Date: Sep 2006
Location: [.:::.]
Age: 20
Posts: 277
GPoints: 347
iTrader: 0 / 0%
Thy Gamer Is a New Face in Town
Rep Power: 13
Yea this code is old and I think there is one bug in it. So if you find it post it & I will fix it.

Updated, added a Read A Pointer function.
  Reply With Quote

 
Old 07-18-2007, 07:23 PM   #4 (permalink)
Full Member

Ricardandroy is offline
 
Ricardandroy's Avatar
 
Join Date: Jun 2007
Posts: 110
GPoints: 7
iTrader: 0 / 0%
Ricardandroy Is a New Face in Town
Rep Power: 10
do you mean use api to realize pointer operation by vb, cool. good
  Reply With Quote

 
Old 07-21-2007, 08:39 PM   #5 (permalink)
Junior Member

brutalloss is offline
 
brutalloss's Avatar
 
Join Date: Jul 2007
Posts: 3
GPoints: 0
iTrader: 0 / 0%
brutalloss Is a New Face in Town
Rep Power: 0
how can i use these codes
  Reply With Quote

 
Old 08-12-2007, 10:31 PM   #6 (permalink)
Full Member

Male Thy Gamer is offline
 
Thy Gamer's Avatar
 
Join Date: Sep 2006
Location: [.:::.]
Age: 20
Posts: 277
GPoints: 347
iTrader: 0 / 0%
Thy Gamer Is a New Face in Town
Rep Power: 13
Quote:
Originally Posted by brutalloss View Post
how can i use these codes
Download visual basic 6.0
Install it
New project
Place in module
Learn vb
  Reply With Quote

 
Old 11-04-2007, 01:08 PM   #7 (permalink)
Underground

Male Fewmitz is offline
 
Fewmitz's Avatar
 
Join Date: Nov 2006
Location: fewmitz@live.com
Posts: 7,187
GPoints: 22,235
iTrader: 1 / 100%
Fewmitz Is a Lord of AwesomenessFewmitz Is a Lord of AwesomenessFewmitz Is a Lord of AwesomenessFewmitz Is a Lord of Awesomeness
Rep Power: 25
Quote:
Originally Posted by Thy Gamer View Post
Download visual basic 6.0
Install it
New project
Place in module
Learn vb
I'm pretty sure "Learn VB" should be a little higher up there...
  Reply With Quote
Reply

Bookmarks

LinkBacks (?)
LinkBack to this Thread: http://www.gaminggutter.com/forum/f73/vb6-pointer-trainer-2686.html
Posted By For Type Date
Bi Kod [STEK] - ExBilgi Forum This thread Refback 06-09-2009 02:06 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trainer Source Code Alex Source Code 16 11-25-2006 02:11 PM
Meerca Chase Trainer Alex Neopets 49 10-13-2006 01:49 AM

Powered by vBadvanced CMPS v3.1.0

All times are GMT -7. The time now is 02:31 PM.


vBulletin skin developed by: eXtremepixels
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.26021504 seconds (100.00% PHP - 0% MySQL) with 22 queries