Я пытаюсь выяснить, как программно (я использую С#) определить имя (или i.p.) серверов, к которым у моей рабочей станции есть текущие карты. Другими словами, в какой-то момент в Windows Explorer я сопоставил сетевой диск с буквой диска (или использовал "net use w:" для его сопоставления). Я знаю, как получить сетевые диски в системе:
DriveInfo[] allDrives = DriveInfo.GetDrives();
foreach (DriveInfo d in allDrives)
{
if (d.IsReady && d.DriveType == DriveType.Network)
{
}
}
Но класс DriveInfo не имеет свойств, которые сообщают мне, какой сервер и общая папка связан с подключенным диском. Где-то еще я должен смотреть?