Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NetShareGetInfo
Message
 
 
À
22/02/2002 15:41:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00623913
Message ID:
00624197
Vues:
12
>I'm working on a process to assign a drive letter to a network share. Part of the interface is a textbox for the user to key in the "correct name". I want to check the entry to be certain that it is accurate. It looks like NetShareGetInfo would allow me to pass in text like "\\mike-win2k\" and give me a success code IF the text is correct AND the computer is turned on. What I'm struggling with is converting the VB example that I have into VFP syntax.
>
>Any suggestions regarding syntax or a different solution would be greatly appreciated!
>
>Mike

If you've WSH, than you can try to map drive to the network share and capture error if it's incorrect.
oNet = CREATEOBJECT("WScript.Network")
On Error < Capture mapping error >
oNet.MapNetworkDrive("Z:", "\\Server\Share")
* Restore default error handler
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform