Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!ur-tut!ur-valhalla!rajiv From: rajiv@ur-valhalla.UUCP (Rajiv Arora) Newsgroups: comp.sys.mac Subject: Aztec 'C' problem - help! Message-ID: <864@ur-valhalla.UUCP> Date: Tue, 25-Nov-86 10:53:35 EST Article-I.D.: ur-valha.864 Posted: Tue Nov 25 10:53:35 1986 Date-Received: Tue, 25-Nov-86 22:44:08 EST Reply-To: rajiv@ur-valhalla.UUCP (Rajiv Arora) Distribution: net Organization: EE VLSI Graduate Research Facility, UR, Rochester NY Lines: 54 Hi all. I have a question for those of you who have used the Appletalk Manager calls from Aztec 'C'. I'm trying to use the AB Link Access Protocol in my application and can't for the life of me get the function LAPOpenProtocol () to work. I was wondering if any of you had had the same problem and knew of a fix. Shown below is the code illustrating the problem: #include #include #include main () { OSErr errcode; pascal OSErr MPPopen (); pascal OSErr LAPOpenProtocol (); ABByte myLAPType; /* ABByte is typedefed as "unsigned char" and Ptr as Ptr myprotoptr; "char *" in appletalk.h */ if ((errcode = MPPOpen ()) != noErr) { printf ("error opening MPP\n"); printf ("errorcode = %d\n"); } else { myLAPType = 53; /* arbitrary protocol number */ myprotoptr = NULL; if ((errcode = LAPOpenProtocol (myLAPType, myprotoptr)) != noErr) { printf ("error opening protocol\n"); printf ("errorcode = %d\n); } } } The problem is that LAPOpenProtocol always returns with errorcode -94, which indicates that either myLAPType (= 53) is out of range, already present in the protocol handler table, or that the protocol table is full. Since the table can have upto 4 entries, and only two are used by DDP (i.e. LAP types 1 and 2), the last should not be the case. The other two possibilities also seem unlikely. Any suggestions/comments/help would be greatly appreciated. Rajiv Arora -- UUCP: {seismo,cmc12,columbia,cornell,harvard, ll-xn,nike,topaz}!rochester!ur-valhalla!rajiv ARPA: ur-valhalla!rajiv@rochester.arpa