|Microsoft DirectX 9.0|
The WaitForCompletion method waits for the filter graph to render all available data.
objMediaEvent.WaitForCompletion( msTimeout As Long, ByRef EvCode As Long)
Time-out interval, in milliseconds, or -1 to block indefinitely.
Variable that receives an event code, or zero if the time-out expires.
This method does not return a value.
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.
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