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 Snowager, Turmy, Tarla
08-03-2009 08:44 PM
by Heather
Last post by heize
Today 11:19 PM
34 Replies, 1,432 Views
Go to first new post GG Last night I almost...
11-18-2009 04:30 PM
Last post by hawoo
Today 11:19 PM
16 Replies, 124 Views
Go to first new post Anyone CAL for CSS?
11-18-2006 01:07 PM
By lolololol
Last post by hawoo
Today 11:18 PM
11 Replies, 467 Views
Go to first new post Is there a way to get...
Yesterday 10:04 AM
by Boink
Last post by Oops
Today 11:07 PM
5 Replies, 97 Views
Go to first new post PC on NC items, please.
Yesterday 07:06 AM
Last post by Oops
Today 11:03 PM
3 Replies, 39 Views
Reply
 
LinkBack (1) Thread Tools Display Modes

 [vb6] Pointer Trainer
Old 09-18-2006, 07: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: 19
Posts: 286
GPoints: 195
iTrader: 0 / 0%
Thy Gamer Is a New Face in Town
Rep Power: 10
[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, 04: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, 07:22 PM   #3 (permalink)
Full Member

Male Thy Gamer is offline
 
Thy Gamer's Avatar
 
Join Date: Sep 2006
Location: [.:::.]
Age: 19
Posts: 286
GPoints: 195
iTrader: 0 / 0%
Thy Gamer Is a New Face in Town
Rep Power: 10
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, 08:23 PM   #4 (permalink)
Full Member

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

 
Old 07-21-2007, 09: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, 11:31 PM   #6 (permalink)
Full Member

Male Thy Gamer is offline
 
Thy Gamer's Avatar
 
Join Date: Sep 2006
Location: [.:::.]
Age: 19
Posts: 286
GPoints: 195
iTrader: 0 / 0%
Thy Gamer Is a New Face in Town
Rep Power: 10
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, 02:08 PM   #7 (permalink)
Underground

Male Fewmitz is offline
 
Fewmitz's Avatar
 
Join Date: Nov 2006
Location: fewmitz@live.com
Posts: 7,187
GPoints: 21,867
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: 23
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 03: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 03:11 PM
Meerca Chase Trainer Alex Neopets 49 10-13-2006 02:49 AM

Powered by vBadvanced CMPS v3.1.0

All times are GMT -7. The time now is 11:21 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.16202807 seconds (100.00% PHP - 0% MySQL) with 22 queries