Article View: comp.sys.mac
Article #36921Re: C source examples of the new preferred AppleTalk interface?
From: Michael Nowak
Date: Sun, 29 Jan 1989 16:49
Date: Sun, 29 Jan 1989 16:49
41 lines
2221 bytes
2221 bytes
I've had several messages in the mail, many from people who are interested
in the same topic. I've also received some related examples but none using
PLookupName(). LKet me state specifically what I am doing, in hopes that
someone will see the error of my ways. Here's what the call to PLookupName()
looks like:
search_name.objStr[0] = 0x01;
search_name.objStr[1] = '=';
search_name.typeStr[0] = 0x01;
search_name.typeStr[1] = '=';
search_name.zoneStr[0] = 0x01;
search_name.zoneStr[1] = '*';
mpp_pb_ptr = (MPPPBptr)NewPtr(sizeof(MPPParamBlock));
if (mpp_pb_ptr == (MPPPBptr)0) {
err_code = app_memoryErr;
goto nomppptr;
}
mpp_pb_ptr->ioCompletion = (ProcPtr)0;
mpp_pb_ptr->NBPentityPtr = (Ptr)&search_name;
mpp_pb_ptr->NBPretBuffPtr = (Ptr)entity_buffer;
mpp_pb_ptr->NBPretBuffSize = 1080;
mpp_pb_ptr->NBPmaxToGet = 10;
mpp_pb_ptr->NBPinterval = 8;
mpp_pb_ptr->NBPcount = 3;
err_code = PLookupName(mpp_pb_ptr, false);
entity_buffer is defined as char entity_buffer[1080]. I originally
tried using NBPSetEntity to set up search_name but have used this surer
approach to cut down on places where I could mess up. The code crashes
in the PLookupName call, with an odd address exception at 0x4345a0.
Any advice would be appreciated.
-----------------------------------------------------------------------------
Michael Nowak ...mailrus!shogun!mike
Workstation Consultant mike@shogun.cc.umich.edu
U of M Computing Center User Services Mike_Nowak@um.cc.umich.edu
...working for but in no way representing the University of Michigan...
Technical Details
Message-ID:
<893@mailrus.cc.umich.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shogun!mikeReferences:
<888@mailrus.cc.umich.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shogun!mike From: mike@shogun.cc.umich.edu (Michael Nowak) Newsgroups: comp.sys.mac Subject: Re: C source examples of the new preferred AppleTalk interface? Message-ID: <893@mailrus.cc.umich.edu> Date: 29 Jan 89 16:49:12 GMT References: <888@mailrus.cc.umich.edu> Sender: usenet@mailrus.cc.umich.edu Reply-To: mike@shogun.cc.umich.edu (Michael Nowak) Organization: University of Michigan Computing Center, Ann Arbor Lines: 41 UUCP-Path: mailrus!shogun!mike