ZombieAPI.RemoteMemory.WriteInternal C# (CSharp) Method

WriteInternal() private method

private WriteInternal ( byte bytes ) : void
bytes byte
return void
        void WriteInternal(byte[] bytes)
        {
            uint bytesW = 0;
            uint oldprotect;
            I.VirtualProtectEx(_phandle, (IntPtr)_position, (uint)bytes.Length, (uint)Protection.PAGE_EXECUTE_READWRITE, out oldprotect);
            I.WriteProcessMemory(_phandle, (IntPtr)_position, bytes, (uint)bytes.Length, out bytesW);
            if (_debug)
            {
                Console.Write("[WriteInternal] Writing to " + _position + " : ");
                PrintBytes(bytes);
                Console.WriteLine(bytes.Length + "/" + bytesW);
            }
            I.VirtualFreeEx(_phandle, (IntPtr)_position, (uint)bytes.Length, I.MEM_RELEASE);
            _position = _position + bytes.Length;
        }