Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with WNetAddConnection
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00205676
Message ID:
00205691
Vues:
14
>Hi all,
>
> Does anyone have a sample of using this WINAPI function?
>
> TIA
>
Hi Paul,

Try this:
DECLARE INTEGER WNetAddConnection IN Win32API;
  STRING @lpszRemoteName, STRING @lpszPassword, STRING @lpszLocalName
* lcserver is the server name in the \\< Server name >\< Volume > format
* lcdrive is the drive specifier
* If the password is known
lnresult = WNetAddConnection(@lcserver, @lcpassword, @lcdrive)
* With no password
lnresult = WNetAddConnection(@lcserver, 0, @lcdrive)
If the call succeeds lnresult will equal zero, otherwise it represents an error.

hth,
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform