BUG: File System Control: Open File Can Be Moved or Copied Without Error (267922)



The information in this article applies to:

  • Microsoft eMbedded Visual Basic 3.0

This article was previously published under Q267922

SYMPTOMS

In an eMbedded Visual Basic application, an error 55 "File already open" is not raised when an open file is copied or moved through the use of the FileCopy or MoveFile methods of the file system control.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new eMbedded Visual Basic application.
  2. From the Project menu, click Components, and then select Microsoft CE File System Control 3.0.
  3. Add a file control and a file system control to Form1.
  4. Paste the following code into Form1:
    Private Sub Form_Activate()
      File1.Open "CopyTest.txt", fsModeAppend
      File1.LinePrint "Test"
      FileSystem1.MoveFile "CopyTest.txt", "CopyTest2.txt"
      File1.LinePrint "Test2"
      File1.Close
    End Sub
    					
  5. Run the application. Note that no error results. Because the file has been opened by File1, the expected behavior would be that the "File already open" error message would be generated.

Modification Type:MinorLast Reviewed:7/27/2004
Keywords:kbBug kbpending KB267922