@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: Return-values from GetDriveType !!!!C# Definition: public enum DriveTypes { DRIVE_UNKNOWN = 0, DRIVE_NO_ROOT_DIR = 1, DRIVE_REMOVABLE = 2, DRIVE_FIXED = 3, DRIVE_REMOTE = 4, DRIVE_CDROM = 5, DRIVE_RAMDISK = 6 } !!!!VB Definition: Public Enum DriveTypes DRIVE_UNKNOWN = 0 DRIVE_NO_ROOT_DIR = 1 DRIVE_REMOVABLE = 2 DRIVE_FIXED = 3 DRIVE_REMOTE = 4 DRIVE_CDROM = 5 DRIVE_RAMDISK = 6 End Enum !!!!VB.Net How to get the Drives and their Type. Here is code under the Button1.Click event Sub. Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim allDrivesDriveInfo As System.Collections.ObjectModel.ReadOnlyCollection(Of System.IO.DriveInfo) allDrivesDriveInfo = My.Computer.FileSystem.Drives 'Another way to get the Drives is:>> Dim myDrives() As System.IO.DriveInfo = System.IO.DriveInfo.GetDrives For Each d As System.IO.DriveInfo In myDrives Select Case d.DriveType Case System.IO.DriveType.Unknown 'Your code here.>> Case System.IO.DriveType.NoRootDirectory 'Your code here.>> Case System.IO.DriveType.Removable 'Your code here.>> Case System.IO.DriveType.Fixed 'Your code here.>> Case System.IO.DriveType.Network 'Your code here.>> Case System.IO.DriveType.CDRom 'Your code here.>> Case System.IO.DriveType.Ram 'Your code here.>> End Select Next End Sub End Class !!!!Notes: None. Documentation: DriveTypes@msdn on MSDN
Edit Enums.DriveTypes
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.