GetProcessHeap

GetProcessHeap obtains a handle to the heap of the calling process. This handle can then be used in calls to HeapAlloc, HeapReAlloc, HeapFree, and HeapSize.

Syntax

Copy
HANDLE GetProcessHeap(VOID);

Parameters

This function has no parameters.

Return Value

If the function succeeds, it returns a handle to the calling process's heap. If the function fails, it returns NULL.

Remarks

GetProcessHeap allows RTSS processes to allocate memory from the process heap. The following example shows how to use this call with HeapAlloc.

Copy
HeapAlloc(GetProcessHeap(), 0, dwBytes);

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

windows.h

wRTOS_rtss.lib

See Also: