[comp.sys.mac.programmer] Trying to use MacTCP with THINK LSC 3.02

tony@rata.vuw.ac.nz (Tony Martindale) (12/13/90)

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) &paramblock,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.