Important: The information in this document is obsolete and should not be used for new development.
GetFrontProcess
Use theGetFrontProcess
function 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
TheGetFrontProcess
function returns, in thePSN
parameter, 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 thePSN
parameter in other Process Manager routines.If no process is running in the foreground,
GetFrontProcess
returns the result codeprocNotFound
.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theGetFrontProcess
function 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