GetProcessSerialNumberFromPortName
GetProcessSerialNumberFromPortName Get the serial number of a process.
#include <EPPC.h>
const PPCPortPtr portName ; port name for which PSN is wanted
ProcessSerialNumberPtr PSN ; Process Serial Number
portName specifies the name registered to a process whose PSN you want.
PSN is a pointer to the Serial Number of a process. You can use the
returned process serial number to send a high-level event to that
process. Do not interpret the value of the serial number.
Returns: an operating system Error Code. It will be one of:
noErr (0) No error
noPortErr (-903) Invalid port name
The Event Manager provides two utility functions to convert between
Process Serial Number (PSNs) and port names. Both functions are intended
to map serial numbers to port names (or vice versa) for applications open on
the local machine. They do not return useful results for applications on
remote machines.