IMediaEvent.GetEvent
Note This topic is deprecated. It applies to Visual Basic 6.0. DirectShow is not supported for Visual Basic .NET or C#.
The GetEvent method retrieves the next event notification from the event queue.
objMediaEvent.GetEvent(
ByRef lEventCode As Long,
ByRef lParam1 As Long,
ByRef lParam2 As Long,
msTimeout As Long)
Parameters
lEventCode
Variable that receives the event code.lParam1
Variable that receives the first event parameter.lParam2
Variable that receives the first event parameter.msTimeout
Time-out interval, in milliseconds. Use -1 to block until there is an event.
Return Value
This method does not return a value.
Remarks
If no event is on the queue, this method waits up to msTimeout milliseconds for one to arrive. If the time-out expires, the method raises run-time error 287.
After calling this method, call the IMediaEvent.FreeEventParams method, to release any resources allocated for the event parameters.
Examples
Dim EvCode As Long, Param1 As Long, Param2 As Long
On Error Resume Next
Do
mEvent.GetEvent EvCode, Param1, Param2, 100
If Err.Number = 0 Then
mEvent.FreeEventParams EvCode, Param1, Param2
' Handle the event. (Not shown.)
End If
Loop While Err.Number = 0
Requirements
Type Library |
ActiveMovie control type library |
DLL |
Quartz.dll |
See Also
Send comments about this topic to Microsoft
Build date: 8/31/2010