数据库

本类阅读TOP10

·SQL语句导入导出大全
·Power Designer杂记
·SQL Server日期计算
·常用的oracle函数使用说明(一)
·sqlserver2000数据库置疑的解决方法
·MS SQLServer OLEDB分布式事务无法启动的一般解决方案
·SQL to Excel 的应用
·SQL语句导入导出大全
·Error:ORA-01033:ORACLE initialization or shutdown in progress错误解决
·Oracle中password file的作用及说明

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
使用PB调用API自动更新(非FTP模式)(三、连接函数F_CONNECT_COPYSERVER)

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

三、连接函数F_CONNECT_COPYSERVER
返回路径
global type f_connect_copyserver from function_object
end type

forward prototypes
global function string f_connect_copyserver ()
end prototypes

global function string f_connect_copyserver ();
STRING GS_COPYSERVER1
STRING GS_COPYSERVER2
STRING GS_COPYSERVER3
STRING GS_COPYLOGINUSER1
STRING GS_COPYLOGINUSER2
STRING GS_COPYLOGINUSER3
STRING GS_COPYLOGINPASS1
STRING GS_COPYLOGINPASS2
STRING GS_COPYLOGINPASS3

GS_COPYSERVER1    = ProfileString("autodown.ini","downpath","COPYSERVER1","")
GS_COPYSERVER2    = ProfileString("autodown.ini","downpath","COPYSERVER2","")
GS_COPYSERVER3    = ProfileString("autodown.ini","downpath","COPYSERVER3","")
GS_COPYLOGINUSER1 = ProfileString("autodown.ini","downpath","COPYLOGINUSER1","")
GS_COPYLOGINUSER2 = ProfileString("autodown.ini","downpath","COPYLOGINUSER2","")
GS_COPYLOGINUSER3 = ProfileString("autodown.ini","downpath","COPYLOGINUSER3","")
GS_COPYLOGINPASS1 = ProfileString("autodown.ini","downpath","COPYLOGINPASS1","")
GS_COPYLOGINPASS2 = ProfileString("autodown.ini","downpath","COPYLOGINPASS2","")
GS_COPYLOGINPASS3 = ProfileString("autodown.ini","downpath","COPYLOGINPASS3","")

s_netresource ss_net

ss_net.dwScope = 0
ss_net.dwType  = 0//
ss_net.dwDisplayType = 0
ss_net.dwUsage = 0
ss_net.lpLocalName  = ''//
ss_net.lpRemoteName = GS_COPYSERVER1//
ss_net.lpComment    = ''
ss_net.lpProvider   = ''//

long ll_ret
string ls_path
ls_path = ''
ll_ret = WNetGetConnectionA('',GS_COPYSERVER1,255)
if ll_ret <> 0 then
 ll_ret = WNetGetConnectionA('',GS_COPYSERVER2,255)
 if ll_ret <> 0 then
  ll_ret = WNetGetConnectionA('',GS_COPYSERVER3,255)
  if ll_ret = 0 then
   return GS_COPYSERVER3
  end if
 else
  return GS_COPYSERVER2
 end if
else
 return GS_COPYSERVER1
end if
//gl_handle,
ll_ret = WNetAddConnection2A(ss_net,GS_COPYLOGINPASS1,GS_COPYLOGINUSER1,1)
if ll_ret <> 0 then
 ss_net.dwScope = 0
 ss_net.dwType  = 0//
 ss_net.dwDisplayType = 0
 ss_net.dwUsage = 0
 ss_net.lpLocalName  = ''//
 ss_net.lpRemoteName = GS_COPYSERVER2//
 ss_net.lpComment    = ''
 ss_net.lpProvider   = ''//
 ll_ret = WNetAddConnection2A(ss_net,GS_COPYLOGINPASS2,GS_COPYLOGINUSER2,1)
 if ll_ret <> 0 then
  ss_net.dwScope = 0
  ss_net.dwType  = 0//
  ss_net.dwDisplayType = 0
  ss_net.dwUsage = 0
  ss_net.lpLocalName  = ''//
  ss_net.lpRemoteName = GS_COPYSERVER3//
  ss_net.lpComment    = ''
  ss_net.lpProvider   = ''//
  ll_ret = WNetAddConnection2A(ss_net,GS_COPYLOGINPASS3,GS_COPYLOGINUSER3,1)
  if ll_ret <> 0 then
   //messagebox('错误!','连接服务器错误!',stopsign!)
   return ls_path
  end if
  ls_path = GS_COPYSERVER3
 else
  ls_path = GS_COPYSERVER2
 end if
else
 ls_path = GS_COPYSERVER1
end if
if isnull(ls_path) then ls_path = ''
//messagebox('',ls_path)
return ls_path

end function

 




相关文章

相关软件




月光软件程序下载编程文档电脑教程网站设计网址导航网络文学游戏天地幽默笑话生活休闲写作范文安妮宝贝
电脑技术编程开发网络专区谈天说地情感世界游戏元素分类游戏热门游戏体育运动手机专区业余爱好影视沙龙
音乐天地数码广场教育园地科学大观古今纵横谈股论金人文艺术医学保健动漫图酷二手专区地方风情各行各业

月光软件站·版权所有