Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to force reconnection of a network mapped drive?
Message
 
À
21/10/2002 13:45:16
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:
00713609
Vues:
23
This message has been marked as a message which has helped to the initial question of the thread.
>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.

Hi Nancy.
This API function queries the mapped drive and supposedly tests the connection. I'm not sure it will force it, but you can give it a try

Regards
Jose
	DECLARE Long WNetGetConnection in WIN32API;
		STRING @lpzLocalName, ;
		STRING @lpzRemoteName, LONG @lpnSize
		
	lcLocalName = "T:"
	lcRemoteName = Space(255)
	lnSize = 255
	
	lnRet = WNetGetConnection( @lcLocalName, @lcRemoteName, @lnSize)
	
	* lnRet # 0 : not a mapped resource, or not connected, or other error
------------------
Jose Marcenaro
Tercer Planeta - Argentina
http://www.tercerplaneta.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform