Solved

MFC CFtpConnection Questions...

Posted on 1997-04-16
4
970 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
  • 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

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
Expand macro to include alternate header placement and naming 5 66
Complete beginner needs help making a cron job 9 110
zeroFront challenge 7 80
Line meaning 9 82
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

28 Experts available now in Live!

Get 1:1 Help Now