Method - Redir

See Also: OverviewImplementationPropertiesMethodsEvents

Syntax:

object.Redir(ByVal drive As String) As Long

Arguments:

<drive> is the drive to resolve possible network redirection. For Windows libraries, if "0" is passed, the drive Windows is installed on will be used, otherwise the current drive will be used.

Returns:

If the <drive> is redirected, TRUE [-1] will be returned. Otherwise, FALSE [0] will be returned.

Example of use found in:

Implementing Network Floating Licensing and Network Floating Licensing Sample

Description:

This function determines if a drive letter is actually redirected to a network file server or some other remote drive. If a drive letter actually points to another machine via a peer-to-peer network, this method will return TRUE. If the current machine is a peer server, meaning that the physical hard drive is located in this machine but other machines access the same data via the network, this method will return FALSE.

A single upper-case character passed in a string designates on which drive to check. Any Universal Naming Convention (UNC) paths passed to this function will automatically return TRUE.

Example:

' See if this is a network drive

If object.Redir("F") = True Then

MsgBox "Application not allowed to run on network"

End If