C
cheka
Unregistered / Unconfirmed
GUEST, unregistred user!
function CopyFile(SourceName,TargetName:String):Boolean;<br>var<br> F:TShFileOpStruct;<br>begin<br> F.wnd:=InputForm.Handle;<br> F.wFunc:=FO_COPY; {操作方式}<br> F.pFrom:=PChar(SourceName);<br> F.pTo:=PChar(TargetName);<br> F.fFlags:=FOF_ALLOWUNDO OR FOF_RENAMEONCOLLISION; <br> result:= ShFileOperation(F)=0<br>end;<br><br>会随机出现错误 "无法复制文件,文件系统错误 (1026)" <br>