Solved

Internet File PROBLEM

Posted on 2001-07-23
7
589 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
Comment Utility
You should be able to do that by using 'CInternetFile::Seek
':

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

0
 

Author Comment

by:AVCProgrammer
Comment Utility
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
Comment Utility
Try with a "InternetSetFilePointer". It's a Win32 function (WININET.DLL).
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:AVCProgrammer
Comment Utility
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
Comment Utility
>>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
Comment Utility
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
Comment Utility
Per recommendation points refunded and question closed.

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
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.

743 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

15 Experts available now in Live!

Get 1:1 Help Now