回 帖 发 新 帖 刷新版面

主题:棘手问题:如何在PB9.0中远程服务器

最近有个项目马上就到了交工日期了。
需要连接远程服务器,上传下载文件,请问如何在PB9.0中实现呢?
谢谢各位了!

回复列表 (共5个回复)

沙发

连接远程服务器肯定没问题。。。用IP连接就可以了
上传下载就不懂鸟

板凳


我的意思是在pb9.0中,通过ftp的方式连接远程服务器,上传下载文件
我在网上搜到一些资料,用wininet.dll这个动态连接库是能够实现的。
谁有这个库的详细说明啊,给提供一下,谢谢!

3 楼

哦,那这个DLL我有,需要的话找我,发给你
629K,你找下在系统目录下是否有
然后还得定义一些函数
Function boolean  FtpPutFile (ulong hConnect, ref string lpszLocalFile, ref string lpszNewRemoteFile, ulong dwFlags, ref ulong dwContext) Library "WININET.DLL" Alias for "FtpPutFileA"
Function boolean  FtpSetCurrentDirectory (ulong hConnect, ref string lpszDirectory) Library "WININET.DLL" Alias for "FtpSetCurrentDirectoryA"
Function boolean  InternetCloseHandle (ulong hInternet) Library "WININET.DLL"
Function ulong    InternetConnect (ulong hInternet, ref string lpszServerName, long nServerPort, ref string lpszUserName, ref string lpszPassword, ulong dwService, ulong dwFlags, ref ulong dwContext) Library "WININET.DLL" Alias for "InternetConnectA"
Function ulong    InternetOpen (ref string lpszAgent, ulong dwAccessType, ref string lpszProxy, ref string lpszProxyBypass, ulong dwFlags) Library "WININET.DLL" Alias for "InternetOpenA"

自己看看

4 楼

这个我试过了,关键是现在只要一执行,就报错,错误号:R0021
application terminate
bad runtime function reference at line 11 in .......
用regsvr32  注册wininet.dll   提示无法找到dll输入点。

5 楼


问题我已经解决了,加上别名就好了。
多谢两位的热心回贴。
但还有一个问题。
我用ftp 命令时,就是run("file.bat")  为什么不能把所有的命令热行完呢?

我来回复

您尚未登录,请登录后再回复。点此登录或注册