Chris @ IT wrote:
> I have this application that loads DLL's dynamically as plugins and as such
> I use the loadlibrary, getprocaddress, free library routines.
> 
> The host application loads the dll and calls its process export function so
> that the dll can do what its meant to do. The problem is there are usually
> many requests to be done (about 500 every second) and when I call the dll
> for each sequentially its takes quite a bit of time
> 
> What I want to try is spawn a new thread that loads the dll and calls the
> function. With this approach the dll will be loaded many times and its
> function called many times.

DLLs can't be loaded more than once. Everything after the first load is 
just modifying a reference count.

There's nothing inherently unsafe about calling DLL functions from 
multiple threads, but there's nothing inherently safe about it, either. 
If the DLL uses global variables to manage its state, then it will need 
to protect them from simultaneous access from multiple threads. There's 
nothing you, as the application developer, can do about that. It has to 
be addressed by the DLL developer.

-- 
Rob


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hfktfh4/M=362131.6882499.7825260.1510227/D=groups/S=1705115362:TM/Y=YAHOO/EXP=1124130813/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
-�brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> 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/
 



Reply via email to