Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Using static pointers to access memory value via C#

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
BAILANDO
How do I cheat?
Reputation: 0

Joined: 26 Aug 2016
Posts: 4

PostPosted: Fri Aug 26, 2016 1:29 am    Post subject: Using static pointers to access memory value via C# Reply with quote

Hello, im making one personal trainer for game, in cheat engine i found correct pointer which point still at correct dynamic value after restart. Problem is, how to use this in C# Visual Studion. When i use dynamic memory which pointer point at after restart, then its works, but when i use pointer not dyn.address, then its not work, getting value 0. Question is how to get for example dynamic value 239FD94C010 from pointer 0x01616728. value 239FD94C4E4 i know how to get, when u make dynamic value + offset.

Thanks for help.

Code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace NMS_Units_Simple_Trainer
{
    class Program
    {
        public static long Base = 0x0151A7A8;
        public static long dBase = 0x239FD94C010;
        public static int Off1 = 0x4D4;


        public static long fBase = Base + Off1;


        static void Main(string[] args)
        {
            VAMemory vam = new VAMemory("NMS");

            long memoryValue = dBase + 0x4d4; //this works, because i use dynamic memory
            //long memoryValue = Base + 0x4d4; //this doesn;t work, this is pointer and i need to get value 'dBase' from 'Base'.

            while (true)
            {
                Console.WriteLine(vam.ReadInt32((IntPtr)memoryValue));
                //Console.WriteLine(vam.WriteInt32((IntPtr)memoryValue, 300000));
                Thread.Sleep(500);
            }
        }
    }
}
Back to top
View user's profile Send private message
BAILANDO
How do I cheat?
Reputation: 0

Joined: 26 Aug 2016
Posts: 4

PostPosted: Sun Sep 11, 2016 11:07 am    Post subject: Done Reply with quote

I have solution, everything works fine now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites