Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DOS HELP with VFP
Message
De
25/04/2001 14:33:19
 
 
À
25/04/2001 08:19:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00499218
Message ID:
00499758
Vues:
16
>Thank you for the reply,
>I tried that same code within a VFP form and while it created the file, the file was empty. I have the API Waddconnection code and I have used that also but I am not able to log user into the server using that function. Is there a different API call to use?
DECLARE INTEGER WNetAddConnection IN "mpr.dll" ;
STRING cRemoteName, ;
STRING cPassword, ;
STRING cLocalName


cResource = "\\Server\ShareName"
cPassword = "MyPassword"
cDriveLetter = "Y:"

? WNetAddConnection(cResource, cPassword, cDriveLetter)


cResource = "\\Server\AnotherShare"
cPassword = chr(0)  && important distinction from the original (no password)
cDriveLetter = "Q:"

lnRetval = WNetAddConnection(cResource, cPassword, cDriveLetter)

?lnRetVal
A return of 0 means the connection was made. You get a non-zero value for a
failure to add a new connection. I got an 85 for a connection that already
exists, and a 67 for one that failed.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform