But I want to ask about #FTP_TRANSFER_TYPE_BINARY ??
Is it a macro that I have to create ???
Thanks,
Axapter
----- Original Message -----
From: "Dahlsgaard Jan" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, April 29, 2005 4:29 PM
Subject: SV: [development-axapta] How to send file to FTP
Hi
The following code has previously been posted in this forum.
In class wininet, add the following in classdeclaration:
DLLFunction _internetConnect;
DLLFunction _ftpGetFile;
DLLFunction _ftpPutFile;
and this in new:
_internetConnect = new DLLFunction(_winInet,"InternetConnectA");
_internetConnect.returns(ExtTypes::DWORD);
_internetConnect.arg(ExtTypes::DWORD);
_internetConnect.arg(ExtTypes::STRING);
_internetConnect.arg(ExtTypes::DWORD);
_internetConnect.arg(ExtTypes::STRING);
_internetConnect.arg(ExtTypes::STRING);
_internetConnect.arg(ExtTypes::DWORD);
_internetConnect.arg(ExtTypes::DWORD);
_internetConnect.arg(ExtTypes::DWORD);
_ftpGetFile = new DLLFunction(_winInet,"FtpGetFileA");
_ftpGetFile.returns(ExtTypes::DWORD);
_ftpGetFile.arg(ExtTypes::DWORD);
_ftpGetFile.arg(ExtTypes::STRING);
_ftpGetFile.arg(ExtTypes::STRING);
_ftpGetFile.arg(ExtTypes::DWORD);
_ftpGetFile.arg(ExtTypes::DWORD);
_ftpGetFile.arg(ExtTypes::DWORD);
_ftpGetFile.arg(ExtTypes::DWORD);
_ftpPutFile = new DLLFunction(_winInet,"FtpPutFileA");
_ftpPutFile.returns(ExtTypes::DWORD);
_ftpPutFile.arg(ExtTypes::DWORD);
_ftpPutFile.arg(ExtTypes::STRING);
_ftpPutFile.arg(ExtTypes::STRING);
_ftpPutFile.arg(ExtTypes::DWORD);
_ftpPutFile.arg(ExtTypes::DWORD);
add the following classes:
int internetConnect(str 60 _server, str 99 _userName, str 99 _password )
{
return
_internetConnect.call(_handle,_server,0,_userName,_password,1,0,0);
}
int FtpGetFile(int _hdl, str 255 _remoteFile, str 255 _localFile)
{
return
_FtpGetFile.call(_hdl,_remoteFile,_localFile,false,0,#FTP_TRANSFER_TYPE_BINA
RY,0);
}
int FtpPutFile(int _hdl, str 255 _localFile, str 255 _remoteFile)
{
return
_FtpPutFile.call(_hdl,_localFile,_remoteFile,#FTP_TRANSFER_TYPE_BINARY,0);
}
Use internetconnect to connect to your ftp-server, and ftpgetfile and
ftpputfile to get and put files.
Regards
Jan Stelsig Dahlsgaard
Fujitsu DK
________________________________
Fra: [email protected]
[mailto:[EMAIL PROTECTED] P� vegne af Axapter
Sendt: 29. april 2005 10:49
Til: [email protected]
Emne: [development-axapta] How to send file to FTP
Hi all,
Does anyone has any experienced in using FTP ??
Can u give the example for me..
Thanks in advance,
Ax
________________________________
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
Yahoo! Groups Links
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

