FIX: Incorrect Error Returned With FileSystem.GetAttr

ID: Q180626


The information in this article applies to:


SYMPTOMS

When an invalid pathname is passed as a parameter to the GetAttr method of the FileSystem control, the following error message occurs:

-2147024713 - "Cannot create a file when that file already exists"
The correct error returned should be "Invalid Pathname" or "File not Found."


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

This problem was corrected in Windows CE Toolkit for Visual Basic 6.0.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Windows CE Project in Visual Basic 5.0. Form1 is created by default.


  2. Add a FileSystem control and a CommandButton to Form1.


  3. Add the following code to Form1:
    
           Option Explicit
    
           Private Sub Command1_Click()
               On Error Resume Next
               FileSystem1.GetAttr ("\\")
               MsgBox Err.Description, , Err.Number
           End Sub 


  4. Press the F5 key to run the project, and note that the error number mentioned above is given without an error description.


Additional query words: wince vbce vbce5 vbce6


Keywords          : kbToolkit kbVBp kbVBp500bug kbVBp600fix kbWinCE kbWinCE100 kbGrpVB 
Version           : WINDOWS:1.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: February 25, 1999