MacOS 9.1, coding to CarbonLib 1.6 (from the Carbon SDK GM),
specifically targeting pre-MacOS X machines (as in "MacOS X solutions
need not apply"), and trying to use the OTMP package (from
developer.apple.com) for my networking. Code builds fine, and the
resulting program runs, but it doesn't accomplish anything, since it
bails out (which is exactly what I coded it to do) after the line
Result = InitOpenTransportMPInContext(kInitOTForApplicationMask,
&Globals.MyOTContext);
excutes, with Result coming back holding the value -4.
Breakpointing through the code watching what's going on takes me to line
4268 of OTMP.c, in the heart of the OTMP package, which is:
err = MPAllocateTaskStorageIndex(&gOTMPTaskStorageIndex);
This is where things blow up.
Up to this point, everything is working exactly as expected. The trouble
develops when this call executes. Upon its completion, err is invariably
-4 (which gets returned to my initialization code, triggering the
bail-out sequence) and gOTMPTaskStorageIndex is 0. As far as I can tell
from consulting MacErrors.h and everything else that makes even a little
sense, result code -4 means "Unimplemented core routine", which, if I'm
understanding things anywhere near correctly, indicates that I'm trying
to call a routine that isn't actually supported by my rig - Although at
this point, I haven't managed to figure out what piece of the puzzle is
missing.
Every piece of documentation I can get my hands on tells me that this
routine SHOULD be available in CarbonLib version 1.0 or higher. But it
would *SEEM* that, for some reason I can't find, it isn't on my rig.
So, anybody got any idea what gives, and/or how to work around it? This
is turning out to be a total show-stopper for my project, and if I can't
get things working using OTMP, the whole thing is going straight down
the toilet - I've been coding to use OTMP right from the start, and if I
have to bail out of that plan and go to GUSI, or (god forbid...) "roll
my own" networking, the project is scuttled, since I'm not even a little
interested in trying to rewrite everything I've got so far. (which will
be mandatory, due to the assumptions involved in building it to use OTMP)
Anybody know how to save the coding-time invested so far?
--
Don Bruder - dakidd RemoveThis @sonic.net - If your "From:" address isn't on my whitelist,
or the subject of the message doesn't contain the exact text "PopperAndShadow"
somewhere, any message sent to this address will go in the garbage without my
ever knowing it arrived. Sorry... <http://www.sonic.net/~dakidd> for more info