BUG: GetDiskFreeSpace() Fails with a UNC Path to Network Share

Q137230


The information in this article applies to:


SYMPTOMS

The GetDiskFreeSpace() function fails with a universal naming convention (UNC) path to a network share. This failure causes problems for various applications. The problem only occurs on non-FAT32 enabled operating systems such as Windows releases before Win95 OSR2.

This problem does not occur under Microsoft Windows NT. However, you must include a trailing backslash, so that the UNC path looks like the following:


   \\server\share\  


RESOLUTION

Use a drive letter instead. For example:


   GetDiskFreeSpace(<UNC name>)
   if <GetDiskFreeSpace fails>

      WNetAddConnection()    // Connect and get a drive letter.
      GetDiskFreeSpace(<drive letter>:)
      WNetCancelConnection() // Disconnect. 


STATUS

Microsoft has confirmed this to be a bug in Microsoft Windows 95. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Additional query words: win95fest

Keywords : kbAPI kbKernBase kbGrpDSKernBase
Issue type : kbbug
Technology : kbAudDeveloper kbWin32sSearch kbWin32API


Last Reviewed: December 16, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.