//using System; //using System.Runtime.InteropServices; //using System.IO; private static DriveType GetDriveType(char DriveLetter) { return (DriveType)GetDriveType(string.Format(@"{0}:\", DriveLetter)); } [DllImport("kernel32")] private static extern int GetDriveType(string lpRootPathName);