Valid on Windows
The NetUnMap function cancels the redirection of a redirected device.
Function format:
NetUnMap(device as String) as Boolean
NetUnMap(device as String, force as Boolean) as Boolean
Identifies the redirected drive or device. (Valid values are A: through Z: and LPT1: through LPT3:)
Specifies whether any open files on the device are to be closed before the connection is canceled. If the force parameter is FALSE and there are open files on the redirected device, the function fails.
On successful completion, the function returns TRUE; otherwise, it returns FALSE.
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
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|