Important: The information in this document is obsolete and should not be used for new development.
GetPortNameFromProcessSerialNumber
UseGetPortNameFromProcessSerialNumber
to get the port name of a process.
FUNCTION GetPortNameFromProcessSerialNumber (VAR portName: PPCPortRec; PSN: ProcessSerialNumber): OSErr;
portName
- Returns the port name of the process designated by the
PSN
parameter. You can use the returned port name to send a high-level event to
that process.PSN
- The process serial number of the process whose port name you want.
DESCRIPTION
TheGetPortNameFromProcessSerialNumber
function returns the port name registered to a process having a specific process serial number.SPECIAL CONSIDERATIONS
TheGetPortNameFromProcessSerialNumber
function does not move or purge memory but for other reasons should not be called from within an interrupt, such as
in a completion routine or VBL task.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theGetPortNameFromProcessSerialNumber
function are
Trap macro Selector _OSDispatch $0046 RESULT CODES
noErr 0 No error procNotFound -600 No eligible process with specified process
serial numberSEE ALSO
For a description of thePPCPortRec
data type, see the chapter "Program-to-Program Communications Toolbox" in Inside Macintosh: Interapplication Communication.