CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 1999
    Location
    Salisburyl UK
    Posts
    324

    Question Threading question please

    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

  2. #2
    Join Date
    Feb 2002
    Posts
    5,757

    Re: Threading question please

    Describe the FTP library.

    Kuphryn

  3. #3
    Join Date
    Sep 1999
    Location
    Salisburyl UK
    Posts
    324

    Re: Threading question please

    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 !!

  4. #4
    Join Date
    Feb 2002
    Posts
    5,757

    Re: Threading question please

    Describe the FTP API.

    Kuphryn

  5. #5
    Join Date
    Sep 1999
    Location
    Salisburyl UK
    Posts
    324

    Re: Threading question please

    Sorry Kuphryn
    Not sure in what terms to describe the API
    phil

  6. #6
    Ejaz's Avatar
    Ejaz is offline Elite Member Power Poster
    Join Date
    Jul 2002
    Location
    Lahore, Pakistan
    Posts
    4,211

    Re: Threading question please

    [ Redirected Thread ]

  7. #7
    Join Date
    Jan 2005
    Posts
    73

    Re: Threading question please

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured