• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 709
  • Last Modified:

Microsoft's CopyFileEx error.

Hi

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...
0
dpatel_team
Asked:
dpatel_team
1 Solution
 
sarabandeCommented:
the article you mentioned describes the problem:

small files copied with CopyFile (or CopyFileEx) are not really copied but are mapped to local memory as a (so-called) memory-mapped-file. unfortunately that means in your case that normal read-errors like error 2, file not found, or errors because files were opened exclusively at the server you copy from, were not reported as file errors but as memory (in)page errors.

you could try SHFileOperation as alternative to CopyFileEx though i don't know whether it can handle UNC paths on remote servers.

or you open the file with CreateFile and do the copy operation yourself.

Sara

0
 
borgunitCommented:
Would the FileSystemObject accomplish what you want?
0
 
dpatel_teamAuthor Commented:
only provide way to debug
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now