SameProcess
You use SameProcess to compare two process serial numbers and to determine whether they refer to the same process.
PSN1 is a pointer to a valid process serial number returned from
constant kCurrentProcess to return to the current process.
PSN2 is a valid process serial number returned from
constant kCurrentProcess to return to the current process.
result is a pointer to a Boolean value. If the process serial numbers specified in the PSN1 and PSN2 parameters refer to the same
process, the SameProcess function returns TRUE in the result
parameter; otherwise, it returns FALSE in the result parameter.
noErr (0) No error
paramErr (-50) Process serial number is invalid
Notes: When you compare two process serial numbers, use the SameProcess function rather than any other means, because the interpretation of the bits