Results 1 to 4 of 4
  1. #1
    waffl95's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    2

    VB Read String from memory

    Hello, just tried to Read all players, I tried to add a own Function but it Always throw a NullpointerException could some one help me?
    I use the Modul from this site [Removed from author]
    Last edited by waffl95; 12-21-2012 at 05:32 AM.

  2. #2
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,470
    Reputation
    564
    Thanks
    6,168
    My Mood
    Psychedelic
    No external links.
    Also A nullpointer error happens when you don't create an object for the class first.

    Code:
    
    MemoryModule memMod = new MemoryModule();

  3. #3
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,750
    Reputation
    66
    Thanks
    14,529
    My Mood
    Angelic
    Quote Originally Posted by Kenshin13 View Post
    No external links.
    Also A nullpointer error happens when you don't create an object for the class first.

    Code:
    
    MemoryModule memMod = new MemoryModule();
    Usually, Visual Studio won't even let your code be compiled if he need to create an instance of the object, so I believe that's not the problem. Just debug your code.. you're not setting a value appropriately... You should be able to see it if you coded it.


    CoD Minion from 09/19/2012 to 01/10/2013

  4. #4
    waffl95's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    2
    I always get a Null Pointer Exception here
    cbFrost2Player1.Text = ReadString(MW3(0), &HA12A70)
    I added this to the Modul

    Public RBuffString(20) As Byte
    Public returnString As String

    Public Function ReadString(ByVal ProcessName As Process, ByVal Address As Integer)

    Dim GameLookUp As Process() = Process.GetProcessesByName(ProcessName.ProcessName )

    If GameLookUp.Length = 0 Then

    End

    End If

    Dim processHandle As IntPtr = OpenProcess(&H1F0FFF, 0, GameLookUp(0).Id)

    ReadProcessMemory(processHandle, Address, RBuffString(0), 20, Nothing)

    returnString = System.Text.Encoding.ASCII.GetString(RBuffString)


    CloseHandle(processHandle)

    Return returnString

    End Function
    I have a button which freez my ammo and he works fine so MW3(0) shoulden't be null
    And I don't know why q.q only coded a lot with jave befor

    Got it to work
    @-InSaNe- @Nachos solved
    Last edited by waffl95; 12-21-2012 at 02:55 PM.

Similar Threads

  1. [Solved] Read Integer From Selected Memory Address
    By vineeee in forum Visual Basic Programming
    Replies: 3
    Last Post: 02-19-2012, 10:04 PM
  2. [Help]Reading Stacks from memory using VB.net
    By euverve in forum Visual Basic Programming
    Replies: 2
    Last Post: 04-19-2011, 10:10 AM
  3. Replies: 5
    Last Post: 07-22-2009, 04:26 PM
  4. Oh shit, read this from Nexon
    By oda in forum Combat Arms Hacks & Cheats
    Replies: 46
    Last Post: 04-22-2009, 11:32 AM
  5. Fixes for various Errors, Read!(straight from Nexon Forums)
    By mariokiller64 in forum Combat Arms Hacks & Cheats
    Replies: 9
    Last Post: 09-05-2008, 06:02 PM