Loadlibrary(), function callbacks and multi-threading - 04-02-2006 , 11:46 PM
I am writing an application that requires me to load a (Win32 C) libray
and then register several call back functions.
I am loading the libary in a worker thread and then registering
functions in the worker thread in the loaded library.
1). Does loadlibrary(0 run the executable in the same thread as the
calee (probably not)
2). Is it safe to register/call callback funcs accross threads (assuming
functions are written so as note to alter state of calee)
Re: Loadlibrary(), function callbacks and multi-threading - 04-03-2006 , 12:22 AM
Bit byte wrote:
DllMain function. That IS run in the context of the thread that called
LoadLibrary. Subsequent calls to fuinctions in the DLL will occur in
whatever thread(s) make the call(s) - there's no hidden thread switch back
to the thread that loaded the DLL or anything like that (in contrast with,
for example, calling into a STA-threaded COM object, where such a thread
switch does indeed occur).
Re: Loadlibrary(), function callbacks and multi-threading - 04-03-2006 , 03:43 AM
Carl Daniel [VC++ MVP] wrote:
|Thread Tools||Search this Thread|