ADC Home > Reference Library > Technical Notes > Legacy Documents > Carbon >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

PPC Toolbox Q&As


This Technical Note contains a collection of archived Q&As relating to a specific topic--questions sent the Developer Support Center (DSC) along with answers from the DSC engineers. Current Q&As can be found on the Macintosh Technical Q&As web site.

[Oct 01 1990]

PPC Toolbox and its use of AppleTalk protocol layers

Date Written: 6/21/91

Last reviewed: 11/6/91

Can I use the PPC Toolbox's program linking dialog interface via the PPCBrowser function with AppleTalk protocols such as ADSP, ATP, and DDP? If not, can I access the ADSP data structures used by the PPC Toolbox?


The PPCBrowser function is for use by applications that use the PPC Toolbox, high-level events, or Apple events (high-level events and Apple events depend on the services of the PPC Toolbox). The PPCBrowser uses the functions GetZoneList, PLookupName, and IPCListPorts to fill the AppleTalk Zones, Macintoshes, and Programs lists in the program linking dialog. Since the IPCListPorts function returns a list of PPCPorts at a particular location, it isn't useful for AppleTalk protocols and thus, makes the PPCBrowser function unsuitable for use with AppleTalk protocols which don't have PPCPorts associated with them. It's fairly easy for an application to create a browsing dialog for AppleTalk protocols that has two lists, one for zones found with GetZoneList and one for entity names found with PLookupName. See the "dmz" example on the Macintosh System Software 7 Golden Master CD for example code that builds two such lists.

Although the PPC Toolbox currently uses ADSP as the transport mechanism to communicate with other Macintosh systems, the ADSP structures used by the PPC Toolbox aren't accessible for good reason: The transport mechanism used by the PPC Toolbox could change in the future to support other transport mechanisms besides ADSP. (On the local machine, PPC transfers the data directly, circumventing ADSP.) If you really need to use ADSP in a way that the PPC Toolbox does not, then you should skip the PPC Toolbox and use ADSP directly.

Call PPCEnd before PPCClose

Date Written: 9/3/91

Last reviewed: 8/1/92

Before closing a PPC port with PPCClose, is it necessary to call PPCEnd for my open sessions?


It isn't always necessary to call PPCEnd before closing a PPC port. Calling PPCClose by itself will invalidate any active sessions for the given port and force the completion routines of all outstanding asynchronous calls to be called. This should be sufficient to close the port.

However, there are a few instances where you will want to call PPCEnd. If an error is returned in the completion routine of an asynchronous PPCRead or PPCWrite call you should then call PPCEnd asynchronously. This will allow PPC Toolbox resources to be released so they may be reused. If PPCEnd is not called in this manner, it will prevent the PPC Toolbox from cleaning up resources that it used for the active session.

Apple events and user authentication

Date Written: 11/6/91

Last reviewed: 3/25/99 (updated to point to latest AutoGuest software)

I'd like to be able to start an Apple event-based session between two machines that are networked together without the user identity dialog box that always comes up, even if I only want to use Guest access. Is there any way I can use the PPC Toolbox's PPCStart function to create a Guest session and use it for Apple Events?


Sessions set up by the Apple Event Manager with other Macintosh computers are always authenticated. That's why you always get to see the user identity dialog box, even if you want to use Guest access. You're always automatically authenticated with other processes on the local system, and that's the only time you won't see the user identity dialog box.

You cannot use the PPC Toolbox to start a session and then pass that session off to the Apple Event Manager, even though the PPC Toolbox is the underlying transport mechanism used to send Apple events to other systems. By isolating the Apple Event Manager from the transport layer it uses to send Apple events as much as possible, Apple can change which transport layers are used in the future without breaking your applications.

If you really need to have connections made with no user intervention, you'll have to use the PPC Toolbox or go directly to one of the AppleTalk protocol layers. If you choose the PPC Toolbox, you'll have to make sure Guest access is allowed on the system you're trying to connect to or you'll still have to authenticate the session. (The authRequired field in the PortInfoRec returned by the PPCBrowser or IPCListPorts functions will be FALSE if Guest program linking is allowed). Since Guest access is global on a particular system and since some people may be nervous about allowing guests to Link with all high-level event aware applications on their systems, you might want to consider ADSP instead since it doesn't require any user authentication.

An unsupported init called AutoGuest, available on the Developer CD Series as well as our ftp site, circumvents this limitation by means of trap patches. DTS can't recommend using this init, however, because it almost certainly will break in future software builds.

Back to top


Acrobat gif

Acrobat version of this Note (32K)


Back to top

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.