Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NOVELL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: NOVELL
Divers
Thread ID:
00117137
Message ID:
00117542
Vues:
21
>>It is giving error WNetAddConnection function not found..
>>
>>Please help me.
>>
>>Regards
>>MMK
>
>
>FUNCTION AddConn
>LPARAMETERS cUNCToMap, cDriveLetter, cPasswordToUse
>IF TYPE('cUNCToMap') # 'C' OR TYPE('cDriveLetter') # 'C'
>	RETURN .F.
>ENDIF
>IF TYPE('cPasswordToUse') # 'C'
>	cPasswordToUse = ''
>ENDIF
>
>DECLARE INTEGER WNetAddConnection IN Win32API ;
> STRING cRemoteUNC, ;
> STRING cPassword, ;
> STRING cLocalDrive
>
>RETURN (WNetAddConnection( cUNCToMap, cPasswordToUse + CHR(0), cDriveLetter) = 0)
>
Ed,

I think the declaration should be:
DECLARE INTEGER WNetAddConnection IN Win32API;
  STRING @lpszRemoteName, STRING @lpszPassword, STRING @lpszLocalName
with all parameters being passed by reference. So, using your example:
RETURN (WNetAddConnection(@cUNCToMap, 0, @cDriveLetter) = 0)
will work.

If Nishit has access to this past May's issue of FoxPro Advisor, he can see may article on this subject for additional information.
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