IDirectDrawVideoPort::GetBandwidthInfo

The IDirectDrawVideoPort::GetBandwidthInfo method retrieves the minimum required overlay zoom factors and device limitations of a video port that uses the provided output pixel format.

HRESULT GetBandwidthInfo( 
  LPDDPIXELFORMAT lpddpfFormat,       
  DWORD dwWidth,                      
  DWORD dwHeight,                     
  DWORD dwFlags,                      
  LPDDVIDEOPORTBANDWIDTH lpBandwidth  
);
 

Parameters

lpddpfFormat
Address of a DDPIXELFORMAT structure that describes the output pixel format for which bandwidth information will be retrieved.
dwWidth and dwHeight
Dimensions of an overlay or video data. These interpretation of these parameters depends on the value specified in the dwFlags parameter.
dwFlags
Flags indicating how the method is to interpret the dwWidth and dwHeight parameters. This parameter can be one of the following values.
DDVPB_OVERLAY
The dwWidth and dwHeight parameters indicate the size of the source overlay surface. Use this flag when the video port is dependent on the overlay source size.
DDVPB_TYPE
The dwWidth and dwHeight parameters are not set. The method will retrieve the device's dependency type in the dwCaps member of the associated DDVIDEOPORTBANDWIDTH structure. Use this flag when you call this method the first time.
DDVPB_VIDEOPORT
The dwWidth and dwHeight parameters indicate the prescale size of the of the video data that the video port writes to the frame buffer. Use this flag when the video port is dependent on the overlay zoom factor.

lpBandwidth
Address of a DDVIDEOPORTBANDWIDTH structure that will be filled with the retrieved bandwidth and device dependency information.

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

Remarks

This method will usually be called twice. When you make the first call, specify the DDVPB_TYPE flag in the dwFlags parameter to retrieve information about device's overlay dependency type. Subsequent calls using the DDVPB_VIDEOPORT or DDVPB_OVERLAY flags must be interpreted considering the device's dependency type.

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.