Why is FileCopy accidentally interrupted in Windows 7?

I have a VB6 program running on Windows 7. It copies a large number of files, and sometimes FileCopyit crashes with violation of access rights (between 60 and 500 files).

I cannot play it using a single file, only during such bulk copy operations does this problem occur.

It doesn’t matter if the source / target is on hard drives, network shares or CDs.

What can cause this problem?

EDIT: My question might be a bit confusing, so here are some more data:

Run 1:

  • Start copying 5,000 files
  • Access Violation of File # 983
  • Access Violation of File # 1437
  • File Access Violation # 1499
  • Access Violation of File # 2132
  • Access Violation of File # 3456
  • Access Violation of File # 4320
  • Done

Run 2:

  • Start copying 5,000 files
  • Access Violation of File # 60
  • Access Violation of File # 3745
  • Done

Observations

  • Damaged files are always different
  • The number of damaged files tends to decrease if the same batch of files is copied several times in a row.
  • Running as an administrator does not matter.
  • The application has read / write access to all necessary objects of the file system.
  • This issue only occurs on Windows 7 workstations.
+3
source share
4 answers

: , / ? ( , Win7, ..). , / , .

- , ?

? /

, Win7 - Win7 . ( /)

( > ) -

? , FSO X, , Win7/VB6 .

, , , /, . , .

+4

( , , ). ? , . , , , .

( ) N N . , , , , .

, - , - .

+3

, - ?

procmon , . , , , -, ( ) ( temp/scratch ).

procmon Mark Russinovich blog Windows/.

+2

/ , ?

VB6 " "?

, ? , , VB6, (Count vs count -1)?

+1

Source: https://habr.com/ru/post/1732170/


All Articles