BetterExplorer.UsbEject.VolumeDeviceClass.VolumeDeviceClass C# (CSharp) Méthode

VolumeDeviceClass() public méthode

Initializes a new instance of the VolumeDeviceClass class.
public VolumeDeviceClass ( ) : System
Résultat System
        public VolumeDeviceClass()
            : base(new Guid(Native.GUID_DEVINTERFACE_VOLUME))
        {
            foreach(string drive in Environment.GetLogicalDrives())
            {
                StringBuilder sb = new StringBuilder(1024);
                if (Native.GetVolumeNameForVolumeMountPoint(drive, sb, (uint)sb.Capacity))
                {
                    _logicalDrives[sb.ToString()] = drive.Replace("\\", "");
                }
            }
        }