| Microsoft DirectX 8.1 (C++) |
The Alloc method allocates memory for the buffers.
Syntax
virtual HRESULT Alloc(void);
Return Value
Returns one of the following HRESULT values.
| Value | Description |
| S_FALSE | Buffer requirements have not changed. |
| S_OK | Buffer requirements have changed. |
| VFW_E_SIZENOTSET | Buffer requirements were not set. |
Remarks
This method is called by the CBaseAllocator::Commit method.
In the base class, this method does not allocate any memory. It returns an error if the buffer requirements were not set, S_FALSE if the requirements have not changed, and S_OK if the requirements have changed.
A derived class should override this method to perform the actual memory allocation. Typically, the derived class will perform the following steps:
For an example, see CMemAllocator::Alloc.
See Also