IAMDevMemoryAllocator::Alloc method (strmif.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Note  The IAMDevMemoryAllocator interface is deprecated.
 
Allocates a memory buffer.

Syntax

HRESULT Alloc(
  [out]     BYTE  **ppBuffer,
  [in, out] DWORD *pdwcbBuffer
);

Parameters

[out] ppBuffer

Pointer that will receive the address of the allocated memory buffer.

[in, out] pdwcbBuffer

Pointer to a DWORD whose input value is the number of bytes to allocate and whose output value is the actual number of bytes allocated.

Return value

Returns S_OK if the desired quantity of memory was allocated, S_FALSE if memory was unavailable.

Remarks

Call this method to allocate a block of memory from the available pool.

Requirements

Requirement Value
Target Platform Windows
Header strmif.h (include Dshow.h)

See also

Error and Success Codes

IAMDevMemoryAllocator Interface

IAMDevMemoryAllocator::Free