A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/windows/win32/api/HeapApi/nf-heapapi-getprocessheap below:

GetProcessHeap function (heapapi.h) - Win32 apps

GetProcessHeap function (heapapi.h)

In this article

Retrieves a handle to the default heap of the calling process. This handle can then be used in subsequent calls to the heap functions.

Syntax
HANDLE GetProcessHeap();
Return value

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. To get extended error information, call GetLastError.

The GetProcessHeap function obtains a handle to the default heap for the calling process. A process can use this handle to allocate memory from the process heap without having to first create a private heap using the HeapCreate function.

Windows Server 2003 and Windows XP: To enable the low-fragmentation heap for the default heap of the process, call the HeapSetInformation function with the handle returned by GetProcessHeap.

Examples

For an example, see Getting Process Heaps.

Requirements Requirement Value Minimum supported client Windows XP [desktop apps | UWP apps] Minimum supported server Windows Server 2003 [desktop apps | UWP apps] Target Platform Windows Header heapapi.h (include Windows.h) Library Kernel32.lib DLL Kernel32.dll See also

Heap Functions

HeapCreate

Memory Management Functions

Vertdll APIs available in VBS enclaves

Additional resources

In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4