writeprocessmemory (kernel32)
Last changed: 109.202.69.200

.
Summary

C# Signature:

[DllImport("kernel32.dll")]
static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress,
   byte [] lpBuffer, UIntPtr nSize, out IntPtr lpNumberOfBytesWritten);

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

        public IntPtr WriteByteArray( IntPtr BaseAddress, byte [] NewVal )
        {
            // Return Value
            int ReturnVal;

            // Write Memory Byte Array
            WriteProcessMemory( this.hProcess, BaseAddress, NewVal, (UIntPtr)NewVal.Length, out this.BytesWritten );

            return this.BytesWritten;
        }

Alternative Managed API:

Do you know one? Please contribute it!

Documentation