Пример #1
0
        public static Int32 ReadInt32(Int64 _lpBaseAddress)
        {
            byte[] Buffer = new byte[4];
            IntPtr ByteRead;

            Managed.ReadProcessMemory(pHandle, _lpBaseAddress, Buffer, 4, out ByteRead);
            return(BitConverter.ToInt32(Buffer, 0));
        }
Пример #2
0
        public static byte ReadByte(Int64 _lpBaseAddress)
        {
            byte[] Buffer = new byte[sizeof(byte)];
            IntPtr ByteRead;

            Managed.ReadProcessMemory(pHandle, _lpBaseAddress, Buffer, sizeof(byte), out ByteRead);
            return(Buffer[0]);
        }
Пример #3
0
        private static Int64 FindPattern(Int64 offsetFromBase, bool deref, byte[] byteMask, string szMask)
        {
            IntPtr ByteRead;

            Managed.ReadProcessMemory(RPM.GetHandle(), baseAddress, buffer, (UInt64)searchLength, out ByteRead);

            for (Int64 i = 0; i < searchLength; i++)
            {
                if (DataCompare(i, byteMask, szMask))
                {
                    return(baseAddress + i + 1 + offsetFromBase);
                }
            }

            return(0);
        }