C# Memory Reading on Visual Studio menu

Shout-Out

User Tag List

Results 1 to 3 of 3
  1. #1
    robhunter's Avatar Member
    Reputation
    1
    Join Date
    Mar 2009
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    C# Memory Reading on Visual Studio

    Hi,

    I'm starting on all of this and I wanted to know how to read/write memory addresses from a Visual Studio APP... I can't get any function or class like "GetProcessMemory" ...


    I'm using this dependences

    Code:
    using System;
    using System.Diagnostics;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    Which ones I'm missing?

    Sorry for this ultra newbie question... and Thanks

    C# Memory Reading on Visual Studio
  2. #2
    Valtharak's Avatar Master Sergeant
    Reputation
    51
    Join Date
    Feb 2011
    Posts
    105
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    theres no assembly to read other process memory. you have to use kernel32 function with Dllimport. check those out to know how to use them

    [DllImport("kernel32.dll"), SuppressUnmanagedCodeSecurity]
    public static extern IntPtr OpenProcess(ProcessAccessFlags DesiredAccess, bool bInheritHandle, int dwProcessId);

    [DllImport("kernel32.dll", SetLastError = true), SuppressUnmanagedCodeSecurity]
    public static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [Out] byte[] lpBuffer,
    int dwSize, out int lpNumberOfBytesRead);

    [DllImport("kernel32.dll", SetLastError = true), SuppressUnmanagedCodeSecurity]
    public static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, uint nSize,
    out int lpNumberOfBytesWritten);


    [DllImport("kernel32.dll", SetLastError = true), SuppressUnmanagedCodeSecurity]
    public static extern bool CloseHandle(IntPtr hHandle);

  3. #3
    wootpeng's Avatar Contributor
    Reputation
    154
    Join Date
    Jun 2008
    Posts
    227
    Thanks G/R
    0/0
    Trade Feedback
    6 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think there is a "GetProcessMemory" function in the default libraries. I suggest using this custom class: http://www.ownedcore.com/forums/gene...ing-class.html (C# Memory Reading/Writing Class) . It should save you a lot of time writing your own.

Similar Threads

  1. White Paper : Memory reading
    By tttommeke in forum WoW Memory Editing
    Replies: 41
    Last Post: 06-19-2008, 02:30 AM
  2. Microsoft Visual Studio 2003 Instalation Error
    By Ganoran in forum World of Warcraft Emulator Servers
    Replies: 11
    Last Post: 12-15-2007, 03:16 PM
  3. microsoft Visual Studios ERROR help PLEASE
    By Nextgenerationrepack! in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 10-10-2007, 04:07 PM
  4. [AutoIT3] WoW Cordinator (X,Y,MapID and rotation memory reading)
    By Vladinator in forum World of Warcraft Bots and Programs
    Replies: 22
    Last Post: 05-15-2007, 03:26 AM
All times are GMT -5. The time now is 08:30 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search