HeapLock function kernel32

Win32Result<bool> HeapLock(
  1. HANDLE hHeap
)

Attempts to acquire the critical section object, or lock, that is associated with a specified heap.

To learn more, see learn.microsoft.com/windows/win32/api/heapapi/nf-heapapi-heaplock.

Implementation

Win32Result<bool> HeapLock(HANDLE hHeap) {
  final result_ = HeapLock_Wrapper(hHeap);
  return Win32Result(value: result_.value.i32 != FALSE, error: result_.error);
}