Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connect to shared folder on peer-to-peer network
Message
De
07/02/2002 17:18:28
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00609221
Message ID:
00617056
Vues:
26
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform