diff --git a/PInvoke/Shared/InteropServices/SafeNativeArray.cs b/PInvoke/Shared/InteropServices/SafeNativeArray.cs index 7c192c9c..4ce34e0f 100644 --- a/PInvoke/Shared/InteropServices/SafeNativeArray.cs +++ b/PInvoke/Shared/InteropServices/SafeNativeArray.cs @@ -18,11 +18,13 @@ namespace Vanara.InteropServices /// Initializes a new instance of the class from a copy of a managed TElem array. /// The array of bytes to copy. - public SafeNativeArray(TElem[] array) : base(array, 0) { } + /// The number of bytes to allocate in front of the array allocation. + public SafeNativeArray(TElem[] array, uint headerSize = 0) : base(array, headerSize) { } /// Initializes a new instance of the class. /// The element count. This value can be 0. - public SafeNativeArray(int elementCount) : base((uint)(ElemSize * elementCount), 0) { } + /// The number of bytes to allocate in front of the array allocation. + public SafeNativeArray(int elementCount, uint headerSize = 0) : base((uint)(ElemSize * elementCount), headerSize) { } /// Initializes a new instance of the class. /// The handle.