Compartilhar via


FilgraphManager.GetState

 
Microsoft DirectShow 9.0

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.

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:

  

Requirements

Reference: Add a reference to ActiveMovie control type library.

Library: Quartz.dll.

See Also