Share via


FilgraphManager.GetState

Note  This topic is deprecated. It applies to Visual Basic 6.0. DirectShow is not supported for Visual Basic .NET or C#.

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

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 Value

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).

Examples

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

Requirements

Type Library

ActiveMovie control type library

DLL

Quartz.dll

See Also

FilgraphManager Object

 

 

Send comments about this topic to Microsoft

Build date: 8/31/2010