Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Visual Basic Programming › [vb6] How do i read a float from memory(pointer+offset)+how to use multilevelpointer

[vb6] How do i read a float from memory(pointer+offset)+how to use multilevelpointer

Posts 1–6 of 6 · Page 1 of 1
FR
freitag
[vb6] How do i read a float from memory(pointer+offset)+how to use multilevelpointer
Heyho,

I can't figure out how to read correctly some floats from memory and as this isn't enough i have no clue how to use multi level pointers

if i do it the easy way with reading floats from a pointer i do
newadress = adress+offset
readprocessmem "mygame", newadress, result, 4&, 0&
but then i get a value like 1,11xxxxx-EE instead of my player location which looks like 813,12312411512xxxx just as an example.




multilevelpointers:
i got this one from CE:

base: 0x2097ba4
offset1: 0x4a4
offset2: 0x120


and what should i do if i need to combine both things, i mean when i need to read a float from a multilevel pointer? adress+offset1+offset2+... isn't the right way i guess.

i hope someone could help me.

this is the code i use atm:
Code:
'module

Option Explicit

Public Const PROCESS_ALL_ACCESS = &H1F0FFF
Public Declare Function GetWindowThreadProcessId Lib "user32" (ByVal SomeValueIsStoredHere As Long, lpdwProcessId As Long) As Long
Public Declare Function OpenProcess Lib "KERNEL32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Public Declare Function CloseHandle Lib "KERNEL32" (ByVal hObject As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal windowname As String) As Long
Public 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 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

Global ProcessHandle As Long
Global WindowHandle As Long


' $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
' $$$ Read_DMA_Address |Pointer & Offset| $$$
' $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

Public Function Read_DMA_Byte(Address As Long, Offset As Long) As Byte
Dim ProcessId As Long
    WindowHandle = FindWindow(vbNullString, "Age of Conan")
    If (WindowHandle = 0) Then
        MsgBox "We got no WindowHandle"
        Exit Function
    End If

    GetWindowThreadProcessId WindowHandle, ProcessId
    ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, ProcessId)
    If (ProcessHandle = 0) Then
        MsgBox "We got no ProcessHandle"
        Exit Function
    End If
    
ReadProcessMem ProcessHandle, Address + Offset, Read_DMA_Byte, 1&, 0&
CloseHandle ProcessHandle

End Function

Public Function Read_DMA_Integer(Address As Long, Offset As Long) As Integer
Dim ProcessId As Long
    WindowHandle = FindWindow(vbNullString, "Age of Conan")
    If (WindowHandle = 0) Then
        MsgBox "We got no WindowHandle"
        Exit Function
    End If

    GetWindowThreadProcessId WindowHandle, ProcessId
    ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, ProcessId)
    If (ProcessHandle = 0) Then
        MsgBox "We got no ProcessHandle"
        Exit Function
    End If
    
ReadProcessMem ProcessHandle, Address + Offset, Read_DMA_Integer, 2&, 0&
CloseHandle ProcessHandle

End Function

Public Function Read_DMA_Long(Address As Long, Offset As Long, Optional offset2 As Long, Optional offset3 As Long) As Long
Dim ProcessId As Long
    WindowHandle = FindWindow(vbNullString, "Age of Conan")
    If (WindowHandle = 0) Then
        MsgBox "We got no WindowHandle"
        Exit Function
    End If

    GetWindowThreadProcessId WindowHandle, ProcessId
    ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, ProcessId)
    If (ProcessHandle = 0) Then
        MsgBox "We got no ProcessHandle"
        Exit Function
    End If
    

 ReadProcessMem ProcessHandle, Address + Offset, Read_DMA_Long, 4&, 0&
 CloseHandle ProcessHandle

End Function

Public Function Read_DMA_Single(Address As Long, Offset As Long) As Single
Dim ProcessId As Long
    WindowHandle = FindWindow(vbNullString, "Age of Conan")
    If (WindowHandle = 0) Then
        MsgBox "We got no WindowHandle"
        Exit Function
    End If

    GetWindowThreadProcessId WindowHandle, ProcessId
    ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, ProcessId)
    If (ProcessHandle = 0) Then
        MsgBox "We got no ProcessHandle"
        Exit Function
    End If
    

ReadProcessMem ProcessHandle, Address + Offset, Read_DMA_Single, 4&, 0&
CloseHandle ProcessHandle
End Function

Public Function Read_DMA_Double(Address As Long, Offset As Long) As Double
Dim ProcessId As Long
    WindowHandle = FindWindow(vbNullString, "Age of Conan")
    If (WindowHandle = 0) Then
        MsgBox "We got no WindowHandle"
        Exit Function
    End If

    GetWindowThreadProcessId WindowHandle, ProcessId
    ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, ProcessId)
    If (ProcessHandle = 0) Then
        MsgBox "We got no ProcessHandle"
        Exit Function
    End If
    
ReadProcessMem ProcessHandle, Address + Offset, Read_DMA_Double, 8&, 0&
CloseHandle ProcessHandle

End Function


'-------
'Form1
Private Sub Command1_Click()
Dim x As Single
Dim y As Single


x = Read_DMA_Single(&H2097BA4, &H124)
y = Read_DMA_Single(&H2097BA4, &H12C)

List1.Clear
List1.AddItem "Window: 'Age of Conan'"
List1.AddItem "WindowHandle: " & WindowHandle
List1.AddItem "ProcessHandle: " & ProcessHandle
List1.AddItem " "

List1.AddItem "Player X: " & x
List1.AddItem "Player Y: " & y

End Sub
#1 · 17y ago
Toymaker
Toymaker
You do know you don't even have a float in your entire post? A float is a decimal value. Assembly handles decimals by signing values, it's decently irritating to manage. Are you referring to 0xwhatever as a float? You're a silly guy, if so. Else, you must not have posted enough to be helped with the problem you described...

...Any way, you're making things pretty difficult. There is virtually no use for any of that code. You can simply 'view what writes to this' in cheat engine and obtain a static address to reverse the ASM of and WriteProcessMem it. Rather than dealing with all those trick methods and formulas.
#2 · 17y ago
FR
freitag
ehmm seems like you didn't get what i've written...

there is no FLOAT in VB like PFLOAT in c++

0xwhatever is hex and yes i'm pointing to a float value with this and this are pointers.


Read_DMA_Single(&H2097BA4, &H124)
function pointer(hex),offset(hex)

so if there is no use for any of that code...what would be a use? I think you have no clue, no offense but...thx next plz...
#3 · 17y ago
FR
freitag
close plz as i got it working
#4 · 17y ago
why06
why06
o_O im confused... im so nub >_<
But it looks like he trying to search in age of conan for something???
#5 · edited 17y ago · 17y ago
Toymaker
Toymaker
Apparently he got some thing working that even he doesn't actually understand lmao. There are technically no floats in memory reversing, even if the result in the dynamic address you allocated is a float on screen. Oh well, closed...
#6 · 17y ago
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

  • [Tut] superjump in vb6,how toBy cjg333 in General Game Hacking
    1Last post 19y ago
  • Video Tut on how to use VB6By str1k3r21 in Visual Basic Programming
    0Last post 18y ago
  • VB6 How To Make A CrossHairBy gunnybunny in Visual Basic Programming
    3Last post 17y ago
  • Tutorial - How to use Visual Basics 6 (vb6) for WarRock hacksBy Oneirish in Visual Basic Programming
    17Last post 18y ago
  • Tutorial - How to use Visual Basics 6 (vb6) for WarRock "easy"By Oneirish in Programming Tutorials
    2Last post 18y ago

Tags for this Thread

#float#memorypointer#multilevelpointer#offset#read#vb6