Exemplo n.º 1
0
        public void loadPointer(long address)
        {
            IntPtr ptr;

            byte[] buffer = new byte[8];
            bool   retVal = ProcessMemoryReaderApi.ReadProcessMemory(this.mhProcess, (IntPtr)address, buffer, 8, out ptr);

            this.mPointerAddress = BitConverter.ToInt64(buffer, 0);
        }
Exemplo n.º 2
0
        public byte[] readMemoryBuffer(long Address, long offset)
        {
            IntPtr ptr;

            byte[] buffer = new byte[10];
            if (ProcessMemoryReaderApi.ReadProcessMemory(this.mhProcess, (IntPtr)(Address + offset), buffer, 8, out ptr) == false)
            {
                return(new byte[0]);
            }

            return(buffer);
        }
Exemplo n.º 3
0
        public string readMemoryString(long address, int len)
        {
            IntPtr ptr;

            byte[] buffer       = new byte[len];
            string returnString = "";

            ProcessMemoryReaderApi.ReadProcessMemory(this.mhProcess, (IntPtr)address, buffer, (uint)len, out ptr);
            for (int i = 0; i < buffer.Length; i++)
            {
                if (buffer[i] == '\0')
                {
                    break;
                }

                returnString += (char)buffer[i];
            }

            return(returnString);
        }