共用方式為


IMediaEvent.WaitForCompletion

 
Microsoft DirectShow 9.0

IMediaEvent.WaitForCompletion

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

The WaitForCompletion method waits for the filter graph to render all available data.

Syntax

  objMediaEvent
  .WaitForCompletion(
    msTimeout As Long,
 ByRef EvCode As Long)

Parameters

msTimeout

Time-out interval, in milliseconds, or -1 to block indefinitely. 

EvCode

Variable that receives an event code, or zero if the time-out expires.

Return Values

This method does not return a value.

Remarks

This method blocks until the time-out expires, or one of the following events occurs:

During the wait, the method discards all other event notifications.

The filter graph must be running or the method fails. If the time-out expires, the method raises run-time error 287, and sets EvCode to zero.

Example Code

The following example uses a time-out of zero:

On Error Resume Next
Dim EvCode As Long
iEvent.WaitForCompletion 0, EvCode  'Return immediately
If EventCode <> 0 Then
    ' Playback has stopped.
End If

Requirements

Reference: Add a reference to ActiveMovie control type library.

Library: Quartz.dll.

See Also