Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to force reconnection of a network mapped drive?
Message
De
04/11/2002 16:54:13
 
 
À
04/11/2002 14:09:34
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00713586
Message ID:
00718714
Vues:
17
>Great big ol' wet kisses to you and George (and honorary smooches to Alan, Jose, Mark, and James for helping with ideas.
>
>This finally did the trick!
DECLARE INTEGER GetForegroundWindow IN WIN32API
>
>DECLARE INTEGER WNetRestoreConnectionW IN Win32API  ;
>             INTEGER hwndParent, STRING lpDevice
>LOCAL lnHwnd as Integer
>lnHwnd = GetForegroundWindow()
>lnError=WNetRestoreConnectionW(lnHwnd,STRCONV(STRCONV('L:'+CHR(0),1),5))
>?lnHwnd, lnError, DRIVETYPE("L")
>
>
>Haven't sussed the syntax for doing it with a null parameter. Passing 0 for lpDevice just doesn't work. No error, but no reconnection, either. For now, as long as I can iterate thru all the possible drive letters, I'll be happy.
>
>Thank you _so_ much.

No problem - I'll collect on the kiss the next time I make it out to Seattle...
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform