>Here's my little proc for mapping a network share:
>
>PROCEDURE mapdrive
> * do mapdrive with "\\servername\sharename", "k:"
> LPARAMETERS lcdrvltr, lcnetpath
> DECLARE LONG WNetAddConnection IN mpr.DLL STRING@, STRING@, STRING@
> retval=wnetaddconnection(@lcnetpath, CHR(0), @lcdrvltr)
> *remove the registered library
> CLEAR DLLS
> RETURN retval
>ENDPROC
This worked like a charm on our Win 9x systems but failed in tests on our Win 2000 systems. The latter required both a username and a password.
Within a day of signing up for PUTM, I found Ed Rauh's classes that implement WNetConnection3(), an API function which is apparently a newer version of WNetAddConnection() with the added ability to specify username and password. Yay.
I'm still playing with the classes and hope to post my review soon.
~Cheers~
Bill de Veas