Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Coding Releases
You last visited: Today at 01:46

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

Advertisement



KDMemory (C# 32 & 64 Bit)

Discussion on KDMemory (C# 32 & 64 Bit) within the Coding Releases forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
KDMemory (C# 32 & 64 Bit)

Features:
  • Full support for 32 and 64 bit applications.
  • Access all existing processes with the same name (multi clients).
  • Everything is documented (inline documentation).
  • Offsets can be used by just adding an array containing all offsets to the constructor.
  • Possibility to use module names with a static offset (e.g. '"Tutorial-x86_64.exe"+002C7710').

TODO:
  • Better exception handling for multi clients.

Write me a PM if you find an error.
Attached Files
File Type: zip KDMemory.zip (5.2 KB, 294 views)
KDeluxe is offline  
Thanks
20 Users
Old 08/23/2012, 22:45   #2
 
SkillartzHD's Avatar
 
elite*gold: 60
Join Date: Oct 2011
Posts: 2,910
Received Thanks: 16,311
Werde sie mal testen.
Grezz
SkillartzHD is offline  
Old 07/25/2014, 19:34   #3
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
I've updated my library.
KDeluxe is offline  
Thanks
3 Users
Old 07/21/2017, 20:14   #4
 
elite*gold: 0
Join Date: Jan 2014
Posts: 43
Received Thanks: 1
This library don't work anymore in Visual Studio 2015 on windows 10 ?

LiveLong23 is offline  
Thanks
1 User
Old 08/15/2023, 03:26   #5
 
elite*gold: 0
Join Date: Jan 2014
Posts: 43
Received Thanks: 1
What i need is when process is selected from combo box that reads memory from selected process.

When i start bot and connect to game, it sets memory from first process found with process name "Game.exe". Since there is multiple processes "Game.exe" i want to read memory from selected, but it keeps reading only from first that he found.

I think problem with this is because when you set KDMemory to get values it accept process name in class, but since all processes have same name it takes first one.

Is it possible to read memory from PID (process id) or there is other way ?

Just to mention, process is 64 bit.

Code:
public partial class Form1 : Form
    {
        Process[] process;

        static string processName = "Game.exe";
        static string moduleName = processName;

        static int mobHealth;

        public Form1()
        {
            InitializeComponent();
        }

        private void btnConnect_Click(object sender, EventArgs e)
        {
            Process[] proc = Process.GetProcessesByName("game");

            if (proc.Length != 0)
            {
                process = proc;

                comboProcessList.Items.Clear();
                for (int i = 0; i < proc.Length; i++)
                {
                    comboProcessList.Items.Add("Game: " + (i + 1).ToString()); // text is jsut for visual display
                }
                comboProcessList.SelectedIndex = 0;
            }
        }

        private void comboProcessList_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboProcessList.SelectedIndex != -1)
            {
                process = null;

                Process[] proc = Process.GetProcessesByName("game");

                if (proc.Length != 0)
                {
                    process = proc;

                    SetForegroundWindow(process[comboProcessList.SelectedIndex].MainWindowHandle);
                    ShowWindow(process[comboProcessList.SelectedIndex].MainWindowHandle, SW_RESTORE);
                } 
            }
        }

        private void ReadMobHealth()
        {
            try
            {
                var staticOffset = Entities.mobStaticOffset;
                var offsetsValue = Entities.mobHealthOffetsValues;

                var memoryDataValue = new KDMemory(processName, moduleName, staticOffset, offsetsValue, WINAPI.ProcessAccessRights.PROCESS_VM_READ);

                foreach (var integer in memoryDataValue.GetInt32())
                {
                    mobHealth = integer;
                }
            }
            catch
            {
                Console.WriteLine("Error accessing target health");
            }
        }
    }
LiveLong23 is offline  
Reply

Tags
c#, memory, pointer, readprocessmemory, writeprocessmemory


Similar Threads Similar Threads
KDMemory (AutoIt 32 & 64 Bit)
04/02/2017 - AutoIt - 52 Replies
Functions:
Need help with KDMemory reading
05/22/2014 - AutoIt - 2 Replies
Hi i have tried this au3 file and seems to me that it dont work or i didnt make script to work :(. Its first time for me to work with memory so i need a bit help i get "@error:15, @extended:1" error here is my script #AutoIt3Wrapper_UseX64=y ; 64 Bit application #RequireAdmin
KDMemory Problem
11/28/2013 - AutoIt - 5 Replies
Ich kann leider diesen Pointer nicht auslesen: http://i.epvpimg.com/ffKeg.png Mein Code: #RequireAdmin #include "KDMemory.au3" Global $pid = ProcessExists("javaw.exe") Global $handle = _KDMemory_OpenProcess($pid) $baseAddress = _KDMemory_GetModuleBaseAddress($handle, "jvm.dll") + 0x00007AB4 Dim $offsets =



All times are GMT +1. The time now is 01:47.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.