CMemAllocator::Alloc

 
Microsoft DirectShow 9.0

CMemAllocator::Alloc

The Alloc method allocates memory for the buffers.

Syntax

  HRESULT Alloc(void); 

Return Value

Returns one of the HRESULT values shown in the following table.

Value Description
S_OK Success.
E_OUTOFMEMORY Insufficient memory.
VFW_E_SIZENOTSET Buffer requirements were not set.

Remarks

This method is called by the CBaseAllocator::Commit method. It allocates a contiguous block of memory sufficient for the buffer requirements given in the CMemAllocator::SetProperties method.

Requirements

**  Header:** Declared in Amfilter.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also