Group: Memory Management - Library: kernel32
The GetProcessHeap function obtains a handle to the heap of the calling process. This handle can then be used in subsequent calls to the HeapAlloc, HeapReAlloc, HeapFree, and HeapSize functions.
Using the heap of the calling process to allocate memory blocks
Validating the heap of the calling process
HANDLE GetProcessHeap(VOID); DECLARE INTEGER GetProcessHeap IN kernel32 This function has no parameters.
If the function succeeds, the return value is a handle to the calling process"s heap. If the function fails, the return value is NULL.
MSDN: The GetProcessHeap function allows you to allocate memory from the process heap without having to first create a heap with the HeapCreate function. The handle obtained by calling this function should not be used in calls to the HeapDestroy function.
Home