home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!europa.asd.contel.com!news.ans.net!cmcl2!panix!rmah
- From: rmah@panix.com (Robert Mah)
- Subject: Re: process info problems
- Message-ID: <C1EMsI.Ds5@panix.com>
- Organization: PANIX Public Access Unix, NYC
- References: <SMARGARI.93Jan24154951@emmy.nmsu.edu>
- Distribution: comp.sys.mac.programmer
- Date: Mon, 25 Jan 1993 10:07:29 GMT
- Lines: 26
-
- In <SMARGARI.93Jan24154951@emmy.nmsu.edu> smargari@nmsu.edu (Susan Margarit) writes:
-
- > Consider the following code fragment:
-
- > err := GetFrontProcess(psn);
- > err := GetProcessInformation(psn,info);
-
- > after the first line, err is 0 but after the second line, I get error
- > -50 (process serial number is invalid). It seems like a pretty
- > straight forward piece of code. Why does it fail? (sys 7.1). It
- > doesn't matter if I run it standalone or in TP projects, foreground or
- > background.
-
- Hmmm, did you set the fields of the info parameter. Remember, you've got
- to tell the Process Manager the sizeof the info record, set a buffer for
- the name and a buffer for the FSSpec. Sort of pain, in my opinion.
-
- In other words, I think the error may not be valid and you just forgot
- to set up the info param block.
-
- Rob
- --
- [----------------------------------------------------------------------]
- [ Robert S. Mah | Voice: 212-947-6507 | "Every day an adventure, ]
- [ One Step Beyond | EMail: rmah@panix.com | every moment a challenge" ]
- [----------------------------------------------------------------------]
-