Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Initialize Inactive Mapped Drive
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01438302
Message ID:
01438308
Vues:
82
Try WNetAddConnection2 function with CONNECT_UPDATE_PROFILE flag set.

>Occasionally customers run into an issue where their persistent mapped drive, on reboot, does not initialize... it has a little red X icon if you view it from Windows Explorer. From a VFP application you can not access data that is stored on that mapped drive in this situation. Now, from Windows Explorer, if you click the mapped drive, Windows will initialize it and it is then available to the VFP application.
>
>I figured out (from someone here on the UT I'm sure) that the following will 'initalize' the mapped network drive, but this only works in Windows XP.
>
>
>LOCAL lcMappedDriveLetter
>lcMappedDriveLetter='x'
>DECLARE INTEGER WNetRestoreConnectionW IN Win32API  ;
>             INTEGER hwndParent, STRING @ lpDevice
>	
>=WNetRestoreConnectionW(0,STRCONV(STRCONV(lcMappedDriveLetter+':',1),5))
>
>
>
>Does anyone know how to do something like this in Vista / Windows 7?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform