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:
00205745
Vues:
14
Thanks George

Only problem is I need to pass a User-ID I think. I am getting error 1326.
I know the machine logon id is not valid on the NT server I am connecting to. Is there a way to pass User Id as well?

TIA
Paul

>>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,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform