Click to See Complete Forum and Search --> : Threading question please


Phill Heald
March 16th, 2006, 06:25 PM
Hi All..
I should point out that Threads within apps is a new area for me.. so please excuse my ignorance !
I am developing an app which requires the services of a 3rd party FTP dll.
However not wanting to stop the app while a potentially lengthy File transfer happens, I want to somehow wrap the dll's functionality in a thread.

No user input affecting the FTP process will be needed so I assume I should use a Worker Thread.

UINT FTPWorkerThread(LPVOID pParam)

{
// call dll functions here

}

Question..
How do I give the worker thread access to the dll ??
Can I use LoadLibrary inside the worker thread to get access here ?? and if so how ??

If I used a class based on CWinThread, could I just include the ftp.h file and call its functions??

Any guidance or example would be very useful
Many thanks for your time

Phil

kuphryn
March 16th, 2006, 07:03 PM
Describe the FTP library.

Kuphryn

Phill Heald
March 16th, 2006, 07:34 PM
Hi Kuphryn
Thanks for replying

The DLL I have chosed is MarshallSofts FTP dll. As far as I can see MarshallSoft describe them like this:

They are implemented as standard Windows DLL's (like Windows DLL's themselves), ranging from 30KB to 100KB.
They make calls only to the core Windows DLL's and do not depend on support DLL's.
They can be called from any language capable of making calls to the Windows API, and will work with all versions of your compiler.

oddly thats it !

ordinerilly I include the ftp.h file and link my project with FCE32.LIB

Hope that helps you help me !!

kuphryn
March 16th, 2006, 07:38 PM
Describe the FTP API.

Kuphryn

Phill Heald
March 16th, 2006, 07:55 PM
Sorry Kuphryn
Not sure in what terms to describe the API
phil

Ejaz
March 17th, 2006, 01:33 AM
[ Redirected Thread ]

Entrant_phil
May 2nd, 2006, 01:05 PM
if you don't know how to portray those APIs.prob you need some global pointer to those API functions. then invoking them in your thread process.