What is the correct procedure of accessing NetLib from a shared library?
I am building a shared library that tries to find a reference to NetLib
in its
Open function. However, call to SysLibFind always returns
"sysErrLibNotFound" and sets the refNum to "sysInvalidRefNum".
err = SysLibFind("Net.lib", &(data->netLibRefNum));
The call is made right after the host shared lib has been initialized,
global variable handle allocated, and globals set to SysLibTblEntry. I
have also tried to the call from the lib's Open to a custom function in
the lib, but it does not make any difference.
Documentation states that NetLib is always loaded and there is no need to
SysLibLoad it. Replacing the above call to SysLibFind with
err = SysLibLoad(netLibType, netCreator, &(data->netLibRefNum));
return errNone, but the the code crashes immediately when a NetLib call
is made. I'm running this on POSE 3.0a6 (Mac), with 3.5 ROM and CodeWarrior.
I found some old discussion threads from the archives (for example,
http://www.escribe.com/computing/pcpqa/m1449.html) that handle similar
topics, but none of them provides a solution to my problem.
If anyone has a working example of how to use NetLib from a shared lib, I
would be very interested to see it.
Thanks,
--
Tomi Kankaanp�� email: [EMAIL PROTECTED]
Handwise Ltd. mob: +358 40 551 5525
http://www.handwise.com tel: +358 9 2517 2080
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/