Added ISafeMemoryHandle.GetBytes method that was already implemented all implemented classes

pull/211/head
dahall 2021-01-11 11:19:15 -07:00
parent f1466856af
commit e1cfb9c8ce
1 changed files with 6 additions and 0 deletions

View File

@ -84,6 +84,12 @@ namespace Vanara.InteropServices
/// <returns>An <see cref="IntPtr"/> to the internally held memory.</returns>
IntPtr DangerousGetHandle();
/// <summary>Gets a copy of bytes from the allocated memory block.</summary>
/// <param name="startIndex">The start index.</param>
/// <param name="count">The number of bytes to retrieve.</param>
/// <returns>A byte array with the copied bytes.</returns>
public byte[] GetBytes(int startIndex, int count);
/// <summary>
/// Extracts an array of structures of <typeparamref name="T"/> containing <paramref name="count"/> items. <note type="note">This
/// call can cause memory exceptions if the pointer does not have sufficient allocated memory to retrieve all the structures.</note>