Microsoft 的 CopyFileEx 错误
我正在使用 Microsoft 的 CopyFileEx 方法来复制文件。 我正在从一台服务器处理到另一台服务器,文件位于共享文件夹中,并且我正在使用 UNC。 我收到错误 999。我在 Microsoft 的 Technet 网站上找到了“999”错误。由于“执行页内操作时出错”,副本失败。 根据以下 Microsoft 知识库文章 http://support.microsoft.com/kb/141117 ,“执行页内操作时出错”的一些原因是: “网络连接引起的错误可能会导致这些错误。当通过网络复制大于最大数据包大小的文件时,MTU 大小不匹配或路由器处的数据包截断可能会导致此错误。从本质上讲,网络连接是存在物理问题的介质。”
但经过一番调查后,我发现该文件很小,并且找不到网络问题。
我非常渴望想法......
I am using Microsoft's CopyFileEx method to copy files.
I am coping from one server to another and the file located in share folder and i am using UNC.
i get an error 999. I was able to find the ‘999’ error on Microsoft’s Technet site. The copies are failing because of an “Error performing inpage operation.”
According to the following Microsoft kb article found at http://support.microsoft.com/kb/141117 , some of the causes of “Error performing inpage operation” are:
“Errors caused by network connectivity can cause these errors. Mismatched MTU sizes or truncation of a packet at a router can result in this error when files larger than the largest packet size are copied over the network. In essence, the network connection is the media that has the physical problem.”
but after some investigation i saw that the file are small and I couldnt fint network issue.
I am desperate for idea...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它在那篇知识库文章的开头说,如果它是一个小文件,则可能是一个 I/O 错误,由于复制文件的方式而导致它给出错误 999。
我建议尝试使用 CreateFile 和 ReadFile (如中所述那篇文章),希望这会给您带来真正的错误,因为您避免了内存映射。
It says in the beginning of that kb article that if it's a small file, it can be an I/O error that causes it to give error 999 due to the way it's copying the file.
I'd suggest trying to copy the file manually using CreateFile and ReadFile (as mentioned in that article) and hopefully that would give you the real error since you avoid the memory mapping.