Important: The information in this document is obsolete and should not be used for new development.
GetFrontProcess
Use theGetFrontProcessfunction to get the process serial number of the front process.
FUNCTION GetFrontProcess (VAR PSN: ProcessSerialNumber): OSErr;
PSN- On output, the process serial number of the process running in the foreground.
DESCRIPTION
TheGetFrontProcessfunction returns, in thePSNparameter, the process serial number of the process running in the foreground. You can use this function to determine if your process or some other process is in the foreground. You can use the process serial number returned in thePSNparameter in other Process Manager routines.If no process is running in the foreground,
GetFrontProcessreturns the result codeprocNotFound.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theGetFrontProcessfunction are
Trap macro Selector _OSDispatch $0039 RESULT CODES
noErr 0 No error paramErr -50 Process serial number is invalid procNotFound -600 No process in the foreground