Microsoft Windows CE 3.0  

CBaseAllocator::Alloc

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Allocates a media sample object.

HRESULT Alloc(void);

Return Values

Returns an HRESULTvalue.

Remarks

Override this member function to allocate memory, instantiate CMediaSampleobjects, and add them to the free list represented by the m_lFreedata member. The CMemAllocator::Allocmember function is an example of an override of this member function. It calls this member function first to ensure that allocator properties have been set.

This member function is called from the CBaseAllocator::Commitmember function when entering the active state. The default implementation returns an error value if the IMemAllocator::SetPropertiesmethod has not been called yet, and checks that there are no outstanding buffers.