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: Interapplication Communication /
Chapter 11 - Program-to-Program Communications Toolbox / PPC Toolbox Reference
Application-Defined Routines / Completion Routines for PPC Toolbox Routines


MyCompletionRoutine

You can provide a completion routine for a PPC Toolbox routine that you execute asynchronously.

PROCEDURE MyCompletionRoutine (pb: PPCParamBlockPtr);
pb
A pointer to the PPC parameter block passed to the PPC Toolbox function.
DESCRIPTION
If you specify a completion routine in the ioCompletion field of a PPC parameter block, it is called at interrupt time when the PPC Toolbox routine completes execution. The PPC Toolbox passes to your completion routine a pointer to the same PPC parameter block that your application passed to the PPC Toolbox routine.

WARNING
Completion routines execute at the interrupt level and must preserve all registers other than A0, A1, and D0-D2. (Note that MPW C and MPW Pascal do this automatically.) Your completion routine must not make any calls to the Memory Manager, directly or indirectly, and it can't depend on the validity of handles to unlocked blocks. The PPC Toolbox preserves the application global register A5.
SEE ALSO
For examples of completion routines, see Listing 11-9 on page 11-37, Listing 11-11 on page 11-38, and Listing 11-13 on page 11-39.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996