Important: The information in this document is obsolete and should not be used for new development.
GetProcessInformationfunction to get information about a specific process.
FUNCTION GetProcessInformation (PSN: ProcessSerialNumber; VAR info: ProcessInfoRec): OSErr;
- The process serial number of a process. This number should be a valid process serial number returned from
GetCurrentProcess, or else a high-level event. You can use the constant
kCurrentProcessto get information about the current process.
- A record containing information about the specified process.
GetProcessInformationfunction returns, in a process information record, information about the specified process. The information returned in the
infoparameter 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.
GetProcessInformationfunction 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
processAppSpecfields of the process information record. Specify the length of the process information record in the
processInfoLengthfield. If you do not want information returned in the
NILfor these fields. Otherwise, allocate at least 32 bytes of storage for the string pointed to by the
processNamefield and, in the
processAppSpecfield, specify a pointer to an
ASSEMBLY-LANGUAGE INFORMATIONThe trap macro and routine selector for the
Trap macro Selector _OSDispatch $003A
SPECIAL CONSIDERATIONSDo not call
GetProcessInformationat interrupt time.
noErr 0 No error paramErr -50 Process serial number is invalid