FTP API
- From: "ama" <a.m.a@xxxxxxxxxxxx>
- Date: Thu, 17 Nov 2005 10:07:15 -0500
hi
i'm having problems with sending a file on
a FTP server using a call to FtpPutFile.
Of course im logged in fine but here's what i did
( minus the actual credentials )
Here my FTP_OpenSession always returns TRUE
but FTP_SendFile does not work....
Also, GetLastError returns 12003.
No idea what that means...
BOOL CFtp::FTP_OpenSession(LPCSTR server, LPCSTR user, LPCSTR pass)
{
m_hSession = InternetOpen("checklist", INTERNET_OPEN_TYPE_PRECONFIG, NULL,
NULL, 0);
if( ! m_hSession )
return FTP_CloseSession(FALSE);
m_hFtpSession = InternetConnect(m_hSession, server,
INTERNET_DEFAULT_FTP_PORT, user, pass,
INTERNET_SERVICE_FTP, 0, NULL);
if( ! m_hFtpSession )
return FTP_CloseSession(FALSE);
return TRUE;
}
BOOL CFtp::FTP_SendFile(LPCSTR local, LPCSTR remote)
{
UINT flag = FTP_TRANSFER_TYPE_BINARY;
if( ! FtpPutFile(m_hFtpSession, local, remote, flag , 0) )
return FALSE;
return TRUE;
}
Ok thanks..
.
- Follow-Ups:
- Re: FTP API
- From: Igor Tandetnik
- Re: FTP API
- Prev by Date: Re: using ASDI to configure FTP
- Next by Date: Re: HELP!!!!! problem in using typedef in VC++ header file
- Previous by thread: Regarding Console window
- Next by thread: Re: FTP API
- Index(es):
Relevant Pages
|