WaitFor is a TWaitResult function that waits until the signal of the event object is turned on. WaitFor will indefinitely until the event is signalled. WaitFor returns one of the following TWaitResult values:
- wrSignaled - The signal of the event object was set.
- wrAbandoned - The event object was destroyed before the event was signalled.
- wrError - An error occurred while waiting.
Check the LastError property for an error code giving more information.