Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!comp.vuw.ac.nz!rata.vuw.ac.nz!tony From: tony@rata.vuw.ac.nz (Tony Martindale) Newsgroups: comp.sys.mac.programmer Subject: Trying to use MacTCP with THINK LSC 3.02 Keywords: MacTCP driver think C Message-ID: <1990Dec13.050032.16678@comp.vuw.ac.nz> Date: 13 Dec 90 05:00:32 GMT Sender: news@comp.vuw.ac.nz (News Admin) Organization: C.S.C., Victoria University of Wellington, New Zealand Lines: 65 Nntp-Posting-Host: rata.vuw.ac.nz Originator: tony@rata.vuw.ac.nz Problem: I am trying to use MacTCP 1.01 with LSC 3.02. 1. I got the MacTCP evaluation kit 2. took the MPW library and converted into a LSC library it with the THINK supplied program oConv 3. munged some of the pascal function typdef's in the header files, as LSC 3.02 didn't seem to be able to cope with the prototyping (not to mention the pascal key word). 4. wrote a little program to exercise the dns routines 5. "run" it from LSC with the debugger and my PBOpen call fails with an error -35 or 52 (previously it would crash at this point, I don't know what changed, with "bus error" - "...; happens only on a Macintosh XL.":) Further info: The Mac is a SE/30 with 5MB's of memory, 6.0.5 and various relatively solid inits. Here is the function I wrap around the call to PBOpen: OSErr openMacTCPdriver() { OSErr PBOpen(); UDPiopb paramblock; Str255 drivername; OSErr result; boolean notasync = FALSE; strcpy(drivername, "\p.IPP"); paramblock.ioCompletion = NULL; paramblock.ioNamePtr = (char *) drivername; result = PBOpen((ParmBlkPtr) ¶mblock,notasync); if (result != noErr) printf("PBOpen failed with return code: %d.",result); return(result); } Questions: Has anyone used MacTCP with LSC 3.02 successfully? How? Am I missing something simple? Do I need THINK C 4? Any help would be appreciated, I will summarise. Thanks in advance. -- Tony Martindale Computing Services Centre, email: tony@rata.vuw.ac.nz Victoria University of Wellington, phone: +64 4 721 000 x8453 P.O. Box 600, Wellington, NEW ZEALAND.