Click here to Skip to main content
16,010,876 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with CListCtrl::DeleteColumn(0) Pin
Cris15-Oct-02 4:42
Cris15-Oct-02 4:42 
GeneralRe: Problem with CListCtrl::DeleteColumn(0) Pin
Chris Richardson14-Oct-02 12:03
Chris Richardson14-Oct-02 12:03 
GeneralRe: Problem with CListCtrl::DeleteColumn(0) Pin
Cris15-Oct-02 1:39
Cris15-Oct-02 1:39 
GeneralRe: Problem with CListCtrl::DeleteColumn(0) Pin
Chris Richardson15-Oct-02 8:01
Chris Richardson15-Oct-02 8:01 
GeneralAccessing a dialog box's system menu Pin
smjones14-Oct-02 9:40
smjones14-Oct-02 9:40 
GeneralRe: Accessing a dialog box's system menu Pin
Joaquín M López Muñoz14-Oct-02 9:40
Joaquín M López Muñoz14-Oct-02 9:40 
GeneralRe: Accessing a dialog box's system menu Pin
smjones14-Oct-02 10:22
smjones14-Oct-02 10:22 
GeneralFTP question Pin
Anonymous14-Oct-02 9:24
Anonymous14-Oct-02 9:24 
Hello All, I am having some problems trying to learn the basics of FTP'ing a file (uploading and downloading). I have read most of the information on this website and even found some postings that helped but I am still having some problems. I was hoping some of the brainiacs out there could help. This is what I am trying to do: I want to open the FTP session, upload a file, close the session. Then, periodically, I want to open the session, see if there are any files to be downloaded, if there are download the file(s) and close the session. I found a posting that said to use CFtpConnection and so that is what I am trying to do.

I am using the CFtpConnection class, so to open the session I use GetFtpConnection. I pass in the server name, user name, password, then use INTERNET_DEFAULT_FTP_PORT.

Upon trying to upload the file, I am using the PutFile. I use the CFileFind class to get the filename. I then call PutFile with the remote file (it is on the network), the local file, FTP_TRANSFER_TYPE_BINARY, and then 1. This function is failing.

Upon trying to download the file, I am using the GetFile. I pass it the remote file, the local file, FALSE for the BFailIfExists, FTP_TRANSFER_TYPE_BINARY, and then 1. This function is failing.

Then I have the closing of the connection after the upload or download functions,
m_Session.Close();
m_pFtpConnection->Close();

if(m_pFtpConnection!=NULL)
delete m_pFtpConnection;

if(m_Session!=NULL)
delete m_Session;

Another problem I have is that this is all being done inside another application. I open the session, upload the file, then close the session. When I go to open the session again, it gives me "the handle is invalid" message. Can anyone help!!!


QuestionHow do i close a thread created by CreateThread? Pin
Anonymous14-Oct-02 8:23
Anonymous14-Oct-02 8:23 
AnswerRe: How do i close a thread created by CreateThread? Pin
jmkhael14-Oct-02 8:26
jmkhael14-Oct-02 8:26 
GeneralRe: How do i close a thread created by CreateThread? Pin
Anonymous14-Oct-02 9:14
Anonymous14-Oct-02 9:14 
AnswerRe: How do i close a thread created by CreateThread? Pin
Paul M Watt14-Oct-02 8:28
mentorPaul M Watt14-Oct-02 8:28 
GeneralKnowing when views switch/close Pin
Kirk Hammond14-Oct-02 8:00
Kirk Hammond14-Oct-02 8:00 
GeneralRe: Knowing when views switch/close Pin
Pavel Klocek14-Oct-02 8:07
Pavel Klocek14-Oct-02 8:07 
GeneralRe: Knowing when views switch/close Pin
Ravi Bhavnani14-Oct-02 11:41
professionalRavi Bhavnani14-Oct-02 11:41 
QuestionHow to compare CString and CArray? Pin
ooosawaddee314-Oct-02 7:51
ooosawaddee314-Oct-02 7:51 
AnswerRe: How to compare CString and CArray? Pin
Chris Losinger14-Oct-02 7:56
professionalChris Losinger14-Oct-02 7:56 
AnswerRe: How to compare CString and CArray? Pin
User 988514-Oct-02 7:57
User 988514-Oct-02 7:57 
GeneralSTL question Pin
User 988514-Oct-02 7:28
User 988514-Oct-02 7:28 
GeneralRe: STL question Pin
valikac14-Oct-02 7:42
valikac14-Oct-02 7:42 
GeneralRe: STL question Pin
User 988514-Oct-02 9:54
User 988514-Oct-02 9:54 
GeneralRe: STL question Pin
Joaquín M López Muñoz14-Oct-02 10:59
Joaquín M López Muñoz14-Oct-02 10:59 
GeneralRe: STL question Pin
Anonymous14-Oct-02 11:26
Anonymous14-Oct-02 11:26 
GeneralRe: STL question Pin
Joaquín M López Muñoz14-Oct-02 11:35
Joaquín M López Muñoz14-Oct-02 11:35 
GeneralRe: STL question - Loki Pin
Neville Franks14-Oct-02 12:16
Neville Franks14-Oct-02 12:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.