It is correct that after the "unload" service is executed, Powerpro notices 
that fact and then calls FreeLibrary.

The detach stuff is more about how Windows works.


--- In [email protected], "entropyreduction" 
<alancampbelllists+ya...@...> wrote:
>
> In answer to my own question, this is what debugger tells me is happening:
> 
> Assume plugin xxx is loaded.
> 
> On PP shutdown:
> if there is a "shutdown" service exported by xxx, it's called, 
> then the DLL_PROCESS_DETACH section of DllMain in xxx caled
> then PP shuts down
> 
> On call to xxx.unload:
> if there is an explicit "unload" service exported by xxx, it's called, then 
> the DLL_PROCESS_DETACH section of DllMain in xxx caled
> 
> I couldn't find the last anywhere in help: maybe I missed it.
> 
> 
> --- In [email protected], "entropyreduction" 
> <alancampbelllists+yahoo@> wrote:
> >
> 
> > > I think yes, because ppro calls pproshutdown as before it returns from 
> > > main and returning from main is what I think triggers the system to call 
> > > detach.
> > 
> > Makes sense.  Ta.
> > 
> > > > I think you also call an unload service if there is one.  That calls 
> > > > come when during a shutdown?  before/after above evnets?
> > 
> > > No, PPro never implicitly calls unload.  Only called if it is explicitly 
> > > called somehow by script or another plugin.
> > 
> > Misread help: I got it into my head that if there was an explicit defined 
> > unload service in exported by plugin, you called it before
> > causing plugin to unload.  I think I dreamed that up one night. Possibly 
> > effect of too mush peppermint tea the night before.
> >
>


Reply via email to