Important: The information in this document is obsolete and should not be used for new development.
GetProcessInformation
Use theGetProcessInformation
function to get information about a specific process.
FUNCTION GetProcessInformation (PSN: ProcessSerialNumber; VAR info: ProcessInfoRec): OSErr;
PSN
- The process serial number of a process. This number should be a valid process serial number returned from
LaunchApplication
,GetNextProcess
,GetFrontProcess
,GetCurrentProcess
, or else a high-level event. You can use the constantkCurrentProcess
to get information about the current process.info
- A record containing information about the specified process.
DESCRIPTION
TheGetProcessInformation
function returns, in a process information record, information about the specified process. The information returned in theinfo
parameter includes the application's name as it appears in the Application menu, the type and signature of the application, the address of the application partition, the number of bytes in the application partition, the number of free bytes in the application heap, the application that launched the application, the time at which the application was launched, and the location of the application file. See "Getting Information About Other Processes" on page 2-5 for the structure of the process information record.The
GetProcessInformation
function also returns information about the application's'SIZE'
resource and indicates whether the process is an application or a desk accessory.You need to specify values for the
processInfoLength
,processName
, andprocessAppSpec
fields of the process information record. Specify the length of the process information record in theprocessInfoLength
field. If you do not want information returned in theprocessName
andprocessAppSpec
fields, specifyNIL
for these fields. Otherwise, allocate at least 32 bytes of storage for the string pointed to by theprocessName
field and, in theprocessAppSpec
field, specify a pointer to anFSSpec
record.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theGetProcessInformation
function are
Trap macro Selector _OSDispatch $003A SPECIAL CONSIDERATIONS
Do not callGetProcessInformation
at interrupt time.RESULT CODES
noErr 0 No error paramErr -50 Process serial number is invalid