|
-
Oct 29th, 2006, 04:17 PM
#1
Thread Starter
Hyperactive Member
Visual Basic 6 - Get Available Drives
This project demostrates how to retrieve all available drives using the following API's and display all of the Information in a Listview.
API's Used
VB Code:
Private Declare Function BringWindowToTop _
Lib "user32" ( _
ByVal hwnd As Long) _
As Long
Private Declare Function GetDriveType _
Lib "kernel32" _
Alias "GetDriveTypeA" ( _
ByVal nDrive As String) _
As Long
Private Declare Function GetLogicalDriveStrings _
Lib "kernel32" _
Alias "GetLogicalDriveStringsA" ( _
ByVal nBufferLength As Long, _
ByVal lpBuffer As String) _
As Long
Private Declare Function GetDiskFreeSpace _
Lib "kernel32" _
Alias "GetDiskFreeSpaceA" ( _
ByVal lpRootPathName As String, _
lpSectorsPerCluster As Long, _
lpBytesPerSector As Long, _
lpNumberOfFreeClusters As Long, _
lpTotalNumberOfClusters As Long) _
As Long
Private Declare Function GetVolumeInformation _
Lib "kernel32" _
Alias "GetVolumeInformationA" ( _
ByVal lpRootPathName As String, _
ByVal lpVolumeNameBuffer As String, _
ByVal nVolumeNameSize As Long, _
lpVolumeSerialNumber As Long, _
lpMaximumComponentLength As Long, _
lpFileSystemFlags As Long, _
ByVal lpFileSystemNameBuffer As String, _
ByVal nFileSystemNameSize As Long) _
As Long
if you have any improvements or suggestions then let me know? I would love to know what you guys think .
Regards,
Jenova
-
Oct 30th, 2006, 05:09 PM
#2
Thread Starter
Hyperactive Member
Re: Visual Basic 6 - Get Available Drives
Does any body have any suggestions that i can use to make this project better or any feedback on the code?
Regards,
Jenova
-
Feb 19th, 2007, 07:13 AM
#3
New Member
Re: Visual Basic 6 - Get Available Drives
Hi,
What if you restrict the read/write access to the drives, by providing a password.
Regards,
Dinesh
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|