Microsoft DirectX 9.0 |
The GetEvent method retrieves the next event notification from the event queue.
Syntax
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 Values
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.
Example Code
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
See Also