Microsoft DirectX 9.0


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


HRESULT Alloc(void);

Return Value

Returns an HRESULT value. Possible values include the following.

Value Description
S_OK Success
E_OUTOFMEMORY Insufficient memory


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.

See Also