MyOTProcessProc
Defines a callback function.
pascal void MyOTProcessProc (void* arg);
arg
- A pointer to user-defined context information.
DISCUSSION
The user-defined function MyOTProcessProc 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 the proc parameter and a pointer to any context information for the arg parameter. The function OTCreateSystemTask returns a reference to the newly created task which you then pass as the stCookie parameter to the OTScheduleSystemTask function , which schedules the task to run. When Open Transport executes the task, it passes it the value you specified for the arg 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. The OTCreateTimertask function returns a reference to the newly created task which you can then pass as the timerTask parameter to the OTScheduleTimerTask function , which you use to schedule the task. Use the OTCancelTimerTask function to cancel the task and the OTDestroyTimerTask 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 the proc parameter and a pointer to any context information for the arg parameter. The function OTCreateDeferredTask returns a reference to the newly created task which you then pass as the dtCookie parameter to the OTScheduleDeferredTask function , which schedules the task to run. When Open Transport executes the task, it passes it the value you specified for the arg 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.