Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Services and Drive Mapping
Message
De
19/10/1999 16:32:53
 
 
À
06/10/1999 12:26:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00273238
Message ID:
00278466
Vues:
14
>I have a VFP app running as a service on a NT machine. The problem I have is that the app needs to have a drive mapped to a different computer to run. Can I use the "WNetAddConnection" API to map a drive when no one is logged into the machine so the app will run right?

No, but WNetAddConnection2() or WNetAddConnection3() will work, as long as a valid userid and password are specified in the optional members of the structure. You might want to look at my NETRESOURCE class (downloadable from here on UT; you'll also need CLSHEAP from here to make it work) which includes a working implementation of WNetAddConnection3() in the sample code.

I'd recommend using UNC referencing rather than drive letter mapping IAC running as a service. WNetAddConnection3() is capable of making a null connection to a UNC.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform