Solved

MFC CFtpConnection Questions...

Posted on 1997-04-16
4
965 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
configuration management 2 99
paragon account problem 9 96
ShiftLeft challenge 21 65
matchUp  challenge 9 71
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

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

17 Experts available now in Live!

Get 1:1 Help Now