Click here to Skip to main content
16,016,738 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Right click? Pin
Bob Stanneveld3-Sep-04 12:26
Bob Stanneveld3-Sep-04 12:26 
GeneralDLL heap crash Pin
blackhobbit3-Sep-04 2:59
blackhobbit3-Sep-04 2:59 
GeneralGraph plotting... Pin
jeej3-Sep-04 1:46
jeej3-Sep-04 1:46 
QuestionPutFile(…) works - GetFile(…) doesn't… ? Pin
anderslundsgard3-Sep-04 1:42
anderslundsgard3-Sep-04 1:42 
AnswerRe: PutFile(…) works - GetFile(…) doesn't… ? Pin
David Crow3-Sep-04 2:30
David Crow3-Sep-04 2:30 
GeneralRe: PutFile(…) works - GetFile(…) doesn't… ? Pin
anderslundsgard3-Sep-04 2:35
anderslundsgard3-Sep-04 2:35 
GeneralRe: PutFile(…) works - GetFile(…) doesn't… ? Pin
David Crow3-Sep-04 2:41
David Crow3-Sep-04 2:41 
GeneralRe: PutFile(…) works - GetFile(…) doesn't… ? Pin
anderslundsgard5-Sep-04 20:01
anderslundsgard5-Sep-04 20:01 
At first, this Upload function works OK:

<br />
bool CFTP::UploadFileToFolder(const CString &strFile, const CString &strFolder )<br />
{<br />
	if( !bConnectionEstablished )<br />
	{<br />
		AfxMessageBox( "FTP - No server connected." );<br />
		return false;<br />
	}<br />
<br />
	CFileFind Finder;<br />
	CString strFileName;// = strFile;<br />
	<br />
	if( Finder.FindFile( strFile ) )<br />
	{<br />
		Finder.FindNextFile();<br />
		strFileName = Finder.GetFileName();<br />
		Finder.Close();<br />
	}		<br />
        <br />
        // THIS WORKS PERFECT<br />
	BOOL bUploaded = m_pFtpConnection->PutFile(strFile,	strFileName, FTP_TRANSFER_TYPE_BINARY, 1 );<br />
<br />
	if( !bUploaded )<br />
		Error( "CFTP::UploadFileToFolder(...)" );<br />
	// AfxMessageBox("Uploaded Successfully");<br />
<br />
	return true;<br />
}<br />


and (using the same CFtpConnection object, m_pFtpConnection)
this funk doesn't work:

<br />
bool CFTP::DownloadFile(const CString &strFromUrl, const CString &strLocalPath)<br />
{<br />
	if( !bConnectionEstablished )<br />
	{<br />
		AfxMessageBox( "FTP - No server connected." );<br />
		return false;<br />
	}<br />
<br />
	return m_pFtpConnection->GetFile(	strFromUrl, // "File.ext",<br />
		strLocalPath, // "C:\\File.ext", <br />
		TRUE,<br />
		FILE_ATTRIBUTE_NORMAL,						FTP_TRANSFER_TYPE_BINARY,					1);<br />
}<br />


_____________________________

...and justice for all

APe
Generalhelp : h.263 concern Pin
adoration3-Sep-04 1:28
adoration3-Sep-04 1:28 
GeneralCSockets in multiple threads Pin
snodgrass3-Sep-04 1:18
snodgrass3-Sep-04 1:18 
GeneralRe: CSockets in multiple threads Pin
jan larsen3-Sep-04 1:34
jan larsen3-Sep-04 1:34 
GeneralRe: CSockets in multiple threads Pin
BlackDice3-Sep-04 7:16
BlackDice3-Sep-04 7:16 
GeneralRe: CSockets in multiple threads Pin
snodgrass3-Sep-04 13:10
snodgrass3-Sep-04 13:10 
GeneralRe: CSockets in multiple threads Pin
BlackDice6-Sep-04 3:02
BlackDice6-Sep-04 3:02 
GeneralRe: CSockets in multiple threads Pin
snodgrass6-Sep-04 5:25
snodgrass6-Sep-04 5:25 
GeneralWritting data to CD Pin
verma-rahul3-Sep-04 1:17
verma-rahul3-Sep-04 1:17 
GeneralRe: Writting data to CD Pin
Member 3076123-Sep-04 2:07
Member 3076123-Sep-04 2:07 
GeneralRe: Writting data to CD Pin
verma-rahul3-Sep-04 2:15
verma-rahul3-Sep-04 2:15 
GeneralRe: Writting data to CD Pin
Member 3076123-Sep-04 2:55
Member 3076123-Sep-04 2:55 
GeneralRe: Writting data to CD Pin
Henry miller3-Sep-04 2:57
Henry miller3-Sep-04 2:57 
GeneralConverting 32 bit bitmap image to 24 bit bitmap image Pin
hasansheik3-Sep-04 0:34
hasansheik3-Sep-04 0:34 
GeneralRe: Converting 32 bit bitmap image to 24 bit bitmap image Pin
Bob Stanneveld3-Sep-04 12:15
Bob Stanneveld3-Sep-04 12:15 
GeneralRe: Converting 32 bit bitmap image to 24 bit bitmap image Pin
Ayman Kouzayha30-Jun-10 14:27
Ayman Kouzayha30-Jun-10 14:27 
GeneralRe: Converting 32 bit bitmap image to 24 bit bitmap image Pin
Bob Stanneveld30-Jun-10 20:16
Bob Stanneveld30-Jun-10 20:16 
GeneralInterprocess communication question... Pin
karam_chand3-Sep-04 0:16
karam_chand3-Sep-04 0: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.