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?
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
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.
:
Open "\\host\share\file.txt" For Input As #1 Dim sTmp Line Input #1, sTmp MsgBox sTmp Close #1
, , Scripting.Runtime.
Scripting.Runtime
Oldschool VB . . .
VB6 CHDrive UNC-.
App.Path UNC-, ChDrive , ChDrive App.Path .
ChDrive App.Path
Microsoft, "ChDrive UNC- , , , App.Path ". http://msdn.microsoft.com/en-us/library/aa263345(v=vs.60).aspx
/ ? , FileSystemObject.
UNC- VB6, :
75 54. API, getshortfilename getshortpathname, UNC.
, ... , , .