//Class entry point. //The process, StartAddress and EndAdrress will be defined in the class definition. public IrregularMemoryScan(Process process, int[] AddressesList) { //Set the reader object an instant of the ProcessMemoryReader class. reader = new ProcessMemoryReader(); //Set the ReadProcess of the reader object to process passed to this method //to define the process we are going to scan its memory. reader.ReadProcess = process; //Take the addresses list and store them in local array. addresses = AddressesList; }
//Class entry point. //The process, StartAddress and EndAdrress will be defined in the class definition. public RegularMemoryScan(Process process, int StartAddress, int EndAddress) { //Set the reader object an instant of the ProcessMemoryReader class. reader = new ProcessMemoryReader(); //Set the ReadProcess of the reader object to process passed to this method //to define the process we are going to scan its memory. reader.ReadProcess = process; //Set the Start and End addresses of the scan to what is wanted. baseAddress = (IntPtr)StartAddress; lastAddress = (IntPtr)EndAddress;//The scan starts from baseAddress, //and progresses up to EndAddress. }
//Class entry point. //Define fields and event handlers and also set the process of the ProcessMemoryReader object. public MemoryFreeze(Process process) { timer = new System.Timers.Timer(); writer = new ProcessMemoryReader(); writer.ReadProcess = process; records = new List<memoryRecord>(); timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed); }