RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TApplication.UnhookSynchronizeWakeup Method

Removes the method that was assigned to the WakeMainThread variable by HookSynchronizeWakeup.

Pascal
procedure UnhookSynchronizeWakeup;
C++
__fastcall UnhookSynchronizeWakeup();

Applications rarely, if ever, call UnhookSynchronizeWakeup directly. UnhookSynchronizeWakeup is called from the TApplication destructor. It resets the WakeMainThread variable to nil (Delphi) or NULL (C++) if that variable was set by the HookSynchronizeWakeup method.

Warning: You should not modify WakeMainThread for GUI applications because a working handler has been assigned. Console applications may assign a handler to WakeMainThread if the application needs to be notified of a thread synchronization call. If your console application assigns a handler, this is an optimization that only accelerates deliver of notification that a synchronization request is available. You must use CheckSynchronize to perforrm the synchronization itself.
 

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