FTP API



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..



.



Relevant Pages

  • Re: CSocket, best way to wait for a reply?
    ... So what you end up with is a socket that tells the owner class that there is ... BOOL CMySocket::SendAndWaitForReply ... If you get data from the server OnReceive is called. ... > BOOL bWhatEverTheServerSaid = FALSE; ...
    (microsoft.public.vc.mfc)
  • [NFSD] kconfig: Select things at the closest tristate instead of bool
    ... In general when we have a bool sitting under a tristate it is ... If you want your Linux box to act as an NFS *server*, ... bool "Provide server support for the NFSv3 ACL protocol extension" ... Implement the NFSv3 ACL protocol extension for manipulating POSIX ...
    (Linux-Kernel)
  • [NFSD]: Select things at the closest tristate instead of bool
    ... In general when we have a bool sitting under a tristate it is ... If you want your Linux box to act as an NFS *server*, ... bool "Provide server support for the NFSv3 ACL protocol extension" ... Implement the NFSv3 ACL protocol extension for manipulating POSIX ...
    (Linux-Kernel)
  • LSASS errors
    ... Last night a server had unusual errors with winlogon and ... What would you do if you found this on your server? ... Microsoft.SharePoint.WebPartPages.ImageWebPart o, bool isNullable, bool ... Microsoft.SharePoint.WebPartPages.WebPart o, bool isNullable, bool needType) ...
    (microsoft.public.windows.server.security)