Important: The information in this document is obsolete and should not be used for new development.
GetProcessSerialNumberFromPortName
UseGetProcessSerialNumberFromPortName
to get the process serial number of a process.
FUNCTION GetProcessSerialNumberFromPortName (portName: PPCPortRec; VAR PSN: ProcessSerialNumber): OSErr;
portName
- The port name registered to a process whose serial number you want.
PSN
- Returns the process serial number of the process designated by the
portName
parameter. You can use the returned process serial number to send a high-level event to that process. Do not interpret the value of the process serial number.DESCRIPTION
TheGetProcessSerialNumberFromPortName
function returns the process serial number of the process registered at a specific port.SPECIAL CONSIDERATIONS
TheGetProcessSerialNumberFromPortName
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 theGetProcessSerialNumberFromPortName
function are
Trap macro Selector _OSDispatch $0035 RESULT CODES
noErr 0 No error noPortErr -903 Invalid port name SEE ALSO
For a description of thePPCPortRec
data type, see the chapter "Program-to-Program Communications Toolbox" in Inside Macintosh: Interapplication Communication.