>>C# but easily translatable:
bool b = new DriveInfo("C").IsReady;
>
>Yes, this is a common approach. But, I have a UNC and I have to work with something like \\100.100.100.100\MyShareDrive. So, using the UNC approach is a little bit more difficult to detect if the drive is ready. I have seen a lot of approaches to get the UNC from a mapped drive but not vice versa. Also, for now, I am using an approach of verifying if a file exist but that is slow.
If you know the IP address you could ping that with a short timeout. Wouldn't confirm that the drive was ready but....
using System.Net.NetworkInformation;
PingReply response = new Ping().Send("100.100.100.100", 5);
bool worked = response.Status == IPStatus.Success;
5ms was more than enough on my network,
C# I'm afraid, Regards,
Viv