Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to force reconnection of a network mapped drive?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00713586
Message ID:
00713657
Vues:
25
>>GETDIR() doesn't return remoted mapped drives that are mapped, but not connected, as illustrated by their icon having a red X thru it in Explorer. This happens when the computer is started before the computer with the mapping is started before the computer with the drive.
>>
>>I'd like to show the drive in GETDIR(), by forcing the connection (if possible). If the drive really isn't available, then of course, it shouldn't show.
>>
>>TIA.
>
>Um, a SWAG. Look at WNetRestoreConnectionW() in the networking SDK. Don't know if VFP's DRIVETYPE() function returns a zero or not here if the drive is attached but not available. The function is only available on Win2K/XP and is used in restoring persistent connections defined by the user, so I'm not sure that this is going to do the job for you.

Double-Swag WNetAddConnectionW to create a new connection...
I seem to remember WNetAddConnection or something like that.
- jim durkin

"The universe is a big place, perhaps the biggest." Kurt Vonnegut
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform