Important: The information in this document is obsolete and should not be used for new development.
The AppleTalk Pascal Interface
This section provides an overview of the two execution modes that you can use to execute routines that belong to the AppleTalk protocol interfaces.When your application calls an AppleTalk routine, you set a Boolean value as a param-
eter to the routine that directs the system software to execute the routine synchronously or asynchronously:
The first version of the AppleTalk Pascal interfaces is now referred to collectively as the alternate interface. Routines belonging to the alternate interface that were executed asynchronously signaled the application that the operation had completed through the use of a network event.
- If you set the routine to run synchronously, your application program cannot continue executing until the operation completes.
- If you set the routine to execute asynchronously, the system software returns control to your application program immediately and one of two methods is used to signal your program later when the operation completes; these methods are the use of a completion routine or a polling strategy.
The new interface was designed to be similar to that of the Device Manager and the
- Note
- The use of network events introduced problems that were remedied
by the creation of a new interface whose routines relied on the use
of a completion routine or a result-field polling strategy rather
than a network event as a completion-signaling mechanism for
asynchronous calls.
File Manager. Its routines use parameter blocks to pass input and output values.
The interface glue code converts the parameter block values into a Device ManagerPBControl
call to the appropriate AppleTalk device driver. Called the preferred interface in the past, this interface is now the standard AppleTalk interface.When writing new applications that use AppleTalk, you should use the routines belonging to the interface described in this book. Use of the alternate interface calls
could cause compatibility problems with current and future system software, although the alternate interface is still provided in the header files for backward compatibility.
- Note
- For functions that execute asynchronously, you must not move or dispose of the parameter block before the function completes execution; while the function is executing, AppleTalk owns the memory that you allocated for the function's use. After the call returns, you need to dispose of the memory allocated for the parameter block unless you intend to reuse the parameter block, for example, for another function.
Subtopics
- Executing Routines Synchronously or Asynchronously