建议不再使用SHFileOperation函数

来源:互联网 发布:淘宝高佣金推广 编辑:程序博客网 时间:2024/06/05 04:53

近期在开发中发现SHFileOperation函数在Win7中的使用对路径的格式有更加严格的限制,而在Win8中则直接报错,返回值为8,错误原因不详。

在MSDN中发现如下说明:

Note  As of Windows Vista, the use of the IFileOperation interface is recommended over this function.
由于IFileOperation接口的使用过于繁琐,暂时以CopyFile函数代替,在Vista以后的版本中尽量不再使用SHFileOperation函数。
原创粉丝点击