Internet File PROBLEM

Hi,

I have a very big problem with an FTP file.
I'm programming a FTP Client for updating  and dowloading files from internet via FTP.
I try to do a ResumeUpdate function that allow users to break an upload and to resuming later.

When I try to seek my Internet file (already opened for writing), the CInternetFile class throws an exception.
I read Microsoft documentation and I see that seek is allow only for the CHttpFile class.

My question is:
there is a way to buypass this exception, that is there is a way to seek an opened for writing internet file????
AVCProgrammerAsked:
Who is Participating?
 
NetminderConnect With a Mentor Commented:
Per recommendation points refunded and question closed.

Netminder
Community Support Moderator
Experts Exchange
0
 
jkrCommented:
You should be able to do that by using 'CInternetFile::Seek
':

pIF->Seek ( lSizeOfDownloadedFileOnDisk, CFile::begin);

0
 
AVCProgrammerAuthor Commented:
To jkr

I'm uploading and not downloading a file. If yuo read the seek help on CInternetFIle, you will see that seek is allowed only for ChttpFile.

Thanks for your answer
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
jcgdCommented:
Try with a "InternetSetFilePointer". It's a Win32 function (WININET.DLL).
0
 
AVCProgrammerAuthor Commented:
To icqd

Also teh InternetSetFilePointer has a big problem. You can call it only with file opened in read mode.

Thanks !
0
 
jkrCommented:
>>to break an upload and to resuming later.

Well, I thought you wanted to resume a download. AFAIK, resuming uploads is not supported by the protocol...
0
 
griesshCommented:
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to refund the points and PAQ at zero points since nobody had a satisfying answer for you.

The link to the Community Support area is: http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.