MFHeapAlloc function (mfapi.h)

Allocates a block of memory.

Syntax

void * MFHeapAlloc(
  [in] size_t          nSize,
  [in] ULONG           dwFlags,
  [in] char            *pszFile,
  [in] int             line,
  [in] EAllocationType eat
);

Parameters

[in] nSize

Number of bytes to allocate.

[in] dwFlags

Zero or more flags. For a list of valid flags, see HeapAlloc in the Windows SDK documentation.

[in] pszFile

Reserved. Set to NULL.

[in] line

Reserved. Set to zero.

[in] eat

Reserved. Set to eAllocationTypeIgnore.

Return value

If the function succeeds, it returns a pointer to the allocated memory block. If the function fails, it returns NULL.

Remarks

In the current version of Media Foundation, this function is equivalent to calling the HeapAlloc function and specifying the heap of the calling process.

To free the allocated memory, call MFHeapFree.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header mfapi.h
Library Mfplat.lib
DLL Mfplat.dll

See also

Media Foundation Functions