Autor Beitrag
prebbe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Mo 30.07.07 09:08 
Hi!

I am quite new to Delphi. Can anyone provide me with a very simple solution to dynamically load and run a dll in a thread?
I have to continue to run my program while a dll is loaded and executed(and the dll takes a while.. aproximately 5 seconds).
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 31.07.07 01:01 
Well this is quite easy.
First you want to start a thread which loads the dll. You can do this by implementing an object which inherits the functionality of threads from TThread!
Then perhaps you need an acknowledgement whether the library is loaded or not.

This is an example how you can do this, it is not the most beautiful way (I mean how to give parameters to the main program), but it should be easy to understand and to extend to your needs.

I did not comment the source code 'cause its this small, but if you have questions just ask.
Einloggen, um Attachments anzusehen!