RtlLockHeap - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H

/**
 * The RtlLockHeap routine acquires exclusive access to the specified heap, serializing access from other threads.
 *
 * \param HeapHandle A handle to the heap to lock.
 * \return `TRUE` if the heap was locked, otherwise `FALSE`.
 * \remarks Use a matching lock/unlock pair when a stable multi-step heap walk is required. Individual heap-operation serialization does not preserve a traversal across concurrent allocations. WalkHeap uses caller-owned cursor storage and can return STATUS_NO_MORE_ENTRIES; it does not transfer ownership of enumerated blocks.
 */
_When_(return != 0, _Acquires_lock_(HeapHandle))
NTSYSAPI
BOOLEAN
NTAPI
RtlLockHeap(
    _In_ HANDLE HeapHandle
    );

#endif

View code on GitHub

NtDoc

No description available.

NTinternals.net (undocumented.ntinternals.net)

HeapHandle

Heap address.


Function protect locks virtual memory. See NtLockVirtualMemory for additional information.

Documented by

See also