Link to home
Start Free TrialLog in
Avatar of Mohamadi
MohamadiFlag for Iran, Islamic Republic of

asked on

Loading DLLs in my own thread???

Hi
i would be very gratefull to hear from any one who knows about loadig DLLs in a specific TThread.
*******NOT IN MAINTHREAD*********
thanks in advance :)
NIMA
Avatar of Madshi
Madshi

No problem, just do it, works fine.
P.S: May be different, though, if the DLL has own forms in it. Never did such a thing yet...
LoadLibrary('c:\mypath\mydll.dll');
will work fine
if you take a look at the Main function of the dll you can see it has one Reason parameter
it can have 4 values:
PROCESS_ATTACH, PROCESS_DETACH, THREAD_ATTACH, THREAD_DETACH
so you really can load a dll in a separate thread
as madshi pointed out there might be some roblems if you have some forms in there
a better way of using forms in your dlls is to make a package instead of a dll
Avatar of Mohamadi

ASKER

can you tell me an example??
thanks alot
nima
ASKER CERTIFIED SOLUTION
Avatar of Lee_Nover
Lee_Nover

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks alot :)