Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Net Use to map a drive?
Message
De
13/10/1998 11:49:51
 
 
À
13/10/1998 11:18:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00146250
Message ID:
00146286
Vues:
27
>Is there an API to map a Windows NT network drive letter? Similar to the NET USE dos prompt command.
>
>-Tim

Hi Tim,

To connect a local device to a network resource you can use WNetAddConnection function:

declare integer WNetAddConnection in "mpr.dll" string @, string @, string @

cServerName = "\\ServerName\Share_Name"
cLocalName = "T:" && "LPT1"
cPassWord = "" && "PassWord"

nResult = WNetAddConnection( @cServerName, @cPassWord, @cLocalName)

&& nResult = 0, if no errors occured


Best regards

Alex
Alex
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform