[Question] WriteProcess Memory with Offsets

06/04/2010 11:40 operaopera#1
The base address is 0x0045cc20 and the following offset is 0xEC found by cheat engine.

My code without offset
Code:
public void Write(int val)
        {
            
            byte[] bytes = new byte[4];
            bytes[0] = (byte)val;
            bytes[1] = (byte)(val >> 8);
            bytes[2] = (byte)(val >> 16);
            bytes[3] = (byte)(val >> 24);
            int bytesWriten = 4;
            IntPtr ptrBytesWritten;
            WriteProcessMemory(m_hProcess, (IntPtr)0x0045cc20 , bytes, (uint)bytes.Length, out ptrBytesWritten);
            bytesWriten = ptrBytesWritten.ToInt32();
        }
I try set offset wth baseadress but i getting the strange results..

Any help ? :handsdown:
06/07/2010 19:05 operaopera#2
No help :(
06/07/2010 20:11 meyousearch#3
you know that addresses are in reversed (big-endian) order?
06/13/2010 10:21 operaopera#4
Quote:
Originally Posted by meyousearch View Post
you know that addresses are in reversed (big-endian) order?
No, for what?