Microsoft DirectX 9.0

IVMRWindowlessControl9::GetCurrentImage

The GetCurrentImage method retrieves a copy of the current image being displayed by the VMR.

Syntax

HRESULT GetCurrentImage(
  BYTE**  lpDib
);

Parameters

lpDib

[out]  Address of a pointer to a BYTE that will receive the DIB.

Return Values

The method returns an HRESULT. Possible values include those in the following table.

Value Description
S_OK The method succeeded.
VFW_E_WRONG_STATE The VMR is not in windowless mode.

Remarks

This image is returned in the form of packed Windows DIB. The GetCurrentImage method can be called at any time, regardless of whether the filter is running, stopped, or paused. The caller must free the returned memory by calling CoTaskMemFree. Excessive use of this function will degrade video playback performance.

Requirements

Include D3d9.h, Vmr9.h.

See Also