Kernel32HeapCompact Method
Returns the size of the largest committed free block in the specified heap.
If the Disable heap coalesce on free global flag is set,
this function also coalesces adjacent free blocks of memory in the heap.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", SetLastError = true)]
public static uint HeapCompact(
IntPtr hHeap,
HeapFlags flags
)
<DllImportAttribute("Kernel32.dll", SetLastError := true>]
Public Shared Function HeapCompact (
hHeap As IntPtr,
flags As HeapFlags
) As UInteger
Dim hHeap As IntPtr
Dim flags As HeapFlags
Dim returnValue As UInteger
returnValue = Kernel32.HeapCompact(hHeap,
flags)
public:
[DllImportAttribute(L"Kernel32.dll", SetLastError = true)]
static unsigned int HeapCompact(
[InAttribute] IntPtr hHeap,
HeapFlags flags
)
[<DllImportAttribute("Kernel32.dll", SetLastError = true)>]
static member HeapCompact :
hHeap : IntPtr *
flags : HeapFlags -> uint32
No code example is currently available or this language may not be supported.
- hHeap IntPtr
- A handle to the heap.
This handle is returned by either the HeapCreate(HeapFlags, UInt32, UInt32) or
GetProcessHeap function.
- flags HeapFlags
-
The heap access options.
UInt32
If the function succeeds, the return value is the size of the largest committed free block in the heap, in bytes.
If the function fails, the return value is zero.
In the unlikely case that there is absolutely no space available in the heap,
the function return value is zero, and
GetLastWin32Error returns zero.