--- In [email protected], "brucexs" <bswit...@...> wrote:
>
> --- In [email protected], "entropyreduction" 
> <alancampbelllists+yahoo@> wrote:
> >
> > How about a PPROSERVICES function
> > 
> > ppsv->pluginLoaded(plugin_name, 0/1)

> There are issues if we both load since I don't maintain a reference count and 
> the current code also assumes freelibrary physically unloads (ie that the dll 
> ref count maintained by windows never goes above 1).  I always try to 
> getmodule before I loadmodule, so I think this is safe for PowerPro code to 
> assume this.
> 
> We would need to take account of this if we implemented a service like the 
> above  Probably safest is to do for you to have load call only load only and 
> to have plugin call actually load the module and return the hm.  That way I 
> can continue to enforce the getmodule before loadlibrary.

Which I interpret based on next email as what I was thinking as I came back 
from lunch too: loading plugins should be main exe business, not plugins' 
business. 

So it would be  

ppsv->loadPlugin(plugin_name, 0/1)

which returns nothing.  I assume once it returns that plugin has been loaded.

> (BTW, I think there are only performance issues if you implicitly unload a 
> plugin that was loaded elsewhere).

Ok.
 
> Is this worth doing?  I was actually serious about the "better is the enemy 
> of the good" stuff in the earlier note, (although the I threw the mixed quote 
> for fun).  If no one has complained about the other plugins, maybe just leave 
> as is.

Sure.  As it stands I'm merrily loading any plugin I need, and unloading 
anything I've previously loaded on plugin unload.
I've noticed some problems unloading a dependent plugin (e.g. binary or 
unicode), but if that happens I just unload everything and anything
that might have loaded it (I have a script that unloads every plugin
that could have such a dependency).  If no one else reports a problem, lets 
leave well enough (better) alone.




Reply via email to