[comp.sys.mac.programmer] DDPWrite problems

d88-jwa@dront.nada.kth.se (Jon W{tte) (02/01/91)

In article <20601@unix.SRI.COM> larson@snmp.sri.com (Alan Larson) writes:

>  I am having trouble with calls to DDPWrite in Think C 4.0.

>	-111  memWZErr	WhichZone failed (applied to free block)
>	-113  memAZErr	Address in zone check failed

>  Here is an extract of my code.  Since the activity is synchronous, I
>have the ABusRecord allocated locally in the routine, so I generate
>a handle to it.

This is the problem. The zone check errors mean the mac tried
to validate the handle - since it wasn't a valid handle, it failed.
You should _NEVER_ _EVER_ pass a "pointer to a pointer" instead of
a true Handle (as obtained from NewHandle) to a Toolbox routine
that expects a handle. This is documented in IM and TechNotes.

							h+
::::::::       Jon W{tte, Stockholm, Sweden, h+@nada.kth.se       ::::::::
"The IM-IV file manager chapter documents zillions of calls, all of which
seem to do almost the same thing and none of which seem to do what I want
them to do."  --  Juri Munkki (jmunkki@hut.fi) in comp.sys.mac.programmer