Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 1.27 KB

File metadata and controls

52 lines (36 loc) · 1.27 KB

Home

Function name : HeapFree

Group: Memory Management - Library: kernel32


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


Code examples:

Using the heap of the calling process to allocate memory blocks

Declaration:

BOOL HeapFree(
  HANDLE hHeap,  // handle to heap
  DWORD dwFlags, // heap free options
  LPVOID lpMem   // pointer to memory
);  

FoxPro declaration:

DECLARE INTEGER HeapFree IN kernel32;
	INTEGER hHeap,;
	INTEGER dwFlags,;
	INTEGER lpMem  

Parameters:

hHeap [in] Specifies the heap whose memory block the function frees. This parameter is a handle returned by the HeapCreate or GetProcessHeap function.

dwFlags [in] Specifies several controllable aspects of freeing a memory block.

lpMem [in] Pointer to the memory block to free. This pointer is returned by the HeapAlloc or HeapReAlloc function.


Return value:

If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.