Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
Retrieves a handle to a manual-reset event that will be signaled as long as there are event notifications to deliver.
HRESULT GetEventHandle( OAEVENT * hEvent );
Parameters
Return Values
Returns an HRESULTvalue.
Remarks
You can monitor events (including the retrieved event) and messages on a single thread; to do this, declare a HANDLE variable, cast it to an OAEVENT pointer, then pass it to GetEventHandle. You must cast the pointer to an OAEVENT pointer because HANDLE is not a valid OLE Automation type. The following code fragment demonstrates how to cast and use the HANDLE.
HANDLE hEvent; GetEventHandle( (OAEVENT*)
&hEvent );
You can pass the retrieved event handle to the Microsoft Win32 WaitForMultipleObjectsor MsgWaitForMultipleObjectsfunctions to wait for event notifications at the same time as other messages and events on a single thread. The implementation of GetEventsets and resets the handle within the application, so applications should not reset the handle themselves.