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說明根據(jù)filetime結(jié)構(gòu)的信息,對比兩個文件的時間返回值long,如兩個時間相等,就返回零;如lpfiletime1小于lpfiletime2,返回-1;如lpfiletime2小于lpfiletime1,返回1參數(shù)表參數(shù)類型及說明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說明復(fù)制文件。與vb的filecopy命令相似返回值long,非零表示成功,零表示失敗。會設(shè)置getlasterror參數(shù)表參數(shù)類型及說明lpexistingfilenamestring,源文件名lpnewfilenamestring,目標文件名bfailifexistslong,如果設(shè)為true(非零),那么一旦目標文件已經(jīng)存在,則函數(shù)調(diào)用會失敗。否則目標文件被改寫