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: Macintosh Toolbox Essentials /
Chapter 2 - Event Manager / Event Manager Reference
Data Structures


The Target ID Record

When you send a high-level event to another application, you can use the target ID record to specify the recipient of the event. When you receive a high-level event, the AcceptHighLevelEvent function uses a target ID record to return information about the sender of the event.

The TargetID data type defines the target ID record.

TYPE  TargetID = 
      RECORD
         sessionID:  LongInt;          {session reference number}
         name:       PPCPortRec;       {port name}
         location:   LocationNameRec;  {location name}
         recvrName:  PPCPortRec;       {reserved}
      END;
Field Description
sessionID
For high-level events that your application receives, this field contains the session reference number created by the PPC Toolbox. This is a 32-bit number that uniquely identifies a PPC Toolbox session (or connection) with another application. This field is not used by your application when sending a high-level event to another process. (To send a high-level event that specifies the recipient by session reference number, provide a pointer to a session reference number in the receiverID parameter and use the receiverIDisSessionID constant in the postingOptions parameter to PostHighLevelEvent.)
name
For high-level events that your application receives, this field contains a PPC port record that specifies the port name of the process from which the high-level event originated. When sending a high-level event to a process on a local or remote computer, you can specify the port name of the recipient process in a PPC port record that you provide in this field.
If the sending application is on the same computer as the
receiving application, you can determine the sending
application's process serial number by calling the GetProcessSerialNumberFromPortName function.
location
For high-level events that your application receives, this field contains a location name record that identifies the location name
of the process from which the high-level event originated. When sending a high-level event to a process on a local or remote computer, you can specify the location name of the recipient process in a location name record that you provide in this field.
recvrName
This field is reserved.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996