home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 21929 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  2.0 KB

  1. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!newsserver.jvnc.net!netnews.upenn.edu!netnews.noc.drexel.edu!king.mcs.drexel.edu!queen.mcs.drexel.edu!udmorrow
  2. From: udmorrow@mcs.drexel.edu (Daniel Morrow)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Help, I'm in IPCListPorts hell!
  5. Message-ID: <1993Jan22.025528.12761@mcs.drexel.edu>
  6. Date: 22 Jan 93 02:55:28 GMT
  7. Sender: udmorrow@mcs.drexel.edu (Daniel Morrow)
  8. Organization: Drexel University
  9. Lines: 44
  10.  
  11. All I am trying to do is to find ports on a computer which have a specific
  12. creator and file type.
  13.  
  14. So, naturally, I assumed that in the portName field (in the IPCListPortsPBRec)
  15. should look something like this:
  16.     portName->portKindSelector = ppcByCreatorAndType;
  17.     portName->u.port.creator = kCreator;
  18.     portName->u.port.fileType = kFile Type;
  19.  
  20.     (or something like this, I don't have the code handy).
  21.  
  22.     Anyway, I expected IPCListPorts to look at a computer and return
  23.     in the bufferPtr field the programs which meet these criteria.
  24.  
  25.     But when I actually try this, IPCListPorts always tells me (in the
  26.     actualCount field) that there aren't any programs that match, even
  27.     when I damn well know that they do.
  28.  
  29.     I'm not getting any error codes returned here.
  30.     I have used IPCListPorts with with the portKindSelector set to 
  31.     ppcByString and this has worked fine. But I can't seem to get it
  32.     work this way.
  33.  
  34.     I _am_ allocating enough space for the buffer.
  35.     I haven't found any examples in IM-6 on how to do this.
  36.  
  37.     I am using NBPLookup to get the machine names in the zone. This is
  38.     returning the right stuff.
  39.  
  40.     If anyone has any source code (or sees any flaws in my logic) please
  41.     let me know. This is most annoying.
  42.  
  43.     All I am trying to do is count up the amount of programs (of a specific
  44.     creator and file type) which are running over the local zone.
  45.  
  46.     Again, getting the zone name and the machine names haven't been a
  47.     problem.
  48.  
  49.     Maybe there's something about this that I just don't know.
  50.  
  51.     If you know how to do this please contact me. I'm pulling my
  52.     hair out over this. 
  53.  
  54.     -Dan.
  55.