Ejemplo n.º 1
0
        internal long ReadInt64(IntPtr handle, IntPtr pointer)
        {
            byte[] buffer    = new byte[8];
            int    bytesRead = 0;

            Win32Memory.ReadProcessMemory(handle, pointer, buffer, 8, ref bytesRead);

            var value = BitConverter.ToInt64(buffer, 0);

            logger.Debug($"Returning long value {value}");

            return(value);
        }
Ejemplo n.º 2
0
        internal IntPtr ReadPointer(IntPtr handle, IntPtr pointer)
        {
            byte[] buffer    = new byte[IntPtr.Size];
            int    bytesRead = 0;

            Win32Memory.ReadProcessMemory(handle, pointer, buffer, IntPtr.Size, ref bytesRead);

            var value = BitConverter.ToInt64(buffer, 0);

            logger.Debug($"Returning pointer 0x{value:X}");

            return(new IntPtr(value));
        }