Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 03:45

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



vbnet Address read integer/string problems

Discussion on vbnet Address read integer/string problems within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2010
Posts: 34
Received Thanks: 0
vbnet Address read integer/string problems

Here is the problem



It doesn't work, I can't make it work I can't find code to read memory integer, can someone give me a working example.

here is my code:

Code:
Imports System.Runtime.InteropServices
Imports System
Imports System.Text
Imports System.ComponentModel
Imports System.Windows.Forms.Application
Module ReadMemory
    <DllImport("kernel32.dll", SetLastError:=True)> Public Function ReadProcessMemory _
(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByRef lpBuffer As Byte,
 ByVal iSize As Integer, ByRef lpNumberOfBytesRead As Integer) As Boolean
    End Function
End Module
Public Class Form1
    Public Function ReadMemoryP(ByVal address As Integer)
        Dim prox As Process() = Process.GetProcessesByName("game")
        Return GetTextinMemory(prox(0).Handle, address, 16) & GetTextinMemory(prox(0).Handle, address + 32, 16)
    End Function
    Private Function GetTextinMemory(ByVal ProcessHandle As IntPtr, ByVal MemoryAddress As IntPtr, 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
            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

    Private Sub cmdFirstScan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        MsgBox(ReadMemoryP(& 87541CDC))

    End Sub
End Class
critical111 is offline  
Old 09/13/2016, 18:45   #2
dotCom
 
Devsome's Avatar
 
elite*gold: 9842
The Black Market: 107/0/0
Join Date: Mar 2009
Posts: 16,854
Received Thanks: 4,680
Arrow General Coding -> .NET Languages

#moved…
Devsome is offline  
Old 01/08/2017, 03:01   #3
 
elite*gold: 0
Join Date: Feb 2010
Posts: 34
Received Thanks: 0
no help ?
critical111 is offline  
Reply


Similar Threads Similar Threads
read memory string?
05/10/2016 - AutoIt - 1 Replies
hey guys i want create a little tool which can read the userid from memory. i've already converted the array of bytes to string but now i need format like this in string "4E 69 63 6B 4E 61 6D 65 3A ?? ?? ?? ?? ??" i need these "??" for the search ...
[VB.NET] Read Memory String/Char(?)
07/29/2015 - .NET Languages - 2 Replies
Solved.
[VB.NET] Unterschied String und Integer
07/29/2015 - .NET Languages - 24 Replies
Hey Leute, ich bin grad dabei VB zu lernen und bin noch komplett am Anfang. Ich lerne mit einem Buch und da war die Aufgabe mit Variablen die Adresse in ein Label einzufügen. Ich hab es mit Integer probiert, aber das hat nicht funktioniert, weil Integer soweit ich weiß nur für Zahlen ist. Dann hab ich String benutzt und da kann ich Zahlen + Buchstaben verwenden..? Wieso sollte ich dann überhaupt Integer jemals benutzen? Ich weiß für die erfahrenen Programmierer unter euch klingt das...
VB.Net: Read string from memory?
09/10/2012 - .NET Languages - 8 Replies
Hi, ich möchte gerne einen String aus dem Speicher lesen. Ich habe dazu die entsprechenden Offsets und in Autoit geht das auch wunderbar. Aber das ist wenig effizient und in VB kriege ich das erst gar nicht hin... Hat da wer zufällig eine entsprechende Funktion, die er mir zur Verfügung stellen kann?
Convert string to integer, Frage...
08/10/2012 - C/C++ - 3 Replies
Hallo, also, es geht um zwei Codes. Beide sollen einen String in eine Zahl umwandeln. Um zu zeigen worum es genau geht, hier der funktionierende Code: #include <iostream> #include <string> #include <sstream> int main () { std::string age;



All times are GMT +1. The time now is 03:45.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.