SetFrontProcess
the foreground process.
PSN is a pointer to a the process serial number of the process running in
the foreground
noErr (0) No error
procNotFound (-600) Process with specified process serial number does not
exist or process is suspended by high-level debugger
appIsDaemon (-606) Specified process is background-only
Notes: The specified process becomes the foreground process after the current
The process serial number in the PSN parameter should be a valid process
can also use the constant kCurrentProcess to refer to the current process.
If the specified process serial number is invalid or if the specified process
is a background-only application, SetFrontProcess returns a nonzero
result code and does not change the current foreground process.
If a modal dialog box is the frontmost window, the specified process does
not become the foreground process until after the user dismisses the modal
dialog box.
at interrupt time.