|
|
|
Click here to copy the following block | Private Declare Function GetVolumeInformation& Lib "kernel32" Alias _ "GetVolumeInformationA" (ByVal lpRootPathName As String, _ ByVal pVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, _ lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, _ lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, _ ByVal nFileSystemNameSize As Long)
Const MAX_PATH = 260
Const FILE_CASE_SENSITIVE_SEARCH = &H1 Const FILE_CASE_PRESERVED_NAMES = &H2 Const FILE_UNICODE_ON_DISK = &H4 Const FILE_PERSISTENT_ACLS = &H8 Const FILE_FILE_COMPRESSION = &H10 Const FILE_VOLUME_IS_COMPRESSED = &H8000
Function GetDriveInfo(ByVal DriveName As String, Optional VolumeName As String, _ Optional SerialNumber As Long, Optional FileSystem As String, _ Optional FileSystemFlags As Long) As Boolean Dim ignore As Long If InStr(DriveName, "\\") = 0 Then DriveName = Left$(DriveName, 1) & ":\" End If SerialNumber = 0 FileSystemFlags = 0 VolumeName = String$(MAX_PATH, 0) FileSystem = String$(MAX_PATH, 0) GetDriveInfo = GetVolumeInformation(DriveName, VolumeName, Len(VolumeName), _ SerialNumber, ignore, FileSystemFlags, FileSystem, Len(FileSystem)) VolumeName = Left$(VolumeName, InStr(VolumeName, vbNullChar) - 1) FileSystem = Left$(FileSystem, InStr(FileSystem, vbNullChar) - 1) End Function |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|