Results 1 to 3 of 3

Thread: Memory Writing and Reading

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2008
    Posts
    12

    Memory Writing and Reading

    Has anyone worked with direct memory access in VB.Net? I am referring to operations that were done with the old Poke and Peek of the old Basic.

  2. #2
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: Memory Writing and Reading

    You need to use the Windows API, but yes, it can be done.

    Here is an example of reading process memory.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Memory Writing and Reading

    I doubt that it can be really done the way the old Poke and Peek were done, but you can come pretty close. I believe that Windows gives each running process its own memory space. Thus address &H02DEAD55 is not the address in physical memory, but is redirected to that address within the memory space allocated by the OS. Therefore, you shouldn't be able to write into OS memory space, or that of another process (unless you know the handle of the process). The old Peek and Poke could write....pretty much anywhere.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width