RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
THandleObject.WaitFor Method

Waits until this THandleObject object enters into the signaled state.

Pascal
function WaitFor(Timeout: LongWord): TWaitResult; virtual;
C++
virtual __fastcall TWaitResult WaitFor(LongWord Timeout);

Call WaitFor to wait until a THandleObject object enters into the signaled state. If the signaled state is not reached after TimeOut milliseconds, WaitFor returns anyway.  

Use INFINITE value for the TimeOut parameter to force WaitFor to wait an infinite amount of time.  

The function returns a result of TWaitResult type that can be used to detect how the operation finished. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!