mirror of https://github.com/dahall/Vanara.git
Cleaned
parent
7a2972c6b2
commit
05292d5f8a
|
@ -2,12 +2,11 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using Vanara.Extensions;
|
||||
using Vanara.InteropServices;
|
||||
|
||||
namespace Vanara.PInvoke
|
||||
{
|
||||
namespace Vanara.PInvoke;
|
||||
|
||||
public static partial class Kernel32
|
||||
{
|
||||
/// <summary/>
|
||||
|
@ -1388,6 +1387,9 @@ namespace Vanara.PInvoke
|
|||
|
||||
internal HHEAP HeapHandle { get; set; } = GetProcessHeap();
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override bool AllocZeroes => true;
|
||||
|
||||
/// <summary>Gets a handle to a memory allocation of the specified size.</summary>
|
||||
/// <param name="size">The size, in bytes, of memory to allocate.</param>
|
||||
/// <returns>A memory handle.</returns>
|
||||
|
@ -1404,9 +1406,6 @@ namespace Vanara.PInvoke
|
|||
public override IntPtr ReAllocMem(IntPtr hMem, int size) => Win32Error.ThrowLastErrorIfNull((IntPtr)HeapReAllocInternal(HeapHandle, HeapFlags.HEAP_ZERO_MEMORY, hMem, size));
|
||||
|
||||
private int GetSize(IntPtr ptr) => (int)HeapSize(HeapHandle, 0, ptr).Value;
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override bool AllocZeroes => true;
|
||||
}
|
||||
|
||||
/// <summary>Safe handle for memory heaps.</summary>
|
||||
|
@ -1568,7 +1567,7 @@ namespace Vanara.PInvoke
|
|||
HeapCompatibility Compatibility
|
||||
{
|
||||
get => HeapQueryInformation<HeapCompatibility>(this, HEAP_INFORMATION_CLASS.HeapCompatibilityInformation);
|
||||
set => HeapSetInformation<HeapCompatibility>(this, HEAP_INFORMATION_CLASS.HeapCompatibilityInformation, value);
|
||||
set => HeapSetInformation(this, HEAP_INFORMATION_CLASS.HeapCompatibilityInformation, value);
|
||||
}
|
||||
|
||||
/// <summary>Performs an implicit conversion from <see cref="SafeHHEAP"/> to <see cref="HHEAP"/>.</summary>
|
||||
|
@ -1595,4 +1594,3 @@ namespace Vanara.PInvoke
|
|||
protected override bool InternalReleaseHandle() => HeapDestroy(this);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue