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:
00205745
Views:
15
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,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform