DirectShow Animated Header -- IAMVfwCaptureDialogs Interface DirectShow Animated Header -- IAMVfwCaptureDialogs Interface* Microsoft DirectShow SDK
*Index  *Topic Contents
*Previous Topic: IAMTVTuner Interface
*Next Topic: IAMVfwCompressDialogs Interface

IAMVfwCaptureDialogs Interface


The IAMVfwCaptureDialogs interface enables an application to display one of the three dialog boxes (Source, Format, or Display) provided by Microsoft® Video for Windows® capture drivers.

When to Implement

The Video for Windows VFW Video Capture filter implements this interface. It isn't expected that anything else will implement this interface.

When to Use

Any application that enables the user to change settings in a Video for Windows capture driver-supplied dialog box should use this interface.

Methods in Vtable Order
IUnknown methods Description
QueryInterface Retrieves pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IAMVfwCaptureDialogs methods Description
HasDialog Determines if the specified dialog box exists in the driver.
ShowDialog Displays the specified dialog box.
SendDriverMessage Sends a driver-specific message.


IAMVfwCaptureDialogs::HasDialog

IAMVfwCaptureDialogs Interface

Determines if the specified dialog box exists in the driver.

HRESULT HasDialog(
  int iDialog );

Parameters
iDialog
[in] Desired dialog box. This is a member of the VfwCaptureDialogs enumerated data type.
Return Values

Returns S_OK if the driver contains the dialog box or S_FALSE otherwise.

Remarks

This method calls the Video for Windows videoDialog function to query for the existence of the appropriate dialog box.


IAMVfwCaptureDialogs::SendDriverMessage

IAMVfwCaptureDialogs Interface

Sends a driver-specific message.

HRESULT SendDriverMessage(
  int iDialog,
  int uMsg,
  long dw1,
  long dw2 );

Parameters
iDialog
[in] Handle of the driver dialog box. This is a member of the VfwCaptureDialogs enumerated data type.
uMsg
[in] Message to send to the driver.
dw1
[in] Message data.
dw2
[in] Message data.
Return Values

Return value varies depending on the implementation within each driver.

Remarks

You should never need to use this method. This method can send any private message to the capture driver. Behavior might be undetermined in response to arbitrary messages; use this method at your own risk.

This method calls the Video for Windows videoMessage function to send the driver message.


IAMVfwCaptureDialogs::ShowDialog

IAMVfwCaptureDialogs Interface

Displays the specified dialog box.

HRESULT ShowDialog(
  int iDialog,
  long hwnd );

Parameters
iDialog
[in] Dialog box to display. This is a member of the VfwCaptureDialogs enumerated data type.
hwnd
[in] Handle of the dialog box's parent window.
Return Values

Returns an HRESULT value that depends on the implementation of the interface.

Remarks

You can't use this method when the driver is streaming or displaying another dialog box. While the driver displays the dialog box you can't stream (pause or run) the filter.

IAMVfwCaptureDialogs::ShowDialog calls the Video for Windows® videoDialog function to display the appropriate dialog box.

Asking this method to bring up a VfwCaptureDialog_Format dialog box will return the VFW_E_CANNOT_CONNECT error code if a capture filter is already connected in a graph and the existing graph cannot accept the new format. Capture applications must rebuild the part of the filter graph that is downstream of the capture filter if this error occurs. See the AMCAP sample code for an example of how to do this.

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page