Important: The information in this document is obsolete and should not be used for new development.
GetNextProcessfunction to get information about the next process, if any, in the Process Manager's internal list of open processes.
FUNCTION GetNextProcess (VAR PSN: ProcessSerialNumber): OSErr;
- On input, the process serial number of a process. This number should be a valid process serial number returned from
GetCurrentProcess, or else the defined constant
kNoProcess. On output, the process serial number of the next process, or else
DESCRIPTIONThe Process Manager maintains a list of all open processes. You can derive this list by using repetitive calls to
GetNextProcess. Begin generating the list by calling
GetNextProcessand specifying the constant
PSNparameter. You can then use the returned process serial number to get the process serial number of the next process. Note that the order of the list of processes is internal to the Process Manager. When the end of the list is reached,
GetNextProcessreturns the constant
PSNparameter and the result code
You can use the returned process serial number in other Process Manager routines. You can also use this process serial number to specify a target application when your application sends a high-level event.
ASSEMBLY-LANGUAGE INFORMATIONThe trap macro and routine selector for the
Trap macro Selector _OSDispatch $0038
noErr 0 No error paramErr -50 Process serial number is invalid procNotFound -600 No process in the process list following the specified process