home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 22117 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.5 KB  |  38 lines

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