/// <summary>
 /// Writes your own structure address into process' memory and gives you the address
 /// to which the structure has been directly written to.
 /// </summary>
 /// <param name="bytesToWrite">A structure to be converted into individual bytes to be written onto the buffer.</param>
 /// <returns>Pointer to the newly written structure in memory. Null pointer, if it cannot fit into the buffer.</returns>
 public IntPtr Add <TStructure>(TStructure bytesToWrite)
 {
     // Know what to do
     return(Add(MemoryReadWrite.ConvertStructureToByteArrayUnsafe(ref bytesToWrite)));
 }
Exemple #2
0
 /// <summary>
 /// See <see cref="Add(byte[],System.IntPtr)"/>
 /// </summary>
 public static IntPtr Add <TStructure>(TStructure bytesToWrite, IntPtr targetAddress)
 {
     // Know what to do
     return(Add(MemoryReadWrite.ConvertStructureToByteArrayUnsafe(ref bytesToWrite), targetAddress));
 }