[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 644
  • Last Modified:

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????
0
AVCProgrammer
Asked:
AVCProgrammer
1 Solution
 
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
 
jcgdCommented:
Try with a "InternetSetFilePointer". It's a Win32 function (WININET.DLL).
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
NetminderCommented:
Per recommendation points refunded and question closed.

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now