Important: The information in this document is obsolete and should not be used for new development.
SameProcess
Use theSameProcess
function to determine whether two process serial numbers specify the same process.
FUNCTION SameProcess (PSN1, PSN2: ProcessSerialNumber; VAR result: Boolean): OSErr;
PSN1
- A process serial number.
PSN2
- A process serial number.
result
- A Boolean value that indicates whether the process serial numbers passed in
PSN1
andPSN2
refer to the same process.DESCRIPTION
TheSameProcess
function compares two process serial numbers and determines whether they refer to the same process. If the process serial numbers specified in thePSN1
andPSN2
parameters refer to the same process, theSameProcess
function returnsTRUE
in theresult
parameter; otherwise, it returnsFALSE
in theresult
parameter.Do not attempt to compare two process serial numbers by any means other than the
SameProcess
function, because the interpretation of the bits in a process serial number is internal to the Process Manager.The values of
PSN1
andPSN2
must be valid process serial numbers returned fromLaunchApplication
,GetNextProcess
,GetFrontProcess
,GetCurrentProcess
, or a high-level event. You can also use the constantkCurrentProcess
to refer to the current process.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSameProcess
function are
Trap macro Selector _OSDispatch $003D RESULT CODES
noErr 0 No error paramErr -50 Process serial number is invalid