Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connect to shared folder on peer-to-peer network
Message
From
07/02/2002 17:18:28
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00609221
Message ID:
00617056
Views:
21
>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

Thank you for your helpful, quick response, Arthur!

I'm wondering why drive mapping is necessary at all for opening databases in VFP apps, when other programs don't seem to need that step. For example, I can open a bitmap file across the same network in most any paint program, close it, shut down my machine, restart. I can then choose the file from the program's "most recently used" list and it opens just fine. I don't have to navigate to the network folder in Explorer and I don't have to map the drive -- it simply happens. Same goes with Excel, WinZip, and other programs. I have yet to get VFP to work like that with the peer-to-peer network upon which my app has to run. Every time a user on that network restarts their machine, if they do not first navigate in Explorer to the network folder that contains the data files, VFP cannot "see" the folder and any attempt to open a database or use a table in that folder fails. Also, even with drive mapping code in place, the app fails on the three Windows 2000 machines on that network. They seem to require not only a password but a username to access the data folder, and the drive mapping functions only handle passwords. So I'm still looking for help.

Regards,

Bill de Veas
Alpine Land Information Services
Bill de Veas
Previous
Reply
Map
View

Click here to load this message in the networking platform