The network object can be used to manage drive mappings.
| Properties | Description |
| LocalDeviceName | File creation timestamp |
| ResourceName | Destination file specification for use with methods |
| UserName | Source file attributes |
| Password
|
Size (in bytes) of the source file
|
| Methods | Description |
| AddNetworkConnection
|
Create a network connection using the LocalDeviceName, ResourceName, UserName and Password
Function AddNetworkConnection(ByRef lngReturnValue As Long) |
| CancelNetworkConnection
|
Disconnect a network connection using the LocalDeviceName
Function CancelNetworkConnection(lngReturnValue As Long) |
| NetGetConnection
|
Query a network connection using LocalDeviceName
Function NetGetConnection(lngReturnValue As Long) |
Usage:
Sub Scense_Main()
Dim rc
With Network
'Initialize names
.LocalDeviceName = "T"
.ResourceName = "\\Server\ShareName$"
'Add the connection
If Not .AddNetworkConnection Then
WriteScenseLog "Connection Failed"
End If
'Initialize names
.LocalDeviceName = "T"
.ResourceName = ""
'Retrieve the info
.NetGetConnection(rc)
WriteScenseLog .ResourceName
End With
End Sub