Unit WThread |
******************************************************} {* *} {* Copyright (c) Dan Daley 1996 *} {* Contact: daley@guernsey.com *} {* URL: http://www.guernsey.com *} {* *} {* This code is provided as is for your use. It may *} {* be modified and redistributed. All I ask is that *} {* any modifications be described in this header and *} {* that you provide a means for others to contact you *} {* regarding your modifications. *} {* *} {* This code is not to be sold and must be distributed *} {* for free. *} {* *} {
Classes |
Functions |
Register - code that is called when a thread is ends execution
resume the user's thread
Types |
TSafeExecCode
TWinThreadEvent
TWinThreadException
TWinThreadInfo
TWinThreadParam
Constants |
WM_SafeExec
WM_ThreadException
WM_ThreadTerm
Variables |
Functions |
resume the user's thread
Types |
TSafeExecCode = procedure (Param: LongInt) of objectyour thread handle
TWinThreadEvent = function(Sender: TComponent; ThreadInfo: TWinThreadParam): THandle of Object
TWinThreadException = procedure(Sender: TComponent; ThreadInfo: TWinThreadInfo; E:Exception) of Object
TWinThreadInfo = recordTWinThreadInfo is used by start thread to execute your thread code
ThreadComp : TWinThread;
ThreadProc : TWinThreadEvent;
ThreadParam : pointer;
ThreadHandle : THandle;
SpawnEvent : THandle;
UserThread : Boolean;
end;
TWinThreadParam = recordTWinThreadParam is passed as an argument to your thread procedure
ThreadComp : TWinThread;
ThreadParam : pointer;
ThreadHandle : THandle;
end;
Constants |
Variables |