Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UnMapNetworkDrive does not remove drive from listing
Message
De
24/05/2012 12:36:43
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Divers
Thread ID:
01543927
Message ID:
01544298
Vues:
35
>>>>I am mapping and unmapping drives from my application. The mapping portion appears to work fine. I see the drive appear in file explorer. But after Unmapping it, the drive appears with a red X in it. Then if I try mapping the drve again I get a error 1202. Something about attempting to connect but failing because the drive is in use. Is there a way to free up this unmapped drive, so I can use it again?
>>>
>>>How do you un-map it?
>>
>>I use the WNetAddConnection to map the drive temporarily. And the WNetCancelConnection2 to unmap it. The WNetCancelConnection2 will unmap it the first time. If I use the Directory() function afterwards, it show that the drive does not exist. But the second attempt to map the same drive letter results in the error, indicating that the drive letter is in use.
>
>Can you show the parameter values you pass to WNetCancelConnection2?
n = WNetCancelConnection2("H:",1,0)
Greg Reichert
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform