HeapFree

HeapFree frees a memory block allocated from a heap by HeapAlloc or HeapReAlloc.

Syntax

Copy
BOOL HeapFree(
    [in]    HANDLE hHeap,
    [in]    DWORD Flags,
    [in]    LPVOID lpMem
);

Parameters

[in] hHeap

The heap whose memory block the function frees. This parameter is the handle returned by GetProcessHeap.

[in] Flags

Ignored.

[in] lpMem

A pointer to the memory block to free. HeapAlloc or HeapReAlloc returns this pointer.

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to get extended error information.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

windows.h

wRTOS_rtss.lib

See Also: