DirectX SDK

IDirectDrawVideoPort::SetTargetSurface

The IDirectDrawVideoPort::SetTargetSurface method sets the DirectDraw surface object to 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 to receive the video data.
dwFlags
Value specifying the type of the target surface. One of the following flags:
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 it fails, the method can return one of the following error values:

DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dvp.h.
  Import Library: Use ddraw.lib.

See Also

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