You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
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
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?
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?
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: