Kernel32HeapValidate Method
Validates the specified heap.
The function scans all the memory blocks in the heap and verifies that the
heap control structures maintained by the heap manager are in a consistent state.
You can also use the
HeapValidate(IntPtr, HeapFlags, IntPtr) function to validate a
single memory block within a specified heap without checking the validity of the entire 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")]
public static bool HeapValidate(
IntPtr hHeap,
HeapFlags flags,
IntPtr mem
)
<DllImportAttribute("Kernel32.dll">]
Public Shared Function HeapValidate (
hHeap As IntPtr,
flags As HeapFlags,
mem As IntPtr
) As Boolean
Dim hHeap As IntPtr
Dim flags As HeapFlags
Dim mem As IntPtr
Dim returnValue As Boolean
returnValue = Kernel32.HeapValidate(hHeap,
flags, mem)
public:
[DllImportAttribute(L"Kernel32.dll")]
static bool HeapValidate(
[InAttribute] IntPtr hHeap,
HeapFlags flags,
[InAttribute] IntPtr mem
)
[<DllImportAttribute("Kernel32.dll")>]
static member HeapValidate :
hHeap : IntPtr *
flags : HeapFlags *
mem : IntPtr -> bool
No code example is currently available or this language may not be supported.
- hHeap IntPtr
-
A handle to the heap to be validated.
This handle is returned by either the HeapCreate(HeapFlags, UInt32, UInt32) or GetProcessHeap function.
- flags HeapFlags
-
The heap access options.
- mem IntPtr
-
A pointer to a memory block within the specified heap. This parameter may be Zero.
If this parameter is Zero,
the function attempts to validate the entire heap specified by hHeap.
If this parameter is not Zero,
the function attempts to validate the memory block pointed to by mem.
It does not attempt to validate the rest of the heap.
Boolean
If the specified heap or memory block is valid, the return value is
.
If the specified heap or memory block is invalid, the return value is
.
On a system set up for debugging, the
HeapValidate(IntPtr, HeapFlags, IntPtr) function
then displays debugging messages that describe the part of the heap or memory block that is invalid,
and stops at a hard-coded breakpoint so that you can examine the system to determine the source of the invalidity.
The
HeapValidate(IntPtr, HeapFlags, IntPtr) function does not set the thread's last error value.
There is no extended error information for this function; do not call
GetLastWin32Error.