Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Apr : INDY Team: Onwork... events in Indy10

www.cryer.info
Managed Newsgroup Archive

INDY Team: Onwork... events in Indy10

Subject:INDY Team: Onwork... events in Indy10
Posted by:"Patrick" (focus..@yeah.net)
Date:Thu, 28 Apr 2005 19:53:20

INDY Team,

I wrote a email client with indy 10, and sent email through TIdSMTP. I want
to show progress of sending, so I use the OnWorkBegin, OnWork and OnWorkEnd,
but it seems that they all do not work. In Indy 9 worked fine. I wrote the
code as below:

I defined three produces as:

    procedure myOnWorkBegin(Sender: TObject; AWorkMode: TWorkMode;
AWorkCountMax: Integer);
    procedure myOnWork(Sender: TObject; AWorkMode: TWorkMode; AWorkCount:
Integer);
    procedure myOnWorkEnd(Sender: TObject; AWorkMode: TWorkMode);

and assigned them to events as:

    SMTPClient.OnWorkBegin:=myOnWorkBegin;
    SMTPClient.OnWork:=myOnWork;
    SMTPClient.OnWorkEnd:=myOnWorkEnd;

But when I ran it, all the three produces were not called. I also tried
(after SMTPClient.Connect):

    SMTPClient.IOHandler.OnWorkBegin:=myOnWorkBegin;
    SMTPClient.IOHandler.OnWork:=myOnWork;
    SMTPClient.IOHandler.OnWorkEnd:=myOnWorkEnd;

and

    SMTPClient.Socket.OnWorkBegin:=myOnWorkBegin;
    SMTPClient.Socket.OnWork:=myOnWork;
    SMTPClient.Socket.OnWorkEnd:=myOnWorkEnd;

Same result. Please help me, thanks

Patrick

Replies:

www.cryer.info
Managed Newsgroup Archive