Freigeben über


AllocateHeap function

The AllocateHeap function allocates memory on the heap. Memory allocated with this routine must be freed using the FreeHeap function.

Syntax

PVOID AllocateHeap(
  _In_ ULONG Length
);

Parameters

  • Length [in]
    Number of bytes to allocate.

Return value

This function returns a pointer to the allocated memory. If memory could not be allocated, the function returns NULL.

Remarks

To free memory allocated by the AllocateHeap function use the FreeHeap function.

A pointer to the AllocateHeap function is available in the SECPKG_DLL_FUNCTIONS structure received from the SpInstanceInit function.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Ntsecpkg.h

See also

FreeHeap

SECPKG_DLL_FUNCTIONS

SpInstanceInit