> Pop3Cli->Connect(); > WaitForSingleObject(hEvent,Pop3TimeOut); > What I doing wrong?
WaitForSingleObject is a blocking function that prevent any event from being triggered (you can see that your application is frozen: you cna't click on a button or resize it). So ICS component - which are event driven - do not work. Instead of "waiting", just use the event OnRequestDone that is triggered when the asynchronous operation you requested has been executed in the background. See MailRcv sample program. Also have a look at MailSnd (which is about SMTP) to see the code behind "All in one" button that chain asynch operations. -- [EMAIL PROTECTED] http://www.overbyte.be ----- Original Message ----- From: "??????? ???????" <[EMAIL PROTECTED]> To: <twsocket@elists.org> Sent: Saturday, July 30, 2005 5:01 PM Subject: [twsocket] Using TPop3Cli > > Hello, > I try using TPop3Cli. > Code like this don`t working: > > void MyProc() > { > ... > Pop3Cli->Connect(); > WaitForSingleObject(hEvent,Pop3TimeOut); > Pop3Cli->User(); > WaitForSingleObject(hEvent,Pop3TimeOut); > Pop3Cli->Pass(); > WaitForSingleObject(hEvent,Pop3TimeOut); > ... > } > > void __fastcall TForm1::Pop3Cli1RequestDone(TObject *Sender, > TPop3Request RqType, WORD Error) > { > SetEvent(hEvent); > } > > What I doing wrong? > Or how I will use TPop3Cli? Before I was using TSyncPop3Cli and code like > this worked OK: > ... > SyncPop3->ConnectSync(); > SyncPop3->UserSync(); > SyncPop3->PassSync(); > ... > > > Thank. > Best regards! > > > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://www.elists.org/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be