GetCurrentProcess
GetCurrentProcess Get the process serial number of a particular process
ProcessSerialNumber *PSN ; pointer to the currently exectuing process's
serial number
returns Error Code; 0=no error
You use the GetCurrentProcess to get the process serial number of a
particular process
PSN is a pointer to the process serial number of the process that is
currently executing. The currently executing process is the one
currently accessing the CPU; this is the application associated with
the CurrentA5 global variable.
Returns: an operating system Error Code.
noErr (0) No error

Notes: This application can be running in either the foreground or the
background.
Applications can use this function to find their own process serial number.
Drivers can use this function to find the process serial number of the
current process. You can use the returned process serial number in other
Process Manager routines.