Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The chicken or the egg?

Status
Not open for further replies.

exodus300

Programmer
Mar 22, 2002
262
AU
Not really a problem, just a question.

I have a procedure which really needs to be done in a thread (to prevent the app from 'hanging'), and I want this in a DLL so I can easily update it if required. But should I create the thread from within the DLL, (my app calls the dll) or is it better to create a thread in my app which calls the DLL function? [pc3]
In the end it will probably be the simplest, most obvious thing that I was doing wrong...
 
I would lean towards the "Do it in your app and not the dll" approach. That way you have complete control over the thread. When writing dlls I tend to do many things outside of them incase I need them in other apps. For example, I would much rather pass a pointer to a buffer that I allocated rather then have the dll do it itself.

Just my opinion
Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top