Determines if given drive letter is a redirected (network) drive

Applies to:

Win32, Win64


Declare Function pp_redir(ByVal drive As String) As Long


LONG pp_redir(LPSTR drive)


<drive> is the uppercase drive letter 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. UNC paths may also be used.


Refer to pp_errorstr() for a table of possible return codes and their meaning. Typically, only PP_FALSE [0] (not redirected) or PP_TRUE [1] (redirected drive) is returned.


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, pp_redir() will return PP_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, pp_redir() will return PP_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 PP_TRUE.


Refer to pp_compno() for an example of checking for a network drive.

Concept Link IconRelated Topics