PP_REDIR()

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

Applies to:

Win32, Win64

Syntax-VB:

Declare Function pp_redir(ByVal drive As String) As Long

Syntax-C:

LONG pp_redir(LPSTR drive)

Arguments:

<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.

Returns:

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.

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, 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.

Example:

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

Concept Link IconRelated Topics