Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WNetAddConnection2
Message
 
 
To
01/05/2008 11:33:41
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01314449
Message ID:
01314515
Views:
12
>>>Hey all
>>>
>>>Can someone post a VFP working sample to map \\server\myfolder to drive W: with userid and password via WNetAddConnection2. I've tried it raw and with Christof's struct.zip and I'm always getting an error from the function. I'm obviously missing something.
>>>
>>>Thanks
>>
>>I haven't tried it myself, but this http://vfpdev.narod.ru/download/wnetaddc.zip should give you an example. (Comments could be in Russian).
>>
>>
>>From http://forum.foxclub.ru/read.php?29,230414,283220
>
>Welllll. Yours was the first that worked. Unfortunately it was written in just the way to make it unreusable (as is all too common). It does what I asked for, but IMO should never be put into production like that. It could easily have been written to accept userid, password, drive etc as parameters.
>
>It will allow me to contrast what I'm missing.
>
>Thanks

You may change it to be better and then contact the original author (is it Mikhail Drosdov?) and ask him to upload better version.

I'm sorry, I acted only as a messenger, I never tried it anyway.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform