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
Data Structures


The Location Name Record

A location name identifies the location of a computer on the network. A location name is specified in the standard Name-Binding Protocol (NBP) form,
<object string>:PPCToolBox @<AppleTalk zone>. The object string is the name provided in the Sharing Setup control panel in the Control Panels folder. By default, the type string is "PPCToolBox". The AppleTalk zone is the zone to which the particular Macintosh computer belongs. For example, "Jane Doe's Macintosh:PPCToolBox@twilight" specifies the object string, type string, and AppleTalk zone for a particular computer.

The LocationNameRec data type defines the location name record. The locationKindSelector field can be set to ppcNoLocation, ppcNBPLocation, or ppcNBPTypeLocation.

TYPE LocationNameRec = 
   RECORD
      locationKindSelector: PPCLocationKind;    {which variant}
      CASE PPCLocationKind OF
         {ppcNoLocation: storage not used by this value}
         ppcNBPLocation:                     
                        (nbpEntity: EntityName); {NBP name entity}
         ppcNBPTypeLocation:     
                        (nbpType: Str32); {just the NBP type }
                                          { string for the }
                                          { PPCOpen function}
   END;
Field Description
locationKindSelector
An integer that determines how the location is specified. You can use either of the constants ppcNBPLocation or ppcNBPTypeLocation. (The PPC Toolbox uses the constant ppcNoLocation when the location received from or passed to a PPC Toolbox function is the location of the local machine.)
nbpEntity
If the locationKindSelector field specifies ppcNBPLocation, the nbpEntity field specifies a full NBP entity name.
nbpType
If the locationKindSelector field specifies ppcNBPTypeLocation, the nbpType field specifies an alias location name. This location kind is used only by the PPCOpen function when an alias location name is needed.
Note
You should assign an NBP value directly--do not pack it using nbpSetEntity.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996