Microsoft DirectX 8.1 (C++)

IVMRSurfaceAllocatorNotify::AdviseSurfaceAllocator

This topic applies to Windows XP Home Edition and Windows XP Professional only.

The AdviseSurfaceAllocator method is called by an application to instruct the VMR to use a custom allocator-presenter.

Syntax

HRESULT AdviseSurfaceAllocator(
  DWORD_PTR  dwUserID,
  IVMRSurfaceAllocator*  lpIVRMSurfaceAllocator
);

Parameters

dwUserID

[in] An application-defined DWORD_PTR that uniquely identifies this instance of the VMR in scenarios when multiple instances of the VMR are being used with a single instance of an allocator-presenter.

lpIVMRSurfaceAllocator

[in]  Specifies the IVMRSurfaceAllocator interface on the new allocator-presenter. If this value is NULL, then the VMR will release the client allocator-presenter and restore its default allocator-presenter.

Return Values

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method will cause the default allocator-presenter to be uninstalled and destroyed, and replaced with the specified new component.

See Also