C# Memory Reading/Writing Class menu

User Tag List

Results 1 to 9 of 9
  1. #1
    yellowspark's Avatar Contributor
    Reputation
    147
    Join Date
    Feb 2012
    Posts
    165
    Thanks G/R
    0/4
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    C# Memory Reading/Writing Class

    Since i recieved messages about memory class used in my AH bot,here it is :P
    Download -> Memory.cs
    How to :
    1.Add existing item to project -> Memory.Cs
    2.add "using ReadWriteMemory;" without quote marks
    3.U must always use it like this

    Code:
    ProcessMemory memory_ = new ProcessMemory(proc_id);
    memory_.StartProcess();
    Since this memory class needs process id to work,here is how to do it for multiclient support etc...
    Code:
      private void Form1_Load(object sender, EventArgs e)
            {
                Process[] p = Process.GetProcessesByName("Diablo III");
                foreach (Process proc in p)
                { comboBox1.Items.Add( proc.Id); }
    
            }
    //this will add every Diablo 3 client's process ID to comboBox
    //add this to button1_Click event or anywhere u want 
    ProcessMemory memory_ = new ProcessMemory(comboBox1.SelectedItem.ToString());
                    memory_.StartProcess();
                    int price = memory_.ReadInt(memory_.ReadInt(memory_.ReadInt(memory_.ReadInt(memory_.ImageAddress() + 0x00FC7590)) + 0xC) + 0xD8);
                    return price;
    //this will return AH item 1 buyout price :D

    C# Memory Reading/Writing Class
  2. Thanks JeffC# (1 members gave Thanks to yellowspark for this useful post)
  3. #2
    DarkLinux's Avatar Former Staff
    CoreCoins Purchaser Authenticator enabled
    Reputation
    1584
    Join Date
    May 2010
    Posts
    1,829
    Thanks G/R
    188/531
    Trade Feedback
    16 (100%)
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    yet another BlackMagic inspired lib...

  4. #3
    thebillkidy's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    16
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I LOVE THIS GUY! finally somebody that posted something that i asked for

  5. #4
    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)
    Thx for the awesome library. Can you possibly do an example on how to read a string?

  6. #5
    DarkLinux's Avatar Former Staff
    CoreCoins Purchaser Authenticator enabled
    Reputation
    1584
    Join Date
    May 2010
    Posts
    1,829
    Thanks G/R
    188/531
    Trade Feedback
    16 (100%)
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Code:
    ProcessMemory memory_ = new ProcessMemory(proc_id);
    memory_.StartProcess();
    
     private void Form1_Load(object sender, EventArgs e)
            {
                Process[] p = Process.GetProcessesByName("Diablo III");
                foreach (Process proc in p)
                { comboBox1.Items.Add( proc.Id); }
    
            }
    //this will add every Diablo 3 client's process ID to comboBox
    //add this to button1_Click event or anywhere u want 
    ProcessMemory memory_ = new ProcessMemory(comboBox1.SelectedItem.ToString());
                    memory_.StartProcess();
     
                        //pOffset is the addess, pSize the length of the string...
                    string yourString = memory_.ReadStringAscii(pOffset, pSize);
    No idea if that works lols

  7. #6
    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)
    Originally Posted by DarkLinux View Post
    Code:
    ProcessMemory memory_ = new ProcessMemory(proc_id);
    memory_.StartProcess();
    
     private void Form1_Load(object sender, EventArgs e)
            {
                Process[] p = Process.GetProcessesByName("Diablo III");
                foreach (Process proc in p)
                { comboBox1.Items.Add( proc.Id); }
    
            }
    //this will add every Diablo 3 client's process ID to comboBox
    //add this to button1_Click event or anywhere u want 
    ProcessMemory memory_ = new ProcessMemory(comboBox1.SelectedItem.ToString());
                    memory_.StartProcess();
     
                        //pOffset is the addess, pSize the length of the string...
                    string yourString = memory_.ReadStringAscii(pOffset, pSize);
    No idea if that works lols
    I got it to work. It is basically the same as the integer but on the last bracket you do readascii instead of readint.

  8. #7
    booba's Avatar Private
    Reputation
    1
    Join Date
    Jul 2012
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Two questions:

    1. Is it better to create a new instance of the class for every memory read/write? or use a single instance throughout the lifetime of the application (bot)
    2. In the example above, the handle retrieved by OpenProcess is never closed (using CloseHandle). Do you think it would be a good idea to make the class IDisposable? (see example IDisposable Interface (System))

  9. #8
    beastmode22387's Avatar Private
    Reputation
    1
    Join Date
    Jul 2012
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anybody know if this still works? I get it up and running but all it returns is 0.

  10. #9
    Crackerzoid's Avatar Private
    Reputation
    1
    Join Date
    Sep 2012
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hat sich erledigt
    Last edited by Crackerzoid; 09-25-2012 at 11:05 AM.

Similar Threads

  1. (Tutorial) Starting WoW-Memory Reading/Writing
    By Mrbrightside in forum WoW Memory Editing
    Replies: 198
    Last Post: 06-02-2017, 05:11 PM
  2. [Release] [C#] Standalone memory reads, writes, calls, and more
    By Jadd in forum WoW Memory Editing
    Replies: 8
    Last Post: 08-28-2013, 03:58 AM
  3. Replies: 2
    Last Post: 01-19-2012, 02:32 PM
  4. How do i know if a Bot is using memory reading / writing?
    By sturmtiger in forum WoW Bots Questions & Requests
    Replies: 1
    Last Post: 01-06-2011, 06:31 AM
  5. In process memory reading/writing
    By unbekannt1 in forum WoW Memory Editing
    Replies: 7
    Last Post: 06-08-2010, 06:52 PM
All times are GMT -5. The time now is 05:27 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search