--- In [email protected], "swzoh" <sean...@...> wrote: > > --- In [email protected], "entropyreduction" > <alancampbelllists+yahoo@> wrote: > > > - Com.Unload > > > What's it do wrong? > > >
> Alan, I think com.dll uses the same/main thead as PP, right? No, com plugin starts its own thread on first call to a create_object or _get_object. CoInitialize()is called as that thread starts, unload causes that thread to die, on the way calling CoUninitialize(). > Then, I suggest to never call CoInitialize()/CoUninitialize() > inside com.dll, as PP always call OleInitialize()/OleUninitialize() > at the initial/exit stage, I suppose. Or at least use the same one, > i.e., OleInitialize()/OleUninitialize() instead of I think I tried those and they didn;t work. > CoInitialize()/CoUninitialize(). > I reckon this is related with the Message Loop, I often observed > that calling (final) CoUninitialize()/OleUninitialize() while a GUI > is still running crashed the application. There's clearly a timing problem I haven;t been able to get rid of: in general if you use a com in a script, and then unload later, in another script, seems to pass off without crashing. I'll have another look at the problem.
