首页 > 开发 > 综合 > 正文

使用PB调用API自动更新(非FTP模式)(二、API说明及定义(2))

2024-07-21 02:10:16
字体:
来源:转载
供稿:网友
  • 本文来源于网页设计爱好者web开发社区http://www.html.org.cn收集整理,欢迎访问。
  • 5、comparefiletime
    function ulong comparefiletime( ref s_filetime lpfiletime1, ref s_filetime lpfiletime2) library "kernel32.dll" alias for "comparefiletime"
    vb声明declare function comparefiletime lib "kernel32" alias "comparefiletime" (lpfiletime1 as filetime, lpfiletime2 as filetime) as long说明根据filetime结构的信息,对比两个文件的时间返回值long,如两个时间相等,就返回零;如lpfiletime1小于lpfiletime2,返回-1;如lpfiletime2小于lpfiletime1,返回1参数表参数类型及说明lpfiletime1filetime,参考filetimelpfiletime26、copyfilea
    function ulong copyfilea(string lpexistingfilename, string lpnewfilename, long bfailifexists) library "kernel32.dll" alias for "copyfilea"
    vb声明declare function copyfile lib "kernel32" alias "copyfilea" (byval lpexistingfilename as string, byval lpnewfilename as string, byval bfailifexists as long) as long说明复制文件。与vb的filecopy命令相似返回值long,非零表示成功,零表示失败。会设置getlasterror参数表参数类型及说明lpexistingfilenamestring,源文件名lpnewfilenamestring,目标文件名bfailifexistslong,如果设为true(非零),那么一旦目标文件已经存在,则函数调用会失败。否则目标文件被改写
    发表评论 共有条评论
    用户名: 密码:
    验证码: 匿名发表