Solved

Saving or using CStdioFile* returned by OpenURL

Posted on 1997-09-27
3
443 Views
Last Modified: 2013-11-19
I'm kinda new to this and I am trying to use OpenURL to get
an FTP file.  I have the binary flag set and the member variable for the CStdioFile is the file on the remote Ftp server...How can I save this to disk?  I guess this is a generic CStdioFile question.
0
Comment
Question by:bsturk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1307050
If you have a CStdioFile*, you can always use CStdioFile::Read() to read from the "file". Then once you have the string, you can do anything you want with it, such as save it to disk, etc.

0
 

Author Comment

by:bsturk
ID: 1307051
I've since figured out the Read() thing and am using a progress control while I read.  But how do I save that dang thing?  If it's a compressed file how can I detect the eof?  Do I have to use c run-time stuff like FILE?
0
 
LVL 1

Accepted Solution

by:
TKII earned 50 total points
ID: 1307052
If you are using Read to read from FTP you have to specify a buffer and the size of this buffer. Read returns the number of read bytes to you. So I think you should open a second file (CFile) and write the received number of bytes from the buffer to the new file. If Read tells you that 0 (zero) bytes were read then you have the reached the eof.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Detect CR LF to each line 12 175
Hibernate methods 2 83
modThree challenge 4 105
ASP.NET C# MessageBox.Show Showing a modal dialog box or form when the application ... 2 185
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

749 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