IAMDevMemoryAllocator::GetDevMemoryObject

This method retrieves an IUnknown interface pointer to a device memory control object that can be aggregated with a custom allocator.

HRESULT GetDevMemoryObject(
  IUnknown** ppUnkInnner,
  IUnknown* pUnkOuter
);

Parameters

  • ppUnkInnner
    [out] Address of a pointer to the newly created control object's own IUnknown. This inner IUnknown interface should be released when the outer object is destroyed. The custom allocator should call the QueryInterface method on this pointer to obtain the IAMDevMemoryControl interface.
  • pUnkOuter
    [in] Pointer to the custom allocator's own IUnknown interface. This interface aggregates the device memory control object inside the custom allocator.

Return Values

Returns an HRESULT value that depends on the implementation of the interface.

Remarks

The device memory control object is necessary to aggregate with the custom allocator, because renderers that require the use of on-board memory will query for IAMDevMemoryControl when they receive a new allocator, to verify that the memory is from the same device. This occurs because the hardware filter will receive an IMemAllocator object, which might or might not use the on-board memory. To decide if it is a compatible allocator, the object would query for the IAMDevMemoryControl interface to access specific methods. The IAMDevMemoryControl creates an aggregated object that implements the methods of IAMDevMemoryControl (these are often hardware-specific).

See COM documentation for rules on how the outer object implements aggregation.

Requirements

DirectShow applications and DirectShow filters have different include file and link library requirements. See Setting Up the Build Environment for more information.

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header:

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.