Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with WNetAddConnection
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00205676
Message ID:
00205691
Views:
15
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform