Writing IdPOP3 thread (in BCB 4 and Indy 9)

Giganews Newsgroups
Subject: Writing IdPOP3 thread (in BCB 4 and Indy 9)
Posted by:  xCarl (car…@pacific.net.sg)
Date: Wed, 22 Oct 2003

Me getting adventurous again... this time with thread. Without in-depth
knowledge and history, I cut and paste a single thread example from the book
"C++ Builder, How to.." and execute in BCB 4. It works fine.

Then I thought things would be the same, I cut and paste my POP3 mail
retrieval portion of the code and paste into the "execute" section of my
thread. Unfortunately problem found, none of the IdPOP3->functions work.

IdPOP3->Connect(); // Can't work inside the thread :-(
IdPOP3->CheckMessages(); // Can't work inside the thread  :-(
Form1->IdPOP3->Connect(); // Can't work inside the thread  :-(
Form1->IdPOP3->CheckMessages(); // Can't work inside the thread  :-(

Sigh..... anyone can advise? I didn't use Indy thread component because
there is no C++ thread codes for my to start with. I normally cut and paste
from somewhere and work from there.... :pp

If there is existing related source which I am still not aware of, please,
let me know so that I can work from there.

Thanks! :>

Replies