Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[VB.NET] Wrong value read from dll linked pointer

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
dpdsbd
How do I cheat?
Reputation: 0

Joined: 12 Feb 2014
Posts: 8

PostPosted: Wed Feb 12, 2014 4:28 pm    Post subject: [VB.NET] Wrong value read from dll linked pointer Reply with quote

Hey,

I have a pointer (multiple levels) but once I esablish Base level, I have it all figured out - the problem is to find proper Base value

Inputs:

mdnsNSP.dll+0001ED30 for application Game.exe

I managed to get this code from other topic:
forum. cheatengine. org/viewtopic. php?p=5384048&sid=393adba0363b74d68211e9336c510315

Code:

Public Class Form1
    Public Function GetAddress(ByVal Address As Object, ByVal Processname As String) As Object
        Dim Proc As Process() = Process.GetProcessesByName(Processname)
        If Proc.Count = 0 Then
            MessageBox.Show("Process not found")
            Return -1
        End If
        If TypeOf Address Is String Then
            If (Address.IndexOf("+", StringComparison.Ordinal) = -1) Then
                Return Integer.Parse(Address, System.Globalization.NumberStyles.HexNumber)
            End If
            Dim tmp As String() = Address.Split("+")
            For Each M As ProcessModule In Proc(0).Modules
                If (M.ModuleName.ToLower = tmp(0).ToLower) Then
                    Return (M.BaseAddress.ToInt32 + Integer.Parse(tmp(1), System.Globalization.NumberStyles.HexNumber))
                End If
            Next
        End If
        Return -1
    End Function


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       
        Dim MyAddress = GetAddress("mdnsNSP.dll+0001ED30", "Game")

End Sub



The result MyAddress = 1925573936 what translates to Hex 72C5ED30

The Hex value given by CE is 01132380. The code above is suppose to work in other instances so my only idea is that I did something wrong - what?

Cheers,



snipp.PNG
 Description:
 Filesize:  12.8 KB
 Viewed:  5499 Time(s)

snipp.PNG


Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Feb 14, 2014 1:34 pm    Post subject: Reply with quote

Debug the code and step through each read of the pointer to find where the problem is.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
dpdsbd
How do I cheat?
Reputation: 0

Joined: 12 Feb 2014
Posts: 8

PostPosted: Sat Feb 22, 2014 1:01 pm    Post subject: Reply with quote

Well, I tried debugging it - but with no success - it never comes even close to the area that it's suppose to be identifying. ANY kind of help would be appreciated!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites