Article ID: 107771
Article Last Modified on 10/30/2006
SharedExtensionsDir=\\servername\share
SharedExtensionsDir=\\servername\share\
If Left(szSharedDir, 2) = "\\" Then
' Handle UNC path and obtain connection substring length
' Ensure that the path doesn't end in a trailing slash
If (Right(szSharedDir, 1) = "\") Then
szSharedDir = Left(szSharedDir, Len(szSharedDir) - 1)
End If
iShare = InStr(3, szSharedDir, "\")
iPath = Len(szSharedDir)
' see if a connection already exists
szNetDrive = SzExistingConnection(Left(szSharedDir, iPath))
If szNetDrive = "" Then
' No previous connection exists, find a free drive letter
szNetDrive = GetFreeDrive()
' and connect if a drive is free
If szNetDrive = "" Then
' No free drive is available to connect
FConnectShared = False
Exit Function
ElseIf WNetAddConnection(Left(szSharedDir, iPath), "",
szNetDrive) <> 0 Then
' Connection failed
FConnectShared = False
Exit Function
End If
End If
szSharedDir = szNetDrive & Right(szSharedDir,
Len(szSharedDir) - iPath)
End IfAdditional query words: 3.00 3.00b 3.20
Keywords: KB107771