Hi Bruce,
--- In [EMAIL PROTECTED], "brucexs" <[EMAIL PROTECTED]> wrote:
> > Is powerpro compiled with /MD switch, i.e. against the
> > multithreaded DLL C runtime library (MSVCRTxx.DLL)?
> No. But doesn't each dll get its own version of the library unless
> it dynamically links with one (which is what the plugins I wrote do
> to lower memory needs).
Yeah, that was what I assumed. Grapsing at straws.
> The file plugin spawns a separate thread without issue for
> file.runcallback.
Ah. Okay, glad you did some threading: turns out problem
definitely not in my code, it's something to do with what happens
when unload is done.
Try this:
===================== file testThread.powerpro:
file.runcallback(99999, "[EMAIL PROTECTED]", "notepad.exe")
Quit
@callback
;file.unload
win.debug("got here")
Quit
===================== end file testThread.powerpro:
Works fine. Now uncomment file.unload. Run again.
On my system powerpro crashes on the unload.
Happens whether plugin is debug or release code.,
Stepping through debug code suggests problem occurs after
DllMain exits having got DLL_PROCESS_DETACH flag.
I find that if you run above script without file.unload, then wait
awhile, then run file.unload on it's own, works okay, no crash.
Stick a wait.for(50000) before the unload: it still crashes.
Weird.
I notice DllMain also gets called with DLL_THREAD_DETACH and
DLL_THREAD_ATTACH flags: I added tests for them and stuck in
some messageboxes, and sure nuff DllMain runs now and again
with those flags as args. But what are we supposed to do with them??
If anything?
I'm using different code to launch threads
( _beginthread/_endthread ) but have what I suspect is exactly the
same problem.
> On the other hand, if you are asking if PowerPro itself is thread-
> safe, the answer is no (and it never will be). So if you call back
> to (ppsv->something) from a thread other than the one which called
> the plugin, the results are unpredictable.
Understood.
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~->
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/