首页 > 编程 > .NET > 正文

PB使用WININET的FTP方式自动更新(一、API和全局变量)

2024-07-21 02:09:55
字体:
来源:转载
供稿:网友

一些结构和api在非ftp方式文档中有了定义就不再说明。
一、api声明
function ulong internetopena(string lpszagent, ulong dwaccesstype,string lpszproxyname,string lpszproxybypass, ulong dwflags) library "wininet.dll"
function ulong internetconnecta(ulong hinternet,string lpszservername,ulong nserverport,string lpszusername,string lpszpassword,ulong dwservice,ulong dwflags,ulong dwcontext) library "wininet.dll"
function boolean internetclosehandle(ulong hinternet) library "wininet.dll"
function boolean ftpsetcurrentdirectorya(ulong hconnect,string lpszdirectory) library "wininet.dll"
function ulong ftpfindfirstfilea(ulong hconnect,string lpszsearchfile,ref s_win32_find_data lpfindfiledata,ulong dwflags,ulong dwcontext) library "wininet.dll"
function boolean internetfindnextfilea(ulong hfind,ref s_win32_find_data lpvfinddata) library "wininet.dll"
function boolean ftpgetfilea(ulong hconnect, string lpszremotefile,string lpsznewfile,boolean ffailifexists,ulong dwflagsandattributes,ulong dwflags,ulong dwcontext) library "wininet.dll"
二、全局变量
string gs_application_name
string gs_ftpserver1
string gs_ftpserver2
string gs_ftpserver3
string gs_ftploginuser1
string gs_ftploginuser2
string gs_ftploginuser3
string gs_ftploginpass1
string gs_ftploginpass2
string gs_ftploginpass3
string gs_ftploginport1
string gs_ftploginport2
string gs_ftploginport3
long   gl_ftploginport1
long   gl_ftploginport2
long   gl_ftploginport3
string gs_ftpdir1
string gs_ftpdir2
string gs_ftpdir3

gs_ftpserver1    = profilestring("autodown.ini","downpath","ftpserver1","")
gs_ftpserver2    = profilestring("autodown.ini","downpath","ftpserver2","")
gs_ftpserver3    = profilestring("autodown.ini","downpath","ftpserver3","")
gs_ftploginuser1 = profilestring("autodown.ini","downpath","ftploginuser1","")
gs_ftploginuser2 = profilestring("autodown.ini","downpath","ftploginuser2","")
gs_ftploginuser3 = profilestring("autodown.ini","downpath","ftploginuser3","")
gs_ftploginpass1 = profilestring("autodown.ini","downpath","ftploginpass1","")
gs_ftploginpass2 = profilestring("autodown.ini","downpath","ftploginpass2","")
gs_ftploginpass3 = profilestring("autodown.ini","downpath","ftploginpass3","")
gs_ftploginport1 = profilestring("autodown.ini","downpath","ftploginport1","")
gs_ftploginport2 = profilestring("autodown.ini","downpath","ftploginport2","")
gs_ftploginport3 = profilestring("autodown.ini","downpath","ftploginport3","")
gs_ftpdir1        = profilestring("autodown.ini","downpath","ftpdir1","")
gs_ftpdir2        = profilestring("autodown.ini","downpath","ftpdir2","")
gs_ftpdir3        = profilestring("autodown.ini","downpath","ftpdir3","")

商业源码热门下载www.html.org.cn

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表