>>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,283220Welllll. 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