Ftp Transfer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi

I have an application written in c# which uses windows Api functions to
comunicate with an ftp server to transfer files.
My problem is that when i start the transfer and if i remove the pocket pc
from the cradle when the tansfer isin progres the application blocks and i
have to restart the pocket pc.
Is there any sollution to resolve the problem?
 
Probably several. Eventually the operation that was in progress should
time-out and control will be returned, with an error or an exception, to
your code. If the real problem is that the application is effectively
locked-up while it's waiting, then you are doing the transfer in the UI
thread, the thread which is responsible for painting the controls, handling
the keyboard and touchscreen, etc. That's the wrong way to do this. You
should be doing things that might take a long time, like network transfers,
in a secondary thread so that, if that thread blocks during a lengthy
operation, the UI is not dead and the user has the opportunity to cancel the
operation, if desired.

Paul T.
 
Back
Top