Previous Topic: Network FunctionsNext Topic: NetMap - Map a Local Device to a Network Resource


NetGetMap - Retrieve a Network Resource Name

Valid on Windows and Windows CE

The NetGetMap function retrieves the name of the network resource associated with a redirected device specified in device.

Function format:

NetGetMap(device as String) as String 
device

Identifies the drive or printer specification. Valid values are A: through Z: and LPT1: through LPT3:

The function returns a string containing the name of the network resource to which a device was redirected. If the device is not redirected, the function returns an empty string.

Example:

This example maps the AM sector share, displays the share and un-maps it again.

If SectorService <> "" Then
 If NetMap("U:",SectorService) Then
  MessageBox("U: Is Mapped to " + NetGetMap("U:"))
  NetUnMap("U:")
 Else	
  MessageBox("Could not map Sector Share")
 Endif
Else
 MessageBox("Could not find Sector Share Name")
EndIf