Solved

MFC CFtpConnection Questions...

Posted on 1997-04-16
4
988 Views
Last Modified: 2013-11-20
I'm working on a little FTP program for Windows.  I'm using the MFC Internet classes, including CInternetSession and FtpConnection.  Everything works great (I can do dirs, u/d files, etc.), but I haven't been able to get the tandard login welcome Screen most FTP servers send.  Is there some say to do this, using the MFC FTP Classes?

I've also tried deriving a class from CInternetSession, verriding the OnStatusCallback() method, but that didn't seem to do much...

Here's an example of what I'm doing:


CInternetSession *cSession;
CFtpConnection   *pFtp;    

cSession = new CInternetSession( (LPCTSTR)"www.netside.com", 0,
INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, NULL);
pFtp = cSession->GetFtpConnection("www.netside.com", "rat", "lander", 21, FALSE);

// ... Directory Read code, then some copy stuff after this.


Thanks,


-Greg Ratajik
rat@netside.com
0
Comment
Question by:ratajik
[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
  • 2
4 Comments
 
LVL 11

Expert Comment

by:mikeblas
ID: 1301042
What "standard login screen" are you talking about?  Since FTP is a text-based protocol, it doesn't send "screens" around.

.B ekiM

0
 

Author Comment

by:ratajik
ID: 1301043
Argh.. sorry, I should have been more specific.  A lot of servers, when you first logon, send a text description of the server.  I've seen it refered to the Logon message or the Welcome Message.  When I said "Screen" I was refering to that....


-Rat
0
 
LVL 4

Accepted Solution

by:
mbhakta earned 100 total points
ID: 1301044
I avoid MFC's CInterenet features as far as possible. Instead I use the Wininet.dll to attack my FTP related problems. You may also look into the same and see if it helps you.
0
 

Author Comment

by:ratajik
ID: 1301045
Yeah, that's what I was afraid of.  I've actually written a fair amount of TCP/IP stuff (Some for IBM, some POP3, SMTP, and NNTP stuff... I was WISHING that M$ did it right and I could just focus on writting my program and not yet another protocal class.

Oh well, par for course, eh? :)

Thanks.

-Greg
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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 …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

717 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