Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Processes
Chapter 2 - Process Manager / Process Manager Reference
Routines / Getting Process Information


GetFrontProcess

Use the GetFrontProcess 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
The GetFrontProcess function returns, in the PSN 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 the PSN parameter in other Process Manager routines.

If no process is running in the foreground, GetFrontProcess returns the result code procNotFound.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the GetFrontProcess function are
Trap macro Selector
_OSDispatch$0039

RESULT CODES
noErr0No error
paramErr-50Process serial number is invalid
procNotFound-600No process in the foreground


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUN 1996