Share via


CBaseAllocator::Commit (Compact 2013)

3/26/2014

Commits the memory for the specified buffers.

Syntax

HRESULT Commit(void);

Parameters

None.

Return Value

Returns an HRESULT value.

Remarks

This member function implements the IMemAllocator::Commit method.

The IMemAllocator::SetProperties method must be called before calling this member function.

This member function sets m_bCommitted to TRUE and overrides any pending decommit operation. It then calls the CBaseAllocator::Alloc member function to allocate memory, which should be overridden in the derived class to call the base class member function and then allocate the memory.

The IMemAllocator::GetBuffer method fails if it is called before calling this member function.

Call CBaseAllocator::Decommit to release memory when done with the buffers.

Requirements

Header

dshow.h,
Streams.h

Library

ole32.lib,
Ole32auth.lib,
Strmbase.lib,
Strmiids.lib,
uuid.lib

See Also

Reference

CBaseAllocator Class