unsafe void WriteBytes(byte* ptr, int offset, byte[] data) { Marshal.Copy(data, 0, IntPtr.Add(new IntPtr(ptr), offset), data.Length); }