相关推荐
-
VB FTP上传下载
'模板: Option Explicit Public Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" _ (ByVal sAgent As String, ByVal LAccessType As Long, ByVal sProxyName As String, _ ByVal SProxyBypass As String, ByVal lFlags As Long) As Long Public Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" _ (ByVal hInternetSession As Long, ByVal sServerName As String, _ ByVal nServerPort As Integer, ByVal sUsername As String, _ ByVal sPassword As String, ByVal lService As Long, _ ByVal lFlags As Long, ByVal lContext As Long) As Long Public Declare Function FtpGetFile Lib "wininet.dll" Alias "FtpGetFileA" _ (ByVal hFtpSession As Long, ByVal lpszRemoteFile As String, _ ByVal lpszNewFile As String, ByVal fFailIfExists As Boolean, _ ByVal dwFlagsAndAttributes As Long, ByVal dwFlags As Long, _ ByVal dwContext As Long) As Boolean Public Declare Function FtpPutFile Lib "wininet.dll" Alias "FtpPutFileA" _ (ByVal hFtpSession As Long, ByVal lpszLocalFile As String, _ ByVal lpszRemoteFile As String, ByVal dwFlags As Long, _ ByVal dwContext As Long) As Boolean Public Declare Function FtpDeleteFile Lib "wininet.dll" Alias "FtpDeleteFileA" _ (ByVal hFtpSession As Long, ByVal lpszFileName As String) As Boolean Public Declare Function FtpRenameFile Lib "wininet.dll" Alias "FtpRenameFileA" _ (ByVal hFtpSession As Long, ByVal lpszExsiting As String, ByVal lpszNew As String) As Boolean Public Declare Function InternetCloseHandle Lib "wininet.dll" (ByVal hInet As Long) As Integer Public Declare Function FtpFindFirstFile Lib "wininet.dll" Alias "FtpFindFirstFileA" _ (ByVal hFtpSession As Long, ByVal lpszSearchFile As String, _ lpFindFileData As WIN32_FIND_DATA, ByVal dwFlags As Long, _ ByVal dwContent As Long) As Long Public Declare Function InternetFindNextFile Lib "wininet.dll" Alias "InternetFindNextFileA" _ (ByVal hFind As Long, lpvFndData As WIN32_FIND_DATA) As Long Public Type FILETIME dwLowDateTime As Long dwHighDateTime As Long End Type Public Type WIN32_FIND_DATA dwFilAttributes As Long ftCreationTime As FILETIME ftLastAccessTime As FILETIME ftLastWriteTime As FILETIME nFileSizeHigh As Long nFileSizeLow As Long dwReserved0 As Long dwReserved1 As Long cFileName As String * 260 cAlternate As String * 14 End Type Public Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _ "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long Type OPENFILENAME lStructSize As Long hwndOwner As Long hInstance As Long lpstrFilter As String lpstrCustomFilter As String nMaxCustFilter As Long nFilterIndex As Long lpstrFile As String nMaxFile As Long lpstrFileTitle As String nMaxFileTitle As Long lpstrInitialDir As String lpstrTitle As String flags As Long nFileOffset As Integer nFileExtension As Integer lpstrDefExt As String lCustData As Long lpfnHook As Long lpTemplateName As String End Type '窗体: Private Sub Command1_Click() 'FTP下载 lnginet = InternetOpen(vbNullString, INTERNET_OPEN_TYPE_PRECONFIG, _ vbNullString, vbNullString, 0&) If lnginet Then lnginetconn = InternetConnect(lnginet, "219.131.192.243", 0, _ "posui", "djposui", 1, 0, 0) If lnginetconn Then blnRC = FtpGetFile(lnginetconn, "/load.txt", "c:\load.txt", 0, 0, 1, 0) If blnRC Then MsgBox "download ok!!!" End If InternetCloseHandle lnginetconn InternetCloseHandle lnginet MsgBox "close ok!!!" Else MsgBox "can't connect" End If Else MsgBox "ftp wrong" End If End Sub Private Sub Command2_Click() 'FTP上传 lnginet = InternetOpen(vbNullString, INTERNET_OPEN_TYPE_PRECONFIG, _ vbNullString, vbNullString, 0&) If lnginet Then lnginetconn = InternetConnect(lnginet, "219.131.192.243", 0, _ "administrator", "vai8888", 1, 0, 0) If lnginetconn Then blnRC = FtpPutFile(lnginetconn, "c:\1.txt", "/1.txt", 0, 0) If blnRC Then MsgBox "download ok!!!" End If InternetCloseHandle lnginetconn InternetCloseHandle lnginet MsgBox "close ok!!!" Else MsgBox "can't connect" End If Else MsgBox "ftp wrong" End If End Sub 方法2: '部件INET Private Sub Command1_Click() Me.Inet1.Execute Me.Inet1.URL, "send c:\11.txt /1.txt" '保存 End Sub Private Sub Command2_Click() Me.Inet1.Execute Me.Inet1.URL, "get /2.txt c:\2.txt" '下载 End Sub
-
vb ftp服务器文件上传,vb ftp服务器文件上传
vb ftp服务器文件上传 内容精选换一换本节指导您基于Linux操作系统环境完成镜像文件快速导入,推荐使用云平台的EulerOS云服务器作为转换镜像格式和生成位表文件的环境。Linux操作系统环境下,建议使用qemu-img-hw工具进行镜像格式转换。已完成镜像文件优化,详细操作请参考优化过程(Windows)或优化过程(Linux);同时需要确保镜像文件符合表1或表1中的限制下载地址:http...
-
笔记12:VB.net中的FTP操作:创建、删除、查询、下载、上传
FtpWebRequest与FtpWebResponse类用来与特定FTP服务器进行沟通。 FtpWebRequest 与 FtpWebResponse 类分别继承了 WebRequest 与 WebRequest。 FtpWebRequest负责将指令传送至FTP服务器; FtpWebResponse则封装服务器所返 回的消息。 F
-
[VB.NET]自定义FTP类的实现
实现FTP功能,需要理解FTP指令,使用VB.NET,自己设计FTP类需要到的引用主要有3个: 1, system.net.sockets 2, system.net 3, system.io 连接FTP,使用TCPCLIENT对象,如:dim ftpTcpClient as TcpClient=new TcpClietn(strFtpServerName,21)
-
VB编程FTP工具详解(源码)
VB编程FTP工具详解(源码),里面有详细的代码及说明。
-
VB.Net实现Ftp上传的方法
调用方式:UploadFile("d:/lob.rar", False) 2个参数分别为 准备上传的文件完整路径、是否续传功能函数: Public Sub UploadFile(ByVal Str_LocalFileName As String, ByVal Bool_Resume As Boolean) Dim LobSocket As Socket
-
VB程序员的FTP编程指南1.4-下载或上传文件 (转)
VB程序员的FTP编程指南1.4-下载或上传文件 (转)[@more@]专 题:下载或上传文件主 讲:qianqian 下载 用FTP下载文件简单而直接。在下载之前,请保证你是在二进制模式下。ftp有两种文件传输模式,A...
-
VB.net中的FTP操作:创建、删除、查询、下载、上传
计算机如何搭建FTP服务器参考https://jingyan.baidu.com/article/08b6a5916e885214a8092288.html 本程序参考链接:https://blog.csdn.net/dzweather/article/details/51429107
-
vb.net 从FTP空间中下载文件
vb.net 从FTP空间中下载文件,通过几行代码就实现从FTP空间中下载文件
-
【亲测可用,含源码】vb编写的ftp客户端程序.rar
使用VB编写的ftp客户端程序,可以为你提供ftp客户端,直接拿来套用即可
-
VB程序员的FTP编程指南1.7-用VB实现FTP的一个例子(大结局) (转)
VB程序员的FTP编程指南1.7-用VB实现FTP的一个例子(大结局) (转)[@more@] 专 题:用VB实现FTP的一个例子主 讲:qianqian 例程下载 这里供大家下载的是一个用VB实现FTP的一个例子,...
-
vb FTP文件服务器管理程序.rar
vb ftp文件服务器管理程序源码,比较简单的那种,可了解一下FTP服务器创建的原理,一些基本的WinSock知识都在里面,特别适合VB编程新手参考学习。
-
VBA实现FTP上传文件的两种方式:①shell cmd命令②vba调用vb.net(传参并获取返回值)
VBA实现FTP上传文件的两种方式:①shell cmd命令②vba调用vb.net(传参并获取返回值) 欢迎使用Markdown编辑器 你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Markdown编辑器, 可以仔细阅读这篇文章,了解一下Markdown的基本语法知识。 新的改变 我们对Markdown编辑器进行了一些功能拓展与语法支持,除了标准的Markdown编辑器功能,我们增加了如下几点新功能,帮助你用它写博客: 全新的界面设计 ,将会带来全新的写作体验;
-
VB中用inet控件通过FTP实现单个文件和多个文件的上传
来自:http://lihb810.blog.163.com/blog/static/59451162200810275926721/ 公司里有个VB开发的软件要做个ftp上传文件功能,基本实现方法如下: 1、inet控件添加: 打开VB,新建一个工程,新建一个窗体Form1,点击VB6.0上面的工程-部件-控件-选择“Microsoft Internet Tr
-
真是想不到系列之一:VB到底为我们做了什么?
《真是想不到系列》 每次看大师的东西到了精彩之处,我就会拍案叫绝:"哇噻,真是想不到!"。在经过很多次这种感慨之后,我发现只要我们动了脑筋,我们自己也能有让别人想不到的东西。于是想到要把这些想不到的东拿出来和大家一起分享,希望抛砖引玉,能引出更多让人想不到的东西。 真是想不到系列之一:VB到底为我们做了什么?关键字:VB、底层、WIN32、API、COM难
-
VB程序员的FTP编程指南1.2-使用Windows的ftp程序 (转)
VB程序员的FTP编程指南1.2-使用Windows的ftp程序 (转)[@more@] 专 题:连结和登录FTP服务器主 讲:qianqian FTP程序 windows有内建的FTP程序FTP.EXE,如图1,它...
14 楼 enilu 2009-01-07 09:02
13 楼 QQbyte 2008-06-23 20:59
12 楼 agile_boy 2008-06-23 20:57
11 楼 hantsy 2008-06-23 13:26
10 楼 hantsy 2008-06-23 13:22
9 楼 dogstar 2008-06-23 12:10
8 楼 catail 2008-06-23 12:05
7 楼 QQbyte 2008-06-23 11:36
6 楼 blurm 2008-06-23 10:51
5 楼 rain999 2008-06-23 09:55
还以为Eclipse用C/C++也实现了...
4 楼 Frederick 2008-06-23 09:49
3 楼 darkjune 2008-06-23 09:40
2 楼 realvalkyrie 2008-06-22 18:51
1 楼 QQbyte 2008-06-22 16:28