首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > VFP >

Shell.Application的异常抓取

2012-02-10 
Shell.Application的错误抓取oShell CreateObject(Shell.Application)oTag oShell.NameSpace(Z:\

Shell.Application的错误抓取
oShell = CreateObject("Shell.Application")
oTag = oShell.NameSpace("Z:\" )
oTag.CopyHere( "d:\lcz\xxx.iso", 0)

如果拷贝文件过程中发生错误导致拷贝文件失败,应该如何获取这个错误
或者,如何判断拷贝是否完成

[解决办法]
shell 对象没有提供错误捕捉功能,要知道出错的详细信息,应使用 shell32.dll 中可控性更强的 SHFileOperation 函数。

热点排行