重新连接断开的网络驱动器 [英] Reconnecting a disconnected network drive

查看:1921
本文介绍了重新连接断开的网络驱动器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我试着写一个文件到网络驱动器,即断开连接,我得到一个错误。

If I try to write a file to a network drive, that is disconnected, I get an error.

如果我双击驱动器在资源管理器,网络驱动器重新连接。

If I doubleclick the drive in explorer, the network drive is reconnected.

使用System.Io.Driveinfo.IsReady我可以检查驱动器是否准备好? - 但我该如何重新连接在code

Using System.Io.Driveinfo.IsReady I can check if a drive is ready - but how can I reconnect it in code?

推荐答案

会这样的 code 这显示了如何将驱动器映射和动态地取消映射它在运行时怎么办?这是在codeGuru。

Would this code which shows how to map the drive and unmap it dynamically at runtime do? This is on CodeGuru.

这篇关于重新连接断开的网络驱动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆