Announcement

Collapse
No announcement yet.

Return control to program while DLL continues

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wayne Diamond
    replied
    solved! in the same DLL too, phew
    kind thanks Semen for pointing me in the right direction

    here is the code thats working for me:

    Code:
    SUB MAILFILE() EXPORT
    DIM idThread(1) AS LONG
    DIM dwResult as dword
    THREAD CREATE SendMail(0) TO idThread(0)
    END SUB
    I call MAILFILE() from my VB sub, and it returns immediately, while the thread continues in the background...
    oohhh the warm fuzzies you get when you move from VB to PB, its better than toasted marshmallows


    ------------------

    Leave a comment:


  • Wayne Diamond
    replied
    Semen, im calling my PB DLL with the Sendmail sub from a VB6 program ... VB6 typically does not support multi-threading, so would I perhaps need to create a second PB DLL, and call that, which in turned called the SendMail sub in a new thread?
    It seems a bit clandestine using a second DLL just to call my main DLL, but it seems there is no other way possible from my VB app?


    ------------------

    Leave a comment:


  • Semen Matusovski
    replied
    Wayne --
    Call Dll in thread.

    ------------------
    E-MAIL: [email protected]

    Leave a comment:


  • Wayne Diamond
    started a topic Return control to program while DLL continues

    Return control to program while DLL continues

    I have an exported Sub "SendMail" in a DLL... I would like to activate this Sub, and then have control returned to my program while the DLL sends the email in the background. Everything is working, but at the moment my program hangs until the sub has completed (when the email finishes sending) - usually a few seconds...
    Does anyone know? if its possible at all?



    ------------------
Working...
X