>>>>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