Example #1
0
 /// <summary>
 /// Reads the specified T data from a memory location.
 /// </summary>
 /// <typeparam name="T">Type of a data to read</typeparam>
 /// <param name="source">Memory location to read from.</param>
 /// <param name="data">The data write to.</param>
 internal static void UnsafeReadOut <T>(IntPtr source, out T data)
 {
     unsafe
     {
         Interop.CopyInlineOut(out data, (void *)source);
     }
 }
Example #2
0
 /// <summary>
 /// Reads the specified T data from a memory location.
 /// </summary>
 /// <typeparam name="T">Type of a data to read</typeparam>
 /// <param name="source">Memory location to read from.</param>
 /// <param name="data">The data write to.</param>
 public static void ReadOut <T>(IntPtr source, out T data) where T : struct
 {
     unsafe
     {
         Interop.CopyInlineOut(out data, (void *)source);
     }
 }