Microsoft DirectX 9.0

IVMRWindowlessControl::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

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

Error Code Description
VFW_E_WRONG_STATE The VMR is not in windowless mode.

Remarks

GetCurrentImage returns the current image being displayed. This image is returned in the form of packed Windows DIB. GetCurrentImage can be called at any time, no matter what state the filter is in, whether running, stopped or paused.

The caller is responsible for freeing the returned memory by calling the COM runtime method CoTaskMemFree.

Excessive use of this function will degrade video playback performance.

See Also