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
Titre:
How to Initialize Inactive Mapped Drive
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01438302
Message ID:
01438302
Vues:
258
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?
Brandon Harker
Sebae Data Solutions
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform