At 09:52 AM 7/29/99 -0700, you wrote:
>Thanks for your rendition of the guidelines Greg, but that hardly answers
>the question. The problem is that the library was opened by someone else,
>you're simply riding the reference though SysFindLib.... so the library has
>no idea that there is 2 (or more) people using it. The question was almost
>rhetorical. The answer is "your app crashes".
>
I guess my point here was that you (and everyone else using shared
libraries) should check the return value of the shared library's "Close"
function, and only remove it if there is no error. This does not address
the issue of what to do if Open fails, but I would think that given (a)
someone else loaded the library and (b) the current code cannot even open
it, then this code should *not* remove it.
If you are not willing to trust others to do this, then, yes, you would
need to load and unload your own instance of the shared library.
Sorry if I was not clear enough.
Greg
Greg Winton
Bachmann Software and Services, LLC
mailto:[EMAIL PROTECTED]
http://www.bachmannsoftware.com
Software Development for Handheld & Mobile Computing, Windows and the Internet
Home of Bachmann Print Manager, the only graphical printing solution for
the Palm Computing Platform