Export (0) Print
Expand All

CImageAllocator.Alloc method

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

Syntax


HRESULT Alloc();

Parameters

This method has no parameters.

Return value

Returns an HRESULT value. Possible values include the following.

Return codeDescription
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

Winutil.h (include Streams.h)

Library

Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CImageAllocator Class

 

 

Community Additions

ADD
Show:
© 2014 Microsoft