Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get drive letter from UNC
Message
De
07/09/2000 16:04:27
 
 
À
07/09/2000 16:00:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00413847
Message ID:
00413849
Vues:
12
>I have a function to get UNC (drive letter changed to) using
>an Win32API function WNetGetConnection. This time, I want to do
>the reverse, meaning get drive letter from UNC. Which API to use?

You can't, since no drive letter is automatically associated with a UNC. You can spin through each drive and determine the UNC for that drive, and decide whether your UNC is derivable based on the present mapping of the drive, or can map a UNC to a specific drive using WNetAddConnection() or the WSH Wscript.Network's MapNetworkDrive method, or any of about a dozen other options.
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