Solved

Internet File PROBLEM

Posted on 2001-07-23
7
601 Views
Last Modified: 2008-02-20
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
Comment
Question by:AVCProgrammer
7 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 6308633
You should be able to do that by using 'CInternetFile::Seek
':

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

0
 

Author Comment

by:AVCProgrammer
ID: 6308699
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
 
LVL 3

Expert Comment

by:jcgd
ID: 6329442
Try with a "InternetSetFilePointer". It's a Win32 function (WININET.DLL).
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:AVCProgrammer
ID: 6333344
To icqd

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

Thanks !
0
 
LVL 86

Expert Comment

by:jkr
ID: 6334298
>>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
 
LVL 11

Expert Comment

by:griessh
ID: 6833120
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
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 6853127
Per recommendation points refunded and question closed.

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
TTimer no longer functioning 7 84
C++ assignment question 7 167
Would like to move button in a function 3 72
Installshield for Embarcadero EX 10.1 Berlin 4 18
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now