Click here to Skip to main content
15,913,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionFile transfer over UDP Pin
sunny_vc29-Jul-08 19:12
sunny_vc29-Jul-08 19:12 
AnswerRe: File transfer over UDP Pin
Mark Salsbery30-Jul-08 7:20
Mark Salsbery30-Jul-08 7:20 
QuestionFTP: InternetOpen() Pin
bkelly1329-Jul-08 8:12
bkelly1329-Jul-08 8:12 
AnswerRe: FTP: InternetOpen() Pin
led mike29-Jul-08 8:22
led mike29-Jul-08 8:22 
GeneralRe: FTP: InternetOpen() Pin
bkelly1329-Jul-08 9:54
bkelly1329-Jul-08 9:54 
QuestionRe: FTP: InternetOpen() Pin
Mark Salsbery29-Jul-08 10:05
Mark Salsbery29-Jul-08 10:05 
QuestionRe: FTP: InternetOpen() Pin
led mike29-Jul-08 10:12
led mike29-Jul-08 10:12 
AnswerRe: FTP: InternetOpen() Pin
bkelly1330-Jul-08 6:39
bkelly1330-Jul-08 6:39 
The code looks like this:

m_InternetConnectHandle = <br />
 InternetConnect( m_InternetOpenHandle, <br />
                  m_IPAddress, <br />
                  INTERNET_DEFAULT_FTP_PORT,<br />
                  m_UserName,<br />
                  m_Password , <br />
                  INTERNET_SERVICE_FTP, <br />
                  NULL,              // DWORD dwFlags  don't know what should go here<br />
                  NULL  );           // DWORD dwContext  or here<br />
  <br />
  if( m_InternetConnectHandle == NULL )<br />
  {   <br />
      m_dwErrorValue = GetLastError();<br />
      m_ErrorMessage.Format( _T("InternetConnect failed, error %d"), m_dwErrorValue );<br />
      AfxMessageBox( m_ErrorMessage, MB_OK );<br />
      return;<br />
  }


At the time it should have failed because I was trying to access my computer which does not have an FTP site. (Waiting for someone else to get the FTP server ready.) Since then the server was set up and the code works. I still don't know what to do with the last to arguments of the connection function, but is seems to be working.

BTW: The code format looks good in the preview, but not in the posted message. Sorry about that.

Thanks for your time

GeneralRe: FTP: InternetOpen() Pin
led mike30-Jul-08 7:43
led mike30-Jul-08 7:43 
GeneralRe: FTP: InternetOpen() Pin
Mark Salsbery30-Jul-08 7:48
Mark Salsbery30-Jul-08 7:48 
QuestionCDocument::Serialize Throwing exceptions for bad content Pin
bob1697229-Jul-08 7:38
bob1697229-Jul-08 7:38 
QuestionRe: CDocument::Serialize Throwing exceptions for bad content Pin
led mike29-Jul-08 7:48
led mike29-Jul-08 7:48 
AnswerRe: CDocument::Serialize Throwing exceptions for bad content Pin
bob1697229-Jul-08 7:54
bob1697229-Jul-08 7:54 
QuestionRIS implemetations Pin
vineeshV29-Jul-08 7:20
vineeshV29-Jul-08 7:20 
QuestionRe: RIS implemetations Pin
led mike29-Jul-08 7:48
led mike29-Jul-08 7:48 
QuestionAbout C++ Project (Please help, I am so worry about this) Pin
Aasia Naz29-Jul-08 6:40
Aasia Naz29-Jul-08 6:40 
GeneralRe: About C++ Project (Please help, I am so worry about this) Pin
Michael Schubert29-Jul-08 6:55
Michael Schubert29-Jul-08 6:55 
JokeRe: About C++ Project (Please help, I am so worry about this) Pin
CPallini29-Jul-08 7:08
mveCPallini29-Jul-08 7:08 
GeneralRe: About C++ Project (Please help, I am so worry about this) Pin
Rajesh R Subramanian30-Jul-08 22:59
professionalRajesh R Subramanian30-Jul-08 22:59 
GeneralRe: About C++ Project (Please help, I am so worry about this) Pin
CPallini30-Jul-08 23:20
mveCPallini30-Jul-08 23:20 
GeneralRe: About C++ Project (Please help, I am so worry about this) Pin
Rajesh R Subramanian30-Jul-08 23:27
professionalRajesh R Subramanian30-Jul-08 23:27 
AnswerRe: About C++ Project (Please help, I am so worry about this) Pin
Chris Losinger29-Jul-08 7:05
professionalChris Losinger29-Jul-08 7:05 
AnswerRe: About C++ Project (Please help, I am so worry about this) Pin
toxcct29-Jul-08 7:07
toxcct29-Jul-08 7:07 
AnswerRe: About C++ Project (Please help, I am so worry about this) Pin
Rick York29-Jul-08 7:17
mveRick York29-Jul-08 7:17 
AnswerRe: About C++ Project (Please help, I am so worry about this) Pin
Cedric Moonen29-Jul-08 7:34
Cedric Moonen29-Jul-08 7:34 

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.