home *** CD-ROM | disk | FTP | other *** search
- 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
- From: udmorrow@mcs.drexel.edu (Daniel Morrow)
- Newsgroups: comp.sys.mac.programmer
- Subject: Help, I'm in IPCListPorts hell!
- Message-ID: <1993Jan22.025528.12761@mcs.drexel.edu>
- Date: 22 Jan 93 02:55:28 GMT
- Sender: udmorrow@mcs.drexel.edu (Daniel Morrow)
- Organization: Drexel University
- Lines: 44
-
- All I am trying to do is to find ports on a computer which have a specific
- creator and file type.
-
- So, naturally, I assumed that in the portName field (in the IPCListPortsPBRec)
- should look something like this:
- portName->portKindSelector = ppcByCreatorAndType;
- portName->u.port.creator = kCreator;
- portName->u.port.fileType = kFile Type;
-
- (or something like this, I don't have the code handy).
-
- Anyway, I expected IPCListPorts to look at a computer and return
- in the bufferPtr field the programs which meet these criteria.
-
- But when I actually try this, IPCListPorts always tells me (in the
- actualCount field) that there aren't any programs that match, even
- when I damn well know that they do.
-
- I'm not getting any error codes returned here.
- I have used IPCListPorts with with the portKindSelector set to
- ppcByString and this has worked fine. But I can't seem to get it
- work this way.
-
- I _am_ allocating enough space for the buffer.
- I haven't found any examples in IM-6 on how to do this.
-
- I am using NBPLookup to get the machine names in the zone. This is
- returning the right stuff.
-
- If anyone has any source code (or sees any flaws in my logic) please
- let me know. This is most annoying.
-
- All I am trying to do is count up the amount of programs (of a specific
- creator and file type) which are running over the local zone.
-
- Again, getting the zone name and the machine names haven't been a
- problem.
-
- Maybe there's something about this that I just don't know.
-
- If you know how to do this please contact me. I'm pulling my
- hair out over this.
-
- -Dan.
-