Compartir a través de


CImageAllocator::Alloc

 
Microsoft DirectShow 9.0

CImageAllocator::Alloc

The Alloc method allocates memory for the buffers. This method overrides the CBaseAllocator::Alloc method.

Syntax

  HRESULT Alloc(void);

Return Value

Returns an HRESULT value. Possible values include the following.

Value Description
S_OK Success
E_OUTOFMEMORY Insufficient memory

Remarks

This method is called by the CBaseAllocator::Commit method, when the filter commits the allocator.

This method creates a list of media samples, which are implemented as CImageSample objects. Each sample contains a GDI device-independent bitmap, using the GDI CreateDIBSection function.

Internally this method calls CImageAllocator::CreateDIB to create each DIB, and CImageAllocator::CreateImageSample to create each sample.

Requirements

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

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

See Also