--- In [email protected], "entropyreduction" 
<alancampbelllists+ya...@...> wrote:
>
> How about a PPROSERVICES function
> 
> ppsv->pluginLoaded(plugin_name, 0/1)
> 
> I call it just before loading another plugin with 1 as second argument: if 
> plugin already loaded you return 1.  If not, you remember it's loaded, so you 
> can call pproshutdown() on it on
> shutdown.  
> 
> When I'm done with a plugin (probably when I'm unloading myself)
> I call ppsv->pluginLoaded(plugin_name, 0).
>

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.

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

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.








Reply via email to