Important: The information in this document is obsolete and should not be used for new development.
MyOTProcessProc
Defines a callback function.
pascal void MyOTProcessProc (void* arg);
arg
- A pointer to user-defined context information.
DISCUSSION
The user-defined functionMyOTProcessProc
defines a function that Open Transport executes as a system task, deferred task, or timer task.
- To have the function execute at system task time, you must first call the function
OTCreateSystemTask
, passing the address of the function for theproc
parameter and a pointer to any context information for thearg
parameter. The functionOTCreateSystemTask
returns a reference to the newly created task which you then pass as thestCookie
parameter to theOTScheduleSystemTask
function , which schedules the task to run. When Open Transport executes the task, it passes it the value you specified for thearg
parameter when you created the task.- To have the function execute at some specified interval (timer task), you must first call the function
OTCreateTimertask
, passing the address of the function for the proc paramter and a pointer to any context information for the arg parameter. TheOTCreateTimertask
function returns a reference to the newly created task which you can then pass as thetimerTask
parameter to theOTScheduleTimerTask
function , which you use to schedule the task. Use theOTCancelTimerTask
function to cancel the task and theOTDestroyTimerTask
function to dispose of it.- To have the function execute at deferred task time, you must first call the function
OTCreateDeferredTask
, passing the address of the function for theproc
parameter and a pointer to any context information for thearg
parameter. The functionOTCreateDeferredTask
returns a reference to the newly created task which you then pass as thedtCookie
parameter to theOTScheduleDeferredTask
function , which schedules the task to run. When Open Transport executes the task, it passes it the value you specified for thearg
parameter when you created the task.
SEE ALSO
See also "Programming With Open Transport" for additional information about system tasks, timer tasks, and deferred tasks.