IMFMediaEventGenerator::GetEvent method (mfobjects.h)
Retrieves the next event in the queue. This method is synchronous.
Syntax
HRESULT GetEvent(
[in] DWORD dwFlags,
[out] IMFMediaEvent **ppEvent
);
Parameters
[in] dwFlags
Specifies one of the following values.
Value | Meaning |
---|---|
|
The method blocks until the event generator queues an event. |
|
The method returns immediately. |
[out] ppEvent
Receives a pointer to the IMFMediaEvent interface. The caller must release the interface.
Return value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
The method succeeded. |
|
NULL pointer argument. |
|
There is a pending request. |
|
There are no events in the queue. |
|
The object was shut down. |
Remarks
This method executes synchronously.
If the queue already contains an event, the method returns S_OK immediately. If the queue does not contain an event, the behavior depends on the value of dwFlags:
- If dwFlags is 0, the method blocks indefinitely until a new event is queued, or until the event generator is shut down.
- If dwFlags is MF_EVENT_FLAG_NO_WAIT, the method fails immediately with the return code MF_E_NO_EVENTS_AVAILABLE.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | mfobjects.h (include Mfidl.h) |
Library | Mfuuid.lib |