Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method switches the entire filter graph into a running state.

Syntax

HRESULT Run( );

Parameters

None.

Return Value

Returns S_OK if the graph is actually running.

Returns S_FALSE if the graph is preparing to run (the graph will run automatically when it is ready). Call GetStateto wait for the transition to the running state to complete or to check if the transition has completed. If the method returns S_FALSE, subsequent calls to GetStatewill return the value State_Running from the FILTER_STATEenumeration when the graph is actually running. If the transition to the running state is not complete GetStatecan return a return code of VFW_S_STATE_INTERMEDIATE.

Returns an HRESULTerror code if the graph could not run and is now stopped.

Remarks

In a running state, data is pushed down the filter graph and rendered. The graph remains in a running state until it is stopped by the IMediaControl::Pauseor IMediaControl::Stopmethod. The graph remains in a running state even after notifying the application of completion (that is, the EC_COMPLETEnotification is sent to the application). This allows the application to determine whether to pause or stop after completion.

If the filter graph is in the stopped state, this method first pauses the graph before running.

If an error value is returned, some filters within the graph might have successfully entered the running state. In a multistream graph, entire streams might be playing successfully. The application must determine whether to stop running or not.

Requirements

Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment,
Version 2.12 requires DXPAK 1.0 or later

See Also