HelpHow to To Get String From Muilt Pointer Memory ?

Posts 1–2 of 2 · Page 1 of 1
How to To Get String From Muilt Pointer Memory ?
hey Guys^^

I Tried From Searching In google and work on it i just wanna how to get text from the game i have this code but i need From Milt Pointer :

Code:
  Public Function GetTextinMemory(ByVal ProcessHandle As IntPtr, ByVal MemoryAddress As Integer, ByVal CharsToRead As Integer, Optional ByVal IsUnicode As Boolean = True) As String
        Dim ReturnValue As String = vbNullString
        Dim StringBuffer() As Byte
        If IsUnicode Then
            ReDim StringBuffer(CharsToRead * 2 - 1)
        Else
            ReDim StringBuffer(CharsToRead - 1)
        End If
        Try
            'Dim p As Process() = Process.GetProcessesByName(process0)
            If ReadProcessMemory(ProcessHandle, MemoryAddress, StringBuffer(0), StringBuffer.Length, Nothing) Then
                If IsUnicode Then
                    ReturnValue = System.Text.Encoding.ASCII.GetString(StringBuffer)
                Else
                    ReturnValue = System.Text.Encoding.Default.GetString(StringBuffer)
                End If
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        Return ReturnValue
    End Function
    Public Function ReadString(ByVal proces As String, ByVal address As Integer) As String
        Try
            Dim process0 As String = proces
            Dim prox As Process() = Process.GetProcessesByName(process0)
            Return GetTextinMemory(prox(0).Handle, address, 16) & GetTextinMemory(prox(0).Handle, address + 32, 16)
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Function
.
Any Help?
hi of course you can use my class : hxxp://mycode.dpcoders.com/MyCode.php?id=61

include it in your project and after that use

Dim i As New ProcessMemoryReaderWriterV2(Process.GetProcessesBy Name("Program Name Here without.exe")(0).Id)
Dim Ptr As Integer = i.MultiLevelPointerReader(&H406E80 , New Integer() {&H128}) ' Insert ptr address instead of &H406E80 ,,, and put offsets as New Integer() {&H20,&h40,&h80} etc
Dim barray As Byte() = i.ReadByteArray(Ptr, 9) ' read 9 bytes from that pointer ( 9 bytes means 9 ascii chars)
MsgBox( i.ByteToStringAnsi(barray) ) 'read the bytes as ansii string


and good luck
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us