Microsoft DirectX 9.0

FilgraphManager.GetState

The GetState method retrieves the current state of the filter graph.

Syntax

objGraph.GetState(
    msTimeout As Long, 
    ByRef State As Long)

Parameters

msTimeout

Specifies the duration to wait for the graph to complete a state transition, in milliseconds.

State

Variable that receives the current state. When the method returns, this variable will have one of the following values.

Value Description
0 Stopped
1 Paused
2 Running

Return Values

This method does not return a value.

Remarks

If the filter graph is transitioning to a new state, the method waits for the transition to complete, up to the duration specified by the msTimeout method. If this duration expires before the transition is complete, the method returns the new state and sets Err.Number to 567 (VFW_S_STATE_INTERMEDIATE).

Example Code

The following example checks whether the filter graph is stopped:

Dim state As Long
mGraph.GetState 100, state
If state = 0 Then
    ' Filter graph is stopped.
End If

See Also