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 PPC Port Record

A PPC port name is defined by a PPC port record. The PPCPortRec data type defines the PPC port record.

TYPE PPCPortRec = 
   RECORD
      nameScript:       ScriptCode;       {script identifier}
      name:             Str32;            {port name in program } 
                                          { linking dialog box}
      portKindSelector: PPCPortKinds;     {general category of }
                                          { application}
      CASE PPCPortKinds OF
                        ppcByString:      (portTypeStr: Str32);
                        ppcByCreatorAndType: 
                                          (portCreator: OSType;
                                          portType: OSType);
   END;
Field Description
nameScript
An integer script code.
name
A string that designates the application name.
portKindSelector
An integer that selects the kind of type string (either ppcByString or ppcByCreatorAndType).
portTypeStr
If the portKindSelector field specifies ppcByString, the portTypeStr field contains a 32-byte character string.
portCreator
If the portKindSelector field specifies ppcByCreatorAndType, the portCreator field contains a 4-character creator code.
portType
If the portKindSelector field specifies ppcByCreatorAndType, the portType field contains a 4-character type code.
To open a port, you need to specify a port name. As previously described, a port name consists of a script code, a name string, and a type string. For example, you can designate "smRoman" as the script code, "make memo" as the application's name string, and "word processor" as its type string.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996