Microsoft KB Archive/180626

{|
 * width="100%"|

FIX: Incorrect Error Returned With FileSystem.GetAttr

 * }

Q180626

-

The information in this article applies to:


 * Microsoft Windows CE Toolkit for Visual Basic 5.0, version 1.0

-

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 that are listed at the beginning of this article.

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

Steps to Reproduce Behavior
 Create a new Windows CE Project in Visual Basic 5.0. Form1 is created by default. Add a FileSystem control and a CommandButton to Form1.  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  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 kbOSWinCEsearch kbOSWinCE100 kbGrpDSVB

Issue type : kbbug

Technology : kbVBSearch kbAudDeveloper kbWinCETKVBSearch kbWinCESearch kbWinCETK100VB500