INNER CODE UNIT · C#

valuesInBytes

OpenKH/OpenKh · Binarysharp.MSharp/MemorySharp.cs:461

            var valuesInBytes = new byte[MarshalType<T>.Size * array.Length];
            
            // Convert each value into its bytes representation
            for (var i = 0; i < array.Length; i++)
            {
                var offsetInArray = MarshalType<T>.Size * i;
                Buffer.BlockCopy(MarshalType<T>.ObjectToByteArray(array[i]), 0, valuesInBytes, offsetInArray, MarshalType<T>.Size);
            }

            WriteBytes(address, valuesInBytes, isRelative);
        }
        /// <summary>
        /// Writes an array of a specified type in the remote process.
        /// </summary>
        /// <typeparam name="T">The type of the values.</typeparam>
        /// <param name="address">The address where the values is written.</param>
        /// <param name="array">The array to write.</param>
        /// <param name="isRelative">[Optional] State if the address is relative to the main module.</param>

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…