Home All Groups Group Topic Archive Search About

ftp callback example C#

Author
9 Jan 2006 5:08 AM
marfi95
Hello all.

I've been looking all over the net for examples of how to use a
callback out of FtpGetFile in C# or VB.net so I can display progress to
the user.  No such luck.  I'm new to C# and am having problems
understanding how to use the callback with InternetSetStatusCallback.

Does anybody have any examples of how to implement a callback when
using FTP ?

Any help would be most appreciated.

Thanks,
Mark

Author
9 Jan 2006 1:41 PM
Ignacio Machin ( .NET/ C# MVP )
Hi,

<marf***@yahoo.com> wrote in message
news:1136783309.145069.100750@g49g2000cwa.googlegroups.com...
> Hello all.
>
> I've been looking all over the net for examples of how to use a
> callback out of FtpGetFile in C# or VB.net so I can display progress to
> the user.  No such luck.  I'm new to C# and am having problems
> understanding how to use the callback with InternetSetStatusCallback.
>
> Does anybody have any examples of how to implement a callback when
> using FTP ?

The framework does not include a ftp client, which one are you using?

A workaround, if you know the target file AND the expected size you can use
a timer in the UI to check the size at intervals and update your UI.

Of course, you are downloading it in a background thread don't u?


--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Author
9 Jan 2006 3:01 PM
marfi95
I've just found snippets of various things around and have FTP working
just fine.  I just wanted the ability to update a progress bar out of
my download which uses FtpGetFile.  I know you can implement a callback
out of this api, but I haven't been able to figure out how yet.