IEventManager::WaitOnEvent
Description
Waits for an occurrence of the specified event for a given session. In particular, this function suspends execution of an application thread and waits for an event inEventType for at least the time period specified by timeout. The resource will continue to service the Windows Message Loop, allowing single-threaded clients to continue to be responsive. See the individual event descriptions for context definitions.
If the specified inEventType is ALL_ENABLED_EVENTS, the function waits for any event that is enabled for the given session. If the specified timeout value is TMO_INFINITE, the function is suspended indefinitely.
VB Prototype
value As
IEvent = WaitOnEvent(
waitTimeout As Long,
type As EventType, ' Optional Parameter
customEventType As Long ' Optional Parameter
)
C++ Prototype
HRESULT WaitOnEvent(
long waitTimeout,
EventType type,
long customEventType,
IEvent** pEvent
);
Parameters
waitTimeout
The minimum time to wait for an event.
type
[Optional in Visual Basic] The type of event to wait for.
customEventType
[Optional in Visual Basic] If the event type property is CUSTOM_EVENT_TYPE, this argument contains the custom event type number, otherwise it is ignored.
pEvent
If the method is successful, IEvent interface of the received event.
Return Value
Refer to the table of return codes.
See Also
ComponentVersion, SpecVersion, HardwareInterfaceName, HardwareInterfaceNumber, HardwareInterfaceType, LockState, OptionString, ProgID, ResourceName, SessionType, SoftwareManufacturerID, SoftwareManufacturerName, Timeout, LastStatus, MaximumQueueLength, GetAttribute, SetAttribute, LockRsrc, UnlockRsrc, Init, Close, EnableEvent, DisableEvent, DiscardEvents, WaitOnEvent, InstallHandler, UninstallHandler, IEventManager Overview