Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UnMapNetworkDrive does not remove drive from listing
Message
 
 
To
24/05/2012 09:56:29
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Miscellaneous
Thread ID:
01543927
Message ID:
01544273
Views:
45
>>>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?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform