I'm not sure, that's a good point.  It looks like if it is a ROM based
library, you should be alright.  However, if it was SysLibLoaded and then
SysLibUnloaded while someone was using it, that application will crash when
it next tries to use the library.  All of this stuff depends on people
playing safe.  If you load a library when you start your app, you should
unload it when you exit.  If you didn't load the library (only SysLibFind
it), then you should never unload it.  If we follow these rules, we
shouldn't run into problems.

Kevin

> -----Original Message-----
> From: Jason Dawes [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 28, 1999 11:40 AM
> To: [EMAIL PROTECTED]
> Subject: RE: IrComm Question ?
> 
> 
> At 11:19 AM 7/28/99 -0700, you wrote:
> >#define irLibName "IrDA Library"
> >
> >You should first do a SysLibFind then if that fails, do a SysLibLoad:
> >
> >    err = SysLibFind(irLibName,&libRefNum);
> >    if(err != 0)
> >    {
> >        err = SysLibLoad(irLibName, irLibCrtr, &libRefNum);
> >    }
> >
> >This way if the library is already loaded, you'll just get 
> it's reference.
> >Otherwise you'll have to load it.  If everyone does this, 
> the library won't
> >get loaded multiple times.  The IR library should already be 
> loaded, so the
> >SysLibFind should be sufficient.
> >
> 
> So what happens when someone else does a SysLibRemove() but you're not
> finished with the library?
> 
> 

Reply via email to