Visual Basic 6 and UNC Paths

I get feedback from the developer: "The only way the visual base (6) can handle the UNC path is to map it to the disk." That's for sure? And if so, what is the main problem and are there any alternatives besides the mapped drive?

+5
source share
7 answers

Here is one way to work.

Sub Main()

    Dim fs As New FileSystemObject ' Add Reference to Microsoft Scripting Runtime
    MsgBox fs.FileExists("\\server\folder\file.ext")

End Sub
+2
source

We have an outdated VB6 application that uses UNC to build a connection string, so I know that VB6 can do this. Often you think permission problems are the culprits.

+6
source

:

Open "\\host\share\file.txt" For Input As #1
Dim sTmp
Line Input #1, sTmp
MsgBox sTmp
Close #1
+2

, , Scripting.Runtime.

Oldschool VB . . .

+1

VB6 CHDrive UNC-.

App.Path UNC-, ChDrive , ChDrive App.Path .

Microsoft, "ChDrive UNC- , , , App.Path ". http://msdn.microsoft.com/en-us/library/aa263345(v=vs.60).aspx

+1

/ ? , FileSystemObject.

0

UNC- VB6, :

  • $$
  • 8
  • 8.3 .

75 54. API, getshortfilename getshortpathname, UNC.

, ... , , .

0

All Articles