Click here to Skip to main content
16,019,140 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Who to make a package ? Pin
Hamid Taebi22-Feb-07 0:20
professionalHamid Taebi22-Feb-07 0:20 
QuestionRe: Who to make a package ? Pin
David Crow22-Feb-07 2:37
David Crow22-Feb-07 2:37 
AnswerRe: Who to make a package ? Pin
Mark Salsbery22-Feb-07 5:50
Mark Salsbery22-Feb-07 5:50 
QuestionMS Speech SDK: No sound can be heard while a .wav file being processed? Pin
chocm21-Feb-07 21:10
chocm21-Feb-07 21:10 
GeneralRe: MS Speech SDK: No sound can be heard while a .wav file being processed? Pin
Programm3r22-Feb-07 3:08
Programm3r22-Feb-07 3:08 
QuestionProblem with FTP application [modified] Pin
Sameer_Thakur21-Feb-07 20:03
Sameer_Thakur21-Feb-07 20:03 
GeneralRe: Problem with FTP application Pin
Programm3r21-Feb-07 20:33
Programm3r21-Feb-07 20:33 
GeneralRe: Problem with FTP application Pin
Sameer_Thakur21-Feb-07 23:32
Sameer_Thakur21-Feb-07 23:32 
Hi.
Thanks for the info, but as u said that the file which I am trying to download is present on the server and I can see its contents in the browser by typing its URL.Frown | :(

I am using a Non-Microsoft FTP server. Will it cause any problem to download a file from Non-Microsoft FTP server with WinInet APIs?
Here I am posting a code snippet which I am using to download a file...

///////////////////////////////////////////////////////////////////////////

BOOL bRetVal = FALSE;

CInternetSession sesion;
CFtpConnection *mFtpObj = NULL;
CString strCopyAt;

CString strHost,strUserID,strPassword,strPort,strXMLFilePath;

try
{
strHost = "*******";
strUserID = "***";
strPassword = "******";
strPort = "**";
strXMLFilePath = "***/ABC.xml";

}
catch(...)
{
return FALSE;
}

int nPort = atoi(strPort);

try
{
mFtpObj = sesion.GetFtpConnection(strHost,strUserID,strPassword,nPort);
}

catch(...)
{
return FALSE;
}

// Copy the file from server with temp name.
strCopyAt = "c:\Temp_ABC.xml"

bRetVal = mFtpObj->GetFile(
strXMLFilePath,
strCopyAt,
FALSE,
FILE_ATTRIBUTE_NORMAL,
FTP_TRANSFER_TYPE_BINARY
);

DWORD wrd = GetLastError();
DWORD len = 1000;

char errorMsg[1000];
bool b = InternetGetLastResponseInfo(&wrd,errorMsg,&len);



///////////////////////////////////////////////////////////////////////////


This is the error message that I get for string errorMsg;

{"200 Type set to I
200 PORT command successful
550 *****/ABC.xml: No such file or directory
550 *****/ABC.xml: No such file or directory
"}




Sameer Thakur

AnswerRe: Problem with FTP application Pin
David Crow22-Feb-07 2:39
David Crow22-Feb-07 2:39 
GeneralRe: Problem with FTP application Pin
Programm3r22-Feb-07 2:46
Programm3r22-Feb-07 2:46 
GeneralRe: Problem with FTP application Pin
David Crow22-Feb-07 2:53
David Crow22-Feb-07 2:53 
GeneralRe: Problem with FTP application Pin
Programm3r22-Feb-07 3:01
Programm3r22-Feb-07 3:01 
GeneralRe: Problem with FTP application Pin
JudyL_MD22-Feb-07 8:04
JudyL_MD22-Feb-07 8:04 
AnswerRe: Problem with FTP application Pin
Programm3r22-Feb-07 2:49
Programm3r22-Feb-07 2:49 
QuestionRe: Compile any projects through a project in a workspace Pin
dungpapai21-Feb-07 19:50
dungpapai21-Feb-07 19:50 
AnswerRe: Compile any projects through a project in a workspace Pin
prasad_som21-Feb-07 20:06
prasad_som21-Feb-07 20:06 
GeneralRe: Compile any projects through a project in a workspace Pin
dungpapai21-Feb-07 21:25
dungpapai21-Feb-07 21:25 
AnswerRe: Compile any projects through a project in a workspace Pin
prasad_som21-Feb-07 21:38
prasad_som21-Feb-07 21:38 
GeneralRe: Compile any projects through a project in a workspace Pin
dungpapai21-Feb-07 22:21
dungpapai21-Feb-07 22:21 
QuestionShellAbout() Question Pin
Programm3r21-Feb-07 18:54
Programm3r21-Feb-07 18:54 
AnswerRe: ShellAbout() Question Pin
prasad_som21-Feb-07 19:13
prasad_som21-Feb-07 19:13 
GeneralRe: ShellAbout() Question Pin
Programm3r21-Feb-07 19:16
Programm3r21-Feb-07 19:16 
QuestionHow to clear DC content? Pin
houari_id21-Feb-07 18:00
houari_id21-Feb-07 18:00 
AnswerRe: How to clear DC content? [modified] Pin
Mark Salsbery21-Feb-07 18:27
Mark Salsbery21-Feb-07 18:27 
QuestionRe: How to clear DC content? Pin
prasad_som21-Feb-07 18:46
prasad_som21-Feb-07 18:46 

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.