Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking With Open Transport / Part 2 - Open Transport Reference
Chapter 23 - Programming With Open Transport Reference / Functions
Working With System Tasks /


OTDestroySystemTask

Destroys a system task created with the OTCreateSystemTask function.

C INTERFACE
OSStatus OTDestroySystemTask(long stCookie)
C++ INTERFACE
None. C++ applications use the C interface to this function.

PARAMETERS
stCookie
A reference value that identifies the system task to be destroyed.
function result
The result kOTNoError.
DISCUSSION
The OTDestroySystemTask function makes the stCookie reference invalid and frees any resources allocated to the task when it was created. You can call this function when you no longer need to schedule the system task, such as when it has executed and you have no plans to reschedule it for later use. If stCookie is already invalid (a value of 0), the function returns kOTNoError and does nothing.

If you try to destroy a task that is still scheduled for execution, the OTDestroySystemTask function cancels it first, so that it is no longer scheduled for system task execution, and then destroys it. If the task has already been canceled, the OTDestroySystemTask function simply destroys it.

SEE ALSO
The OTCreateSystemTask function.

The OTScheduleSystemTask function.

The OTCancelSystemTask function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998