IDirectDrawVideoPort::SetTargetSurface

The IDirectDrawVideoPort::SetTargetSurface method sets the DirectDraw surface object that will receive the stream of live video data and/or the vertical blank interval data.

HRESULT SetTargetSurface(

LPDIRECTDRAWSURFACE lpDDSurface,

DWORD dwFlags

);

Parameters

lpDDSurface

Address of the DirectDrawSurface object that will receive the video data.

dwFlags

Value specifying the type of target surface.

DDVPTARGET_VIDEO The specified surface should receive the normal video data and vertical interval data unless a separate surface was attached for this purpose.
DDVPTARGET_VBI The specified surface should receive the data within the vertical blanking interval.

Return Values

If the method succeeds, the return value is DD_OK.

If the method fails, the return value may be one of the following error values:

DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS

QuickInfo

  Windows NT: Use version 5.0 or later.
  Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in dvp.h.
  Import Library: Use ddraw.lib.

See Also

IDirectDrawVideoPort::StartVideo, IDirectDrawVideoPort::StopVideo, IDirectDrawVideoPort::UpdateVideo